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>
This commit is contained in:
Dionna Glaze 2023-02-14 23:07:19 +00:00 committed by mergify[bot]
parent f67ec87704
commit 1b5420e807
1 changed files with 1 additions and 0 deletions

View File

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