Skip to content

SEV: fixes for -kernel launch with incompatible OVMF

Dov Murik qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sev/i386: Allow launching with -kernel if no OVMF hashes table foundtarget/i386/sev.c+1 -16 replies
2/3sev/i386: Warn if using -kernel with invalid OVMF hashes table areatarget/i386/sev.c+6 -26 replies
3/3sev/i386: Perform padding calculations at compile-timetarget/i386/sev.c+18 -103 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchTom LendackyDr. David Alan GilbertPhilippe Mathieu-Daudé
1/3A-b
2/3R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] SEV: fixes for -kernel launch with incompatible OVMF

Tom Lendacky and Brijesh Singh reported two issues with launching SEV guests with the -kernel QEMU option when an old [1] or wrongly configured [2] OVMF images are used.

The fixes in patches 1 and 2 allow such guests to boot by skipping the kernel/initrd/cmdline hashes addition to the initial guest memory (and warning the user).

Patch 3 is a refactoring of parts of the same function sev_add_kernel_loader_hashes() to calculate all padding sizes at compile-time. This patch is not required to fix the issues above, but is suggested as an improvement (no functional change intended).

Note that launch measurement security is not harmed by these fixes: a Guest Owner that wants to use measured Linux boot with -kernel, must use (and measure) an OVMF image that designates a proper hashes table area, and that verifies those hashes when loading the binaries from QEMU via fw_cfg.

The old OVMFs which don't publish the hashes table GUID or don't reserve a valid area for it in MEMFD cannot support these hashes verification in any case (for measured boot with -kernel).

[1] https://lore.kernel.org/qemu-devel/[email protected]/
[2] https://lore.kernel.org/qemu-devel/[email protected]/

Dov Murik (3):
sev/i386: Allow launching with -kernel if no OVMF hashes table found sev/i386: Warn if using -kernel with invalid OVMF hashes table area sev/i386: Perform padding calculations at compile-time

 target/i386/sev.c | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

base-commit: af531756d25541a1b3b3d9a14e72e7fedd941a2e

Signature · 1 line
2.25.1