Skip to content

RFC i386/sev: Support measured direct kernel boot on SNP

Dov Murik qemu-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest4 patches 0 repliesNew
  2. v2 RFC2 patches 6 repliesSuperseded
  3. v1 RFC1 patch 0 repliesSuperseded

Changes in v3 from the cover letter

* 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).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4qapi, i386: Move kernel-hashes to SevCommonPropertiesqapi/qom.json target/i386/sev.c+24 -320 replies
2/4i386/sev: Extract build_kernel_loader_hashestarget/i386/sev.c+62 -480 replies
3/4i386/sev: Reorder struct declarationstarget/i386/sev.c+28 -280 replies
4/4i386/sev: Allow measured direct kernel boot on SNPinclude/hw/i386/pc.h target/i386/sev.c+38 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [RFC PATCH v3 0/4] i386/sev: Support measured direct kernel boot on SNP

(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/[email protected]/
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 <[email protected]>
Cc Daniel P. Berrangé <[email protected]>
Cc Dr. David Alan Gilbert <[email protected]>
Cc Eduardo Habkost <[email protected]>
Cc Eric Blake <[email protected]>
Cc Markus Armbruster <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc James Bottomley <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc Michael Roth <[email protected]>
Cc Ashish Kalra <[email protected]>
Cc Mario Smarduch <[email protected]>
Cc Tobin Feldman-Fitzthum <[email protected]>

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(-)
Signature · 1 line
2.25.1