lkml.org 
[lkml]   [2025]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] x86/sev/vc: fix efi runtime instruction emulation
On Tue, May 27, 2025 at 06:21:51PM +0200, Borislav Petkov wrote:
> On Tue, May 27, 2025 at 04:45:44PM +0200, Gerd Hoffmann wrote:
> > In case efi_mm is active go use the userspace instruction decoder which
> > supports fetching instructions from active_mm. This is needed to make
> > instruction emulation work for EFI runtime code, so it can use cpuid
> > and rdmsr.
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> > arch/x86/coco/sev/core.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Can you pls explain what the use cases for this and your next patch are?

Use case is coconut-svsm providing an uefi variable store and edk2
runtime code doing svsm protocol calls to send requests to the svsm
variable store. edk2 needs a caa page mapping and a working rdmsr
instruction for that.

Another less critical but useful case is edk2 debug logging to qemu
debugcon port. That needs a working cpuid instruction because edk2
uses that to figure whenever sev is active and adapt ioport access
accordingly.

> We'd like to add them to our test pile.

That is a bit difficult right now because there are a number of pieces
which need to fall into place before this is easily testable. You need:

* host kernel with vmplanes patch series (for snp vmpl support).
* coconut svsm with uefi variable store patches.
* edk2 patches so it talks to svsm for variable access.
* igvm support patches for qemu.

Hope I didn't forgot something ...

take care,
Gerd


\
 
 \ /
  Last update: 2025-05-28 09:38    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog