瀏覽代碼

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 <Thomas.Lendacky@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Michael Roth <michael.roth@amd.com>

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Dionna Glaze 1 年之前
父節點
當前提交
1b5420e807
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      OvmfPkg/AmdSevDxe/AmdSevDxe.c

+ 1 - 0
OvmfPkg/AmdSevDxe/AmdSevDxe.c

@@ -130,6 +130,7 @@ AcceptAllMemory (
   }
 
   gBS->FreePool (AllDescMap);
+  gBS->CloseEvent (mAcceptAllMemoryEvent);
   return Status;
 }