From: Dionna Glaze Date: Tue, 14 Feb 2023 23:07:19 +0000 (+0000) Subject: OvmfPkg/AmdSevDxe: Close mAcceptAllMemoryEvent X-Git-Tag: edk2-stable202302~30 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=1b5420e8071b4f9ba13136f19365542dfe66bf04 OvmfPkg/AmdSevDxe: Close mAcceptAllMemoryEvent This event should only trigger once. It should be idempotent, but the allocation of the memory map itself is observable and can cause ExitBootServices to fail with a modified map key. Cc: Thomas Lendacky Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Michael Roth Signed-off-by: Dionna Glaze Reviewed-by: Ard Biesheuvel --- diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index 9c4e3bb406..a726498e27 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -130,6 +130,7 @@ AcceptAllMemory ( } gBS->FreePool (AllDescMap); + gBS->CloseEvent (mAcceptAllMemoryEvent); return Status; }