From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.5414.1621386571528409690 for ; Tue, 18 May 2021 18:09:32 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 19 May 2021 09:09:25 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Laszlo Ersek'" , "'Erdem Aktas'" , "'Brijesh Singh'" Cc: , "'James Bottomley'" , "'Min Xu'" , "'Jiewen Yao'" , "'Tom Lendacky'" , "'Jordan Justen'" , "'Ard Biesheuvel'" , "'Michael D Kinney'" , "'Zhiguang Liu'" References: <20210512234615.1726-1-brijesh.singh@amd.com> <20210512234615.1726-5-brijesh.singh@amd.com> <5fc233d3-020d-c16f-dd45-48665d9e7d71@redhat.com> In-Reply-To: <5fc233d3-020d-c16f-dd45-48665d9e7d71@redhat.com> Subject: =?UTF-8?B?5Zue5aSNOiBbUEFUQ0ggdjIgMDQvMTNdIE1kZVBrZy9SZWdpc3Rlci9BbWQ6IGRlZmluZSBHSENCIG1hY3JvIGZvciBSZWdpc3RlciBHUEEgc3RydWN0dXJl?= Date: Wed, 19 May 2021 09:09:16 +0800 Message-ID: <000101d74c4b$9d7ea5a0$d87bf0e0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQF2u2c/CDb92q1a7UfRPFY1On/mSwIN9uLJAovGmlYCuRQHvatwiY0A Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Erdem: Laszlo is right. The rule is to align spec definition.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: Laszlo Ersek > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: = 2021=E5=B9=B45=E6=9C=8819=E6=97=A5 0:02 > =E6=94=B6=E4=BB=B6=E4=BA=BA: Erdem Aktas ; = Brijesh Singh > > =E6=8A=84=E9=80=81: devel@edk2.groups.io; James Bottomley = ; Min > Xu ; Jiewen Yao ; Tom > Lendacky ; Jordan Justen > ; Ard Biesheuvel = ; > Michael D Kinney ; Liming Gao > ; Zhiguang Liu > =E4=B8=BB=E9=A2=98: Re: [PATCH v2 04/13] MdePkg/Register/Amd: define = GHCB macro for > Register GPA structure >=20 > On 05/17/21 20:25, Erdem Aktas wrote: > > I verified that the values align with the GHCB spec publication: > > #56421 Revision: 2.00 > > > > Just one question: is there any reason why GHCB_* defines are = decimal > > while the SVM_EXIT_* are all in hexadecimal? Does EDK2 have any > > preference? >=20 > (I'm unaware of any preference in edk2 -- it's probably best to stick > with the base that the spec itself uses, but even using a different = base > is not a huge deal, if the numbers in question are not large.) >=20 > Thanks! > Laszlo >=20 > > > > Reviewed-by: Erdem Aktas > > > > -Erdem > > > > On Wed, May 12, 2021 at 4:46 PM Brijesh Singh = > wrote: > >> > >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3275 > >> > >> An SEV-SNP guest is required to perform the GHCB GPA registration. = See > >> the GHCB specification for further details. > >> > >> Cc: James Bottomley > >> Cc: Min Xu > >> Cc: Jiewen Yao > >> Cc: Tom Lendacky > >> Cc: Jordan Justen > >> Cc: Ard Biesheuvel > >> Cc: Laszlo Ersek > >> Cc: Erdem Aktas > >> Cc: Michael D Kinney > >> Cc: Liming Gao > >> Cc: Zhiguang Liu > >> Reviewed-by: Laszlo Ersek > >> Reviewed-by: Liming Gao > >> Signed-off-by: Brijesh Singh > >> --- > >> MdePkg/Include/Register/Amd/Fam17Msr.h | 7 +++++++ > >> 1 file changed, 7 insertions(+) > >> > >> diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h > b/MdePkg/Include/Register/Amd/Fam17Msr.h > >> index cdb8f588ccf8..542e4cdf4782 100644 > >> --- a/MdePkg/Include/Register/Amd/Fam17Msr.h > >> +++ b/MdePkg/Include/Register/Amd/Fam17Msr.h > >> @@ -53,6 +53,11 @@ typedef union { > >> UINT64 Features:52; > >> } GhcbHypervisorFeatures; > >> > >> + struct { > >> + UINT64 Function:12; > >> + UINT64 GuestFrameNumber:52; > >> + } GhcbGpaRegister; > >> + > >> VOID *Ghcb; > >> > >> UINT64 GhcbPhysicalAddress; > >> @@ -62,6 +67,8 @@ typedef union { > >> #define GHCB_INFO_SEV_INFO_GET 2 > >> #define GHCB_INFO_CPUID_REQUEST 4 > >> #define GHCB_INFO_CPUID_RESPONSE 5 > >> +#define GHCB_INFO_GHCB_GPA_REGISTER_REQUEST 18 > >> +#define GHCB_INFO_GHCB_GPA_REGISTER_RESPONSE 19 > >> #define GHCB_HYPERVISOR_FEATURES_REQUEST 128 > >> #define GHCB_HYPERVISOR_FEATURES_RESPONSE 129 > >> #define GHCB_INFO_TERMINATE_REQUEST 256 > >> -- > >> 2.17.1 > >> > >