From: "Yuanhao Xie" <yuanhao.xie@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Ni, Ray" <ray.ni@intel.com>, Laszlo Ersek <lersek@redhat.com>
Cc: "Dong, Eric" <eric.dong@intel.com>,
"Kumar, Rahul R" <rahul.r.kumar@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [edk2-devel] [Patch V4] UefiCpuPkg/MpInitLib: Enable execute disable bit.
Date: Mon, 20 Nov 2023 04:57:21 +0000 [thread overview]
Message-ID: <CO1PR11MB50264E7FD5B3FEB306F3386FF0B4A@CO1PR11MB5026.namprd11.prod.outlook.com> (raw)
In-Reply-To: <36666f4d-7066-972c-39c5-fe401f4783e0@redhat.com>
Hi Ray and Laszlo,
Thanks a lot for the feedbacks.
Please have a review on the patch v6 which:
-Kept execute disable bit both in MpExchangeInfo and CpuMpData.
-Added another patch in which I updated the comments of CpuMpData.
Regards
Yuanhao Xie
-----Original Message-----
From: Laszlo Ersek <lersek@redhat.com>
Sent: Friday, November 17, 2023 4:38 PM
To: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>; Xie, Yuanhao <yuanhao.xie@intel.com>
Cc: Dong, Eric <eric.dong@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [edk2-devel] [Patch V4] UefiCpuPkg/MpInitLib: Enable execute disable bit.
On 11/17/23 08:01, Ni, Ray wrote:
> Laszlo,
> I agree that the BSP's XD status is saved in both CpuMpData and
> ExchangeInfo.
> But, thinking from another perspective, ExchangeInfo is "only" used by
> the assembly code. That's why the BSP code needs to save the XD status
> in CpuMpData and ExchangeInfo.
>
> If we remove the XD status field in ExchangeInfo, then the assembly
> code has to understand the structure layout of CpuMpData, which is
> what I prefer to avoid.
>
> If you compare all fields in ExchangeInfo and CpuMpData, following
> fields are already duplicated:
> * CpuMpData.CpuInfoHob <-> MpExchangeInfo.CpuInfo
> * InitFlag
> * SevEsIsEnabled
> * SevSnpIsEnabled
> * GhcbBase
>
>
> So, I prefer to keep the current change proposed in Yuanhao's patch.
Very good explanation, thank you.
Can we perhaps document, in an additional patch:
- in "UefiCpuPkg/Library/MpInitLib/MpEqu.inc", that the assembly routines are not supposed to access the internals of CPU_MP_DATA,
- the same statement above "struct _CPU_MP_DATA" in "UefiCpuPkg/Library/MpInitLib/MpLib.h"?
A number of structures in "UefiCpuPkg/Library/MpInitLib/MpLib.h"
document whether they are to be used by assembly code vs. C code (vs.
both), but CPU_MP_DATA doesn't seem to have such comments.
For the current patch:
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111456): https://edk2.groups.io/g/devel/message/111456
Mute This Topic: https://groups.io/mt/102556608/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-11-20 4:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 5:59 [edk2-devel] [Patch V4] UefiCpuPkg/MpInitLib: Enable execute disable bit Yuanhao Xie
2023-11-13 10:54 ` Gerd Hoffmann
2023-11-13 11:08 ` Yuanhao Xie
2023-11-13 12:28 ` Gerd Hoffmann
2023-11-13 18:02 ` Laszlo Ersek
2023-11-17 7:01 ` Ni, Ray
2023-11-17 8:38 ` Laszlo Ersek
2023-11-20 4:57 ` Yuanhao Xie [this message]
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=CO1PR11MB50264E7FD5B3FEB306F3386FF0B4A@CO1PR11MB5026.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