From: "Ni, Ray" <ray.ni@intel.com>
To: "kraxel@redhat.com" <kraxel@redhat.com>,
"Xu, Min M" <min.m.xu@intel.com>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max PA
Date: Fri, 31 Mar 2023 07:24:58 +0000 [thread overview]
Message-ID: <MN6PR11MB8244605536C24CD027D044F88C8F9@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a5lzcvpjytqb5c5jlb3tbbeq3qhldljplns5bwnnr3u52exlou@knx6ixpc5cqs>
@Xu, Min M, can you check if Gerd's comment is valid?
Gerd,
This Bugzilla captures the same idea: https://bugzilla.tianocore.org/show_bug.cgi?id=3394
Originally from Laszlo. +@Liu, Zhiguang who will work on patch submission later.
Thanks,
Ray
> -----Original Message-----
> From: kraxel@redhat.com <kraxel@redhat.com>
> Sent: Thursday, March 30, 2023 5:03 PM
> To: Ni, Ray <ray.ni@intel.com>
> Cc: devel@edk2.groups.io; Tom Lendacky <thomas.lendacky@amd.com>
> Subject: Re: [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max PA
>
> Hi,
>
> > For tdx, the actual max physical address bits is decreased by the KEY_ID_BITS bits.
> > But the max physical address bits reported from CPUID instruction don't change.
>
> I guess the physical address bits calculation for tdx needs adjustment
> then. Right now we have:
>
> if (TdIsEnabled ()) {
> if (TdSharedPageMask () == (1ULL << 47)) {
> PhysMemAddressWidth = 48;
> } else {
> PhysMemAddressWidth = 52;
> }
> }
>
>
> See PlatformAddressWidthInitialization() in PlatformInitLib/MemDetect.c
>
> Which would be the third place needing the same logic. Maybe worth
> thinking about a helper function in a library somewhere, so we don't
> cut&paste the same code snippet again and again ...
>
> take care,
> Gerd
next prev parent reply other threads:[~2023-03-31 7:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <174E9488256AAAA5.22739@groups.io>
2023-03-28 14:10 ` [edk2-devel] [PATCH 0/6] Substract TME-MK KEY_ID_BITS from CPU max PA Ni, Ray
2023-03-28 14:13 ` Ni, Ray
[not found] ` <17509A92F1FF60E5.28404@groups.io>
2023-03-30 2:26 ` Ni, Ray
2023-03-30 7:25 ` Gerd Hoffmann
2023-03-30 8:41 ` Ni, Ray
2023-03-30 9:03 ` Gerd Hoffmann
2023-03-31 7:24 ` Ni, Ray [this message]
[not found] ` <17517033A2B187E0.12651@groups.io>
2023-03-31 8:02 ` Ni, Ray
2023-03-31 9:26 ` Gerd Hoffmann
2023-03-30 15:28 ` 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=MN6PR11MB8244605536C24CD027D044F88C8F9@MN6PR11MB8244.namprd11.prod.outlook.com \
--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