]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/tdx: load TDVF for TD guest
authorChao Peng <chao.p.peng@linux.intel.com>
Thu, 8 May 2025 14:59:22 +0000 (10:59 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 May 2025 17:01:41 +0000 (19:01 +0200)
commit0dd5fe5ebeabefc7b3d7f043991b1edfe6b8eda9
tree7b3d3f6fc56563abdd233af1d4938a291f6815f1
parent0e73b843616e52882940ab89e1b0e86e22be2162
i386/tdx: load TDVF for TD guest

TDVF(OVMF) needs to run at private memory for TD guest. TDX cannot
support pflash device since it doesn't support read-only private memory.
Thus load TDVF(OVMF) with -bios option for TDs.

Use memory_region_init_ram_guest_memfd() to allocate the MemoryRegion
for TDVF because it needs to be located at private memory.

Also store the MemoryRegion pointer of TDVF since the shared ramblock of
it can be discared after it gets copied to private ramblock.

Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250508150002.689633-17-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/x86-common.c
target/i386/kvm/tdx.c
target/i386/kvm/tdx.h