From: "Alexey Kardashevskiy" <aik@ozlabs.ru>
To: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v7 0/7] Add safe unaccepted memory behavior
Date: Wed, 26 Oct 2022 12:35:29 +1100 [thread overview]
Message-ID: <7cf0c864-0942-4a14-5a68-a9e0448a8fa0@ozlabs.ru> (raw)
In-Reply-To: <CAAH4kHYrCmqXTMMy2ccOhANzzd+o_aweQkqiwkOQMhzqn4smGg@mail.gmail.com>
On 26/10/2022 12:07, Dionna Amalie Glaze wrote:
> On Tue, Oct 25, 2022 at 5:23 PM Alexey Kardashevskiy <aik@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.
Nah, it is fine as long as the thing boots.
> 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.
Ah, ok.
>> 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.lendacky@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
This does not build though due to unresolved rebase conflict, the fix is
kinda trivial but I do not get those "Accepting all memory" anymore so I
wonder what else is missing.
>
> 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.
I am trying with "-m 2G" and "-m 8G" and see no difference - "Accepting
all memory" is not appearing with this kernel. What do I miss? Thanks,
--
Alexey
next prev parent reply other threads:[~2022-10-26 1:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 20:33 [PATCH v7 0/7] Add safe unaccepted memory behavior Dionna Glaze
2022-10-05 20:33 ` [PATCH v7 1/7] OvmfPkg: Realize EfiMemoryAcceptProtocol in AmdSevDxe Dionna Glaze
2022-10-05 20:43 ` Lendacky, Thomas
2022-10-05 20:33 ` [PATCH v7 2/7] MdePkg: Add EFI_EVENT_BEFORE_EXIT_BOOT_SERVICES_GUID Dionna Glaze
2022-10-06 12:45 ` Ard Biesheuvel
2022-10-10 1:33 ` 回复: [edk2-devel] " gaoliming
2022-10-05 20:33 ` [PATCH v7 3/7] MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices Dionna Glaze
2022-10-05 20:50 ` Lendacky, Thomas
2022-10-05 20:58 ` Dionna Glaze
2022-10-10 1:32 ` 回复: [edk2-devel] " gaoliming
[not found] ` <171B47E3227F0BCA.23411@groups.io>
2022-10-05 21:01 ` Dionna Glaze
2022-10-06 12:46 ` Ard Biesheuvel
2022-10-05 20:33 ` [PATCH v7 4/7] OvmfPkg: Introduce CocoDxe driver Dionna Glaze
2022-10-05 20:33 ` [PATCH v7 5/7] MdePkg: Introduce the AcceptAllUnacceptedMemory protocol Dionna Glaze
2022-10-05 20:33 ` [PATCH v7 6/7] OvmfPkg: Implement AcceptAllUnacceptedMemory in CocoDxe Dionna Glaze
2022-10-05 20:33 ` [PATCH v7 7/7] OvmfPkg/PlatformPei: SEV-SNP make >=4GB unaccepted Dionna Glaze
2022-10-05 21:02 ` Lendacky, Thomas
2022-10-14 6:20 ` [edk2-devel] [PATCH v7 0/7] Add safe unaccepted memory behavior Ni, Ray
2022-10-14 21:29 ` Dionna Glaze
2022-10-19 8:57 ` Ard Biesheuvel
2022-10-20 22:37 ` Dionna Glaze
2022-10-21 13:17 ` Ard Biesheuvel
2022-10-21 15:42 ` Dionna Glaze
2022-10-24 8:34 ` aik
2022-10-24 15:24 ` Dionna Glaze
2022-10-26 0:23 ` aik
2022-10-26 1:07 ` Dionna Glaze
2022-10-26 1:35 ` Alexey Kardashevskiy [this message]
2022-10-26 2:49 ` Alexey Kardashevskiy
2022-10-27 3:18 ` Alexey Kardashevskiy
2022-10-27 15:38 ` Dionna Glaze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7cf0c864-0942-4a14-5a68-a9e0448a8fa0@ozlabs.ru \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox