qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/4] i386/sev: Support measured direct kernel boot on SNP
@ 2023-03-02  9:23 Dov Murik
  2023-03-02  9:23 ` [RFC PATCH v3 1/4] qapi, i386: Move kernel-hashes to SevCommonProperties Dov Murik
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dov Murik @ 2023-03-02  9:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Dov Murik, Paolo Bonzini, Daniel P . Berrangé,
	Dr . David Alan Gilbert, Eduardo Habkost, Eric Blake,
	Markus Armbruster, Marcelo Tosatti, Gerd Hoffmann,
	James Bottomley, Tom Lendacky, Michael Roth, Ashish Kalra,
	Mario Smarduch, Tobin Feldman-Fitzthum

(This RFC patch series is based on AMD's RFC upmv10-snpv3 tree [1].  So
far that RFC tree was not submitted for review in qemu-devel.)


In order to enable measured direct kernel boot on SNP, QEMU needs to
fill the hashes page when kernel-hashes=on.  This relies on several
changes to the SNP metadata published by OVMF (See [2] for proposed
OVMF patches).

Patch 1 pulls the 'kernel-hashes' property from the SEV guest settings
to the common settings to make it available for both SEV and SNP.

Patch 2 and 3 refactor the code in target/i386/sev.c to allow easier
change in patch 4.

Patch 4 adds the hashes table for SNP guests (or validates the page as a
zero page if kernel-hashes=off).

This patch series is also available at [3].


[1] https://github.com/mdroth/qemu/commits/upmv10-snpv3
[2] https://edk2.groups.io/g/devel/message/100625
[3] https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3

v3:
* Separate refactoring to their own patches.
* Use a new SNP metadata entry which indicates kernel hashes page;
  during pre-validation, either encrypt the page with the kernel hashes
  or mark it as zero (thanks Tom).

v2: https://lore.kernel.org/qemu-devel/20230216084913.2148508-1-dovmurik@linux.ibm.com/
v2 changes:
* Rebase on top of upmv10-snpv3 which includes kernel-hashes.

v1: https://lore.kernel.org/qemu-devel/20220329064038.96006-1-dovmurik%40linux.ibm.com/

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Eduardo Habkost <eduardo@habkost.net>
Cc: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Ashish Kalra <ashish.kalra@amd.com>
Cc: Mario Smarduch <mario.smarduch@amd.com>
Cc: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>

Dov Murik (4):
  qapi, i386: Move kernel-hashes to SevCommonProperties
  i386/sev: Extract build_kernel_loader_hashes
  i386/sev: Reorder struct declarations
  i386/sev: Allow measured direct kernel boot on SNP

 qapi/qom.json        |  12 +--
 include/hw/i386/pc.h |   2 +
 target/i386/sev.c    | 238 +++++++++++++++++++++++++------------------
 3 files changed, 146 insertions(+), 106 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-02  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-02  9:23 [RFC PATCH v3 0/4] i386/sev: Support measured direct kernel boot on SNP Dov Murik
2023-03-02  9:23 ` [RFC PATCH v3 1/4] qapi, i386: Move kernel-hashes to SevCommonProperties Dov Murik
2023-03-02  9:23 ` [RFC PATCH v3 2/4] i386/sev: Extract build_kernel_loader_hashes Dov Murik
2023-03-02  9:23 ` [RFC PATCH v3 3/4] i386/sev: Reorder struct declarations Dov Murik
2023-03-02  9:23 ` [RFC PATCH v3 4/4] i386/sev: Allow measured direct kernel boot on SNP Dov Murik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).