UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c | 224 ++++++++++++++-------- 1 file changed, 144 insertions(+), 80 deletions(-)
This patch series provides some fixes around AP creation: - An erratum on AMD hardware requires that a VMSA not be aligned on a 2MB boundary. To work around this issue, allocate 2 pages of memory and using the page that is not 2MB aligned and freeing the other. - When parking APs after exiting boot services, the current SNP support will perform an allocation that will not be reflected in memory map being supplied to the OS. Instead of allocating new VMSAs each time, re-use the current VMSA. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353 --- Changes since v1: - Change the order of the patches to make the patch diffs easier to review - Add erratum number to the patch description and code comment - Use existing ALIGN_POINTER macro These patches are based on commit: 5eb3d1bcc16f ("ArmVirtPkg: can't find gUefiOvmfPkgTokenSpaceGuid") Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Michael Roth <michael.roth@amd.com> Cc: Ashish Kalra <Ashish.Kalra@amd.com> Tom Lendacky (2): UefiCpuPkg/MpInitLib: Reuse VMSA allocation to avoid unreserved allocation UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned UefiCpuPkg/Library/MpInitLib/X64/AmdSev.c | 224 ++++++++++++++-------- 1 file changed, 144 insertions(+), 80 deletions(-) -- 2.40.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102055): https://edk2.groups.io/g/devel/message/102055 Mute This Topic: https://groups.io/mt/97911955/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Tue, Mar 28, 2023 at 01:09:22PM -0500, Lendacky, Thomas via groups.io wrote: > This patch series provides some fixes around AP creation: > > - An erratum on AMD hardware requires that a VMSA not be aligned on a > 2MB boundary. To work around this issue, allocate 2 pages of memory > and using the page that is not 2MB aligned and freeing the other. > > - When parking APs after exiting boot services, the current SNP support > will perform an allocation that will not be reflected in memory map > being supplied to the OS. Instead of allocating new VMSAs each time, > re-use the current VMSA. > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353 > > --- > > Changes since v1: > - Change the order of the patches to make the patch diffs easier > to review > - Add erratum number to the patch description and code comment > - Use existing ALIGN_POINTER macro Series: Acked-by: Gerd Hoffmann <kraxel@redhat.com> take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102155): https://edk2.groups.io/g/devel/message/102155 Mute This Topic: https://groups.io/mt/97911955/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Acked-by: Ray Ni <ray.ni@intel.com> > -----Original Message----- > From: Gerd Hoffmann <kraxel@redhat.com> > Sent: Thursday, March 30, 2023 3:36 PM > To: devel@edk2.groups.io; thomas.lendacky@amd.com > Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Michael > Roth <michael.roth@amd.com>; Ashish Kalra <Ashish.Kalra@amd.com> > Subject: Re: [edk2-devel] [PATCH v2 0/2] SEV-SNP guest support fixes > > On Tue, Mar 28, 2023 at 01:09:22PM -0500, Lendacky, Thomas via groups.io wrote: > > This patch series provides some fixes around AP creation: > > > > - An erratum on AMD hardware requires that a VMSA not be aligned on a > > 2MB boundary. To work around this issue, allocate 2 pages of memory > > and using the page that is not 2MB aligned and freeing the other. > > > > - When parking APs after exiting boot services, the current SNP support > > will perform an allocation that will not be reflected in memory map > > being supplied to the OS. Instead of allocating new VMSAs each time, > > re-use the current VMSA. > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353 > > > > --- > > > > Changes since v1: > > - Change the order of the patches to make the patch diffs easier > > to review > > - Add erratum number to the patch description and code comment > > - Use existing ALIGN_POINTER macro > > Series: > Acked-by: Gerd Hoffmann <kraxel@redhat.com> > > take care, > Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102243): https://edk2.groups.io/g/devel/message/102243 Mute This Topic: https://groups.io/mt/97911955/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.