On Tue, 14 Feb 2023 at 23:35, Ard Biesheuvel <[email protected]> wrote: > > On Tue, 14 Feb 2023 at 23:15, Pankaj Gupta <[email protected]> wrote: > > > > System Memory map is changed when a memory range is Accepted. > > While returning from AcceptAllMemory(), "gBS->FreePool" is wrongly > > used which results in changing memory map and hence return an error. > > Fix this by removing the "gBs->FreePool" call altogether. > > > > Before this patch, KVM guest throws an error and control goes to the > > boat loader menu every time we select an OS: > > > > EFI stub: ERROR: exit_boot() failed! > > EFI stub: ERROR: efi_main() failed! > > StartImage failed: Invalid Parameter > > > > Fixes: a00e2e5513 ("OvmfPkg: Add memory acceptance event in AmdSevDxe") > > Signed-off-by: Pankaj Gupta <[email protected]> > > Queued as #4040 - thanks! >
I've dropped it again - it seems AcceptAllMemory() should never be called a second time (and it is debatable whether the gEfiEventBeforeExitBootServicesGuid event should be signaled the second time), so it would be better to address that instead. > > --- > > OvmfPkg/AmdSevDxe/AmdSevDxe.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > > index 6391d1f775..f52dbfe597 100644 > > --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c > > +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > > @@ -123,7 +123,6 @@ AcceptAllMemory ( > > } > > } > > > > - gBS->FreePool (AllDescMap); > > return Status; > > } > > > > -- > > 2.34.1 > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100198): https://edk2.groups.io/g/devel/message/100198 Mute This Topic: https://groups.io/mt/96971535/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
