[edk2-devel] [PATCH 5/9] UefiCpuPkg/MpInitLib: Set the SW exit fields when performing VMGEXIT

Ni, Ray ray.ni at intel.com
Mon Oct 12 05:11:37 UTC 2020


Acked-by: Ray Ni <ray.ni at intel.com>

> -----Original Message-----
> From: Tom Lendacky <thomas.lendacky at amd.com>
> Sent: Sunday, October 11, 2020 12:07 AM
> To: devel at edk2.groups.io
> Cc: Brijesh Singh <brijesh.singh at amd.com>; Dong, Eric <eric.dong at intel.com>;
> Ni, Ray <ray.ni at intel.com>; Laszlo Ersek <lersek at redhat.com>; Kumar, Rahul1
> <rahul1.kumar at intel.com>
> Subject: [PATCH 5/9] UefiCpuPkg/MpInitLib: Set the SW exit fields when
> performing VMGEXIT
> 
> From: Tom Lendacky <thomas.lendacky at amd.com>
> 
> All fields that are set in the GHCB should have their associated bit in
> the GHCB ValidBitmap field set. Add support to set the bits for the
> software exit information fields when performing a VMGEXIT (SwExitCode,
> SwExitInfo1, SwExitInfo2).
> 
> Fixes: 20da7ca42a33 ("UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS
> use")
> Cc: Eric Dong <eric.dong at intel.com>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Laszlo Ersek <lersek at redhat.com>
> Cc: Rahul Kumar <rahul1.kumar at intel.com>
> Signed-off-by: Tom Lendacky <thomas.lendacky at amd.com>
> ---
>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> index 5d30f35b201c..5532a1d391bc 100644
> --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> @@ -533,6 +533,12 @@ BITS 64
> 
>      mov        rax, 0x80000004   ; VMGEXIT AP_RESET_HOLD
>      mov        [rdx + 0x390], rax
> +    mov        rax, 114          ; Set SwExitCode valid bit
> +    bts        [rdx + 0x3f0], rax
> +    inc        rax               ; Set SwExitInfo1 valid bit
> +    bts        [rdx + 0x3f0], rax
> +    inc        rax               ; Set SwExitInfo2 valid bit
> +    bts        [rdx + 0x3f0], rax
> 
>      pop        rdx
>      pop        rcx
> --
> 2.28.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66119): https://edk2.groups.io/g/devel/message/66119
Mute This Topic: https://groups.io/mt/77425918/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list