qemu/hw/i386
Chao Peng 0dd5fe5ebe 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>
2025-05-28 19:01:41 +02:00
..
kvm qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
xen qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
acpi-build.c hw/i386/amd_iommu: Isolate AMDVI-PCI from amd-iommu device to allow full control over the PCI device creation 2025-05-14 07:45:58 -04:00
acpi-build.h hw/i386/acpi-build: Update document reference 2025-05-08 14:22:12 +02:00
acpi-common.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
acpi-common.h hw/i386/acpi: Declare pc_madt_cpu_entry() in 'acpi-common.h' 2024-02-20 20:34:21 +03:00
acpi-microvm.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu-stub.c amd_iommu: report x2APIC support to the operating system 2024-02-14 06:09:32 -05:00
amd_iommu.c hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device 2025-05-14 07:45:58 -04:00
amd_iommu.h hw/i386/amd_iommu: Allow migration when explicitly create the AMDVI-PCI device 2025-05-14 07:45:58 -04:00
e820_memory_layout.c hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 2024-07-03 18:14:06 -04:00
e820_memory_layout.h hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 2024-07-03 18:14:06 -04:00
fw_cfg.c rust: Kconfig: Factor out whether HPET is Rust or C 2025-03-20 09:23:24 +01:00
fw_cfg.h hw/i386/fw_cfg: Add etc/e820 to fw_cfg late 2024-07-03 18:14:06 -04:00
intel_iommu.c intel_iommu: Take locks when looking for and creating address spaces 2025-05-14 07:45:51 -04:00
intel_iommu_internal.h intel_iommu: Introduce a property x-flts for stage-1 translation 2025-01-15 13:06:35 -05:00
Kconfig i386: Introduce tdx-guest object 2025-05-28 19:01:40 +02:00
meson.build machine/nitro-enclave: New machine type for AWS Nitro Enclaves 2024-10-31 18:28:33 +01:00
microvm-dt.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
microvm-dt.h microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
monitor.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
multiboot.c exec/cpu-all: remove exec/target_page include 2025-04-23 15:04:57 -07:00
multiboot.h target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00
nitro_enclave.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
pc.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
pc_piix.c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
pc_q35.c hw: add compat machines for 10.1 2025-04-23 07:51:25 +02:00
pc_sysfw.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
pc_sysfw_ovmf-stubs.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc_sysfw_ovmf.c exec/cpu-all: remove exec/target_page include 2025-04-23 15:04:57 -07:00
port92.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sgx-epc.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sgx-stub.c qapi/misc-target: Rename SGXInfo to SgxInfo 2025-05-20 08:04:18 +02:00
sgx.c qapi/misc-target: Rename SGXInfo to SgxInfo 2025-05-20 08:04:18 +02:00
trace-events hw/i386/intel-iommu: Migrate to 3-phase reset 2025-02-21 07:21:25 -05:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vapic.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
vmmouse.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
vmport.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
x86-common.c i386/tdx: load TDVF for TD guest 2025-05-28 19:01:41 +02:00
x86-cpu.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
x86-iommu-stub.c hw/i386/pc: Remove x86_iommu_get_type() 2021-11-01 18:49:10 -04:00
x86-iommu.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
x86.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00