On Tue, Apr 01, 2025 at 09:01:26AM -0400, Xiaoyao Li wrote: > Date: Tue, 1 Apr 2025 09:01:26 -0400 > From: Xiaoyao Li <[email protected]> > Subject: [PATCH v8 16/55] i386/tdx: load TDVF for TD guest > X-Mailer: git-send-email 2.34.1 > > From: Chao Peng <[email protected]> > > 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 <[email protected]> > Co-developed-by: Xiaoyao Li <[email protected]> > Signed-off-by: Xiaoyao Li <[email protected]> > --- > hw/i386/x86-common.c | 6 +++++- > target/i386/kvm/tdx.c | 6 ++++++ > target/i386/kvm/tdx.h | 3 +++ > 3 files changed, 14 insertions(+), 1 deletion(-)
Reviewed-by: Zhao Liu <[email protected]>
