On 3/13/23 03:00, Gerd Hoffmann wrote:
Hi,
// Allocate a single page for the SEV-ES Save Area and initialize it.
+ // Due to an erratum that prevents a VMSA being on a 2MB boundary,
+ // allocate an extra page to work around the issue.
A reference to the erratum (web link or erratum
On 3/13/23 03:28, Ni, Ray wrote:
+#define IS_ALIGNED(x, y) UINTN)(x) & (y - 1)) == 0))
1. Can you use the existing macro ALIGN_POINTER() defined in Base.h?
See my reply to the cover letter where I say I want to replace the usage
with Gerd's definitions/updates series (but wanted
; Michael Roth ; Ashish
> Kalra
> Subject: Re: [edk2-devel] [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-
> SNP VMSA allocations are not 2MB aligned
>
> On Mon, Mar 13, 2023 at 08:28:57AM +, Ni, Ray wrote:
> > >
> > > +#define IS_ALIGNED(x, y) UINTN)(x) &a
On Mon, Mar 13, 2023 at 08:28:57AM +, Ni, Ray wrote:
> >
> > +#define IS_ALIGNED(x, y) UINTN)(x) & (y - 1)) == 0))
>
> 1. Can you use the existing macro ALIGN_POINTER() defined in Base.h?
Having copies of this all over the tree is indeed a bad idea.
See
Agree with both comments
> -Original Message-
> From: Gerd Hoffmann
> Sent: Monday, March 13, 2023 4:00 PM
> To: Tom Lendacky
> Cc: devel@edk2.groups.io; Dong, Eric ; Ni, Ray
> ; Kumar, Rahul R ; Michael
> Roth ; Ashish Kalra
> Subject: Re: [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure
>
> +#define IS_ALIGNED(x, y) UINTN)(x) & (y - 1)) == 0))
1. Can you use the existing macro ALIGN_POINTER() defined in Base.h?
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101059): https://edk2.groups.io/g/devel/message/101059
Hi,
>// Allocate a single page for the SEV-ES Save Area and initialize it.
> + // Due to an erratum that prevents a VMSA being on a 2MB boundary,
> + // allocate an extra page to work around the issue.
A reference to the erratum (web link or erratum id) would be nice here.
Also swapping
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4353
Due to an erratum, an SEV-SNP VMSA cannot be 2MB aligned. To work around
this issue, allocate two pages instead of one. Because of the way that
page allocation is implemented, always try to use the second page. If the
second page is not 2MB