On Tue, Oct 25, 2022 at 5:23 PM Alexey Kardashevskiy <a...@ozlabs.ru> wrote: > > Hi Dionna, > > Thanks for updating the tree, builds nicely now! However the VM's kernel > does not boot - the guest kernel reports > > EFI stub: ERROR: exit_boot() failed! > > and hangs. I am not quite sure how it is supposed to work (still > learning) but "Accepting all memory" happens twice (should it?) and the > actual reason for the CoreExitBootService() failure is that MapKey != > mMemoryMapKey in CoreTerminateMemoryMap(), these are 0x7AD7 vs 0x7AD9 > or 0x7AE1 vs 0x7AE3 (the diff is always 2). >
"Accepting all memory" may happen twice, but it's idempotent. The debug_info log happening twice might be confusing, so I can change that if you'd like. The first accept will remove all unaccepted memory regions from the address space map. CoreExitBootService should fail the first time since the first accept will change the memory map. That failure means that the caller should GetMemoryMap again and try CoreExitBootService again. > How do you test it exactly, is there any command line change needed in > addition to enabling SNP? > > My guest kernel uses > https://patchew.org/linux/cover.1664298261.git.thomas.lenda...@amd.com/ > with the TDX prerequisite. Thanks, > It's a few name changes behind, but this branch of Linux is what I've been using: https://github.com/deeglaze/amdese-linux/tree/v12unacceptedv7v5-enableum Specific enablement patch here https://github.com/AMDESE/linux/commit/5a708081d58d773e767b11735ee1fd17ef5e5f61 I incorporate Kirill's patch set v7 for basic unaccepted memory support, Tom Lendacky's v5 patch set for SEV-SNP support of unaccepted memory, and I have a single patch that calls the protocol. This branch doesn't have Kirill's TDX patches. I've run it with a regular SEV-SNP enabled guest kernel too. At this point all the tests have used kernel injection rather than having the kernels all baked into the image. -- -Dionna Glaze, PhD (she/her) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#95578): https://edk2.groups.io/g/devel/message/95578 Mute This Topic: https://groups.io/mt/94144524/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-