public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: "Ni, Ray" <ray.ni@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Dong, Eric" <eric.dong@intel.com>,
	"Kumar, Rahul R" <rahul.r.kumar@intel.com>,
	Michael Roth <michael.roth@amd.com>,
	Ashish Kalra <Ashish.Kalra@amd.com>
Subject: Re: [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned
Date: Mon, 13 Mar 2023 09:45:46 +0100	[thread overview]
Message-ID: <20230313084546.artxw4yzggxd4rrb@sirius.home.kraxel.org> (raw)
In-Reply-To: <MN6PR11MB82443DC925A869074EB70BF08CB99@MN6PR11MB8244.namprd11.prod.outlook.com>

On Mon, Mar 13, 2023 at 08:28:57AM +0000, 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 https://edk2.groups.io/g/devel/message/100695 which adds this
and a few more commonly used macros to Base.h.  Can we get that
reviewed and merged please?

thanks & take care,
  Gerd


  reply	other threads:[~2023-03-13  8:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 17:03 [PATCH 0/2] SEV-SNP guest support fixes Lendacky, Thomas
2023-03-10 17:03 ` [PATCH 1/2] UefiCpuPkg/MpInitLib: Ensure SEV-SNP VMSA allocations are not 2MB aligned Lendacky, Thomas
2023-03-13  8:00   ` Gerd Hoffmann
2023-03-13  8:31     ` Ni, Ray
2023-03-13 14:15     ` Lendacky, Thomas
2023-03-13  8:28   ` Ni, Ray
2023-03-13  8:45     ` Gerd Hoffmann [this message]
2023-03-13  8:47       ` [edk2-devel] " Ni, Ray
2023-03-13 13:42     ` Lendacky, Thomas
2023-03-10 17:04 ` [PATCH 2/2] UefiCpuPkg/MpInitLib: Reuse VMSA allocation to avoid unreserved allocation Lendacky, Thomas
2023-03-10 17:08 ` [PATCH 0/2] SEV-SNP guest support fixes Lendacky, Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230313084546.artxw4yzggxd4rrb@sirius.home.kraxel.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox