qemu/include/hw/i386
Dov Murik c1996992cc i386/sev: Allow measured direct kernel boot on SNP
In SNP, the hashes page designated with a specific metadata entry
published in AmdSev OVMF.

Therefore, if the user enabled kernel hashes (for measured direct boot),
QEMU should prepare the content of hashes table, and during the
processing of the metadata entry it copy the content into the designated
page and encrypt it.

Note that in SNP (unlike SEV and SEV-ES) the measurements is done in
whole 4KB pages.  Therefore QEMU zeros the whole page that includes the
hashes table, and fills in the kernel hashes area in that page, and then
encrypts the whole page.  The rest of the page is reserved for SEV
launch secrets which are not usable anyway on SNP.

If the user disabled kernel hashes, QEMU pre-validates the kernel hashes
page as a zero page.

Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
Message-ID: <20240530111643.1091816-24-pankaj.gupta@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-06-05 11:01:06 +02:00
..
apic_internal.h apic, i386/tcg: add x2apic transitions 2024-02-14 06:09:32 -05:00
apic-msidef.h i386/msi: Correct mask of destination ID in MSI address 2017-12-01 18:28:15 +02:00
apic.h hw/i386/x86: Fix PIC interrupt handling if APIC is globally disabled 2024-02-14 06:09:32 -05:00
hostmem-epc.h hostmem: Add hostmem-epc as a backend for SGX EPC 2021-09-30 14:50:19 +02:00
intel_iommu.h hw/i386/intel_iommu: Fix endianness problems related to VTD_IR_TableEntry 2023-08-03 16:06:49 -04:00
microvm.h Revert "x86: don't let decompressed kernel image clobber setup_data" 2023-03-02 03:10:46 -05:00
pc.h i386/sev: Allow measured direct kernel boot on SNP 2024-06-05 11:01:06 +02:00
sgx-epc.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
topology.h i386: Support module_id in X86CPUTopoIDs 2024-05-22 19:43:29 +02:00
vmport.h hw/i386/vmport: Drop superfluous parenthesis around function typedef 2020-09-18 13:49:54 -04:00
x86-iommu.h include/hw/i386/x86-iommu: Fix struct X86IOMMU_MSIMessage for big endian hosts 2023-08-03 16:16:17 -04:00
x86.h hw/i386/sev: Add support to encrypt BIOS when SEV-SNP is enabled 2024-06-05 11:01:06 +02:00
xen_arch_hvm.h xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common 2023-06-15 16:45:59 -07:00