From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 097858034B for ; Tue, 7 Mar 2017 14:36:33 -0800 (PST) Received: by mail-qk0-x231.google.com with SMTP id v125so29702501qkh.2 for ; Tue, 07 Mar 2017 14:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sZ67vQmyPazWVpDoSQUh4kl2Q/RWqH+WsWX3oqLdojQ=; b=A9g0nxXwtopxb7m7p1yvMEIUr1qaiOiQo778LshEYF+sW4OXrYhe6mAAvk8QhRyAt1 zlsYbWVVtTKXt9i1hyw3H+i/SVt9Gv2L1jL8Fa4t6USDGrHMqLODJyJ3drW+LVCuXaa4 59u1cbBOeg4C2cRMP7etCgwOMadxiADYnAMXBWWIMOKOV/WP8msJsd1Jz2OMi9m9A/HG rEwTHoMtGywSXin6AdlMkod4IOs/F9RsbXCH+hcE60UyMKmgshk7Ue8jmed/tIscN4BJ kaDs7MG8beHLckVMijWQPyZNuM6ef6QppeBpEtHQvJuTP3sepHYxPgN78voh1P1zr+1T Y+tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sZ67vQmyPazWVpDoSQUh4kl2Q/RWqH+WsWX3oqLdojQ=; b=B4D/URd9/D6mfPjnzZRWnmmuSqkc5utBpgQbs6J8H1FBpK4BBtmf6BoMfxhAGER8dz GG4aS4UF/BZnHAM6wCqJhhXvyClQjDvrJ08EgylRZ2ArfGqO+bDMK62MvqktAQTDCG2O xrMm0sozohRy9OOOXr4Mr+KP385p0H23cZgUOncXMeMRKHGXA8AYDS+ZtvV5Frqq8vBP pODA1lK65VviQfuL7aw+IiOkiaxS9yZ7DJiD7R2/+Lh++UXG2ywqyOMo0H93g/FXxFaq W++XsWwV6UkJZC2yY7HLK9BmRUYM4COBjU7spjlHiZ+KHLqLhBfG8LYMiVHZnyH/0ilm F5qA== X-Gm-Message-State: AMke39l9So/PDqsyr9CpsNuA+7WytQAQp8rhiivb5yXocsX4WeOuwCHD3Esj7/S2PmnNL4lU3h7I6X7Yf/D1Qw== X-Received: by 10.200.47.161 with SMTP id l30mr3733321qta.248.1488926192086; Tue, 07 Mar 2017 14:36:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.182.65 with HTTP; Tue, 7 Mar 2017 14:36:31 -0800 (PST) In-Reply-To: References: <148884284887.29188.7643544710695103939.stgit@brijesh-build-machine> <148884286215.29188.1084675072356724555.stgit@brijesh-build-machine> From: Brijesh Singh Date: Tue, 7 Mar 2017 16:36:31 -0600 Message-ID: To: Laszlo Ersek Cc: jordan.l.justen@intel.com, edk2-devel@ml01.01.org, Leo Duran , brijesh.singh@amd.com, Tom Lendacky X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [RFC PATCH v1 2/5] OvmfPkg/MemcryptSevLib: Add SEV helper library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 22:36:33 -0000 Content-Type: text/plain; charset=UTF-8 On Tue, Mar 7, 2017 at 4:08 PM, Laszlo Ersek wrote: > On 03/07/17 20:14, Brijesh Singh wrote: > > On Tue, Mar 7, 2017 at 11:06 AM, Laszlo Ersek wrote: > I think SevActive() and SevInitialize() should become part of > PlatformPei only (if that's possible). > > The upcoming PTE massaging functions could become part of the DMA lib > stuff that you mention (as functions with external linkage), and then > you could pull the DMA lib into QemuVideoDxe just to make these > functions available. > > Presently the suggested functions don't seem to justify two (or even > one) new libclass. > I think I should be able to accomate SevInitialize() and SevActive() function inside the PlatformPei. I will drop MemcryptSevLib library in next rev. I will go with your idea for adding PTE massaging function directly inside the DMA library and will link that into QemuVideoDxe. Only part which I have not yet figured out, how to deal with Qemu FW_CFG DMA support, I believe some of FW_CFG DMA read and write happens fairly early (PEI stage). The PTE massaging code may need to allocate memory and not sure how to allocate dynamic memory in early stages. Any pointers ? Thanks Brijesh >