qemu/include/hw/i386
Xiaoyao Li 4420ba0ebb i386/tdx: Track mem_ptr for each firmware entry of TDVF
For each TDVF sections, QEMU needs to copy the content to guest
private memory via KVM API (KVM_TDX_INIT_MEM_REGION).

Introduce a field @mem_ptr for TdxFirmwareEntry to track the memory
pointer of each TDVF sections. So that QEMU can add/copy them to guest
private memory later.

TDVF sections can be classified into two groups:
 - Firmware itself, e.g., TDVF BFV and CFV, that located separately from
   guest RAM. Its memory pointer is the bios pointer.

 - Sections located at guest RAM, e.g., TEMP_MEM and TD_HOB.
   mmap a new memory range for them.

Register a machine_init_done callback to do the stuff.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250508150002.689633-21-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-28 19:01:41 +02: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
apic_internal.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
hostmem-epc.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
intel_iommu.h tests/qtest: Add intel-iommu test 2025-01-15 13:06:39 -05:00
microvm.h machine/nitro-enclave: New machine type for AWS Nitro Enclaves 2024-10-31 18:28:33 +01:00
nitro_enclave.h hw/core/eif: Use stateful qcrypto apis 2024-12-13 15:26:58 +01:00
pc.h qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
sgx-epc.h target/i386/cpu: Mask off SGX/SGX_LC feature words for non-PC machine 2024-07-31 13:13:31 +02:00
tdvf.h i386/tdx: Track mem_ptr for each firmware entry of TDVF 2025-05-28 19:01:41 +02:00
topology.h i386/topology: Introduce helpers for various topology info of different level 2025-01-10 23:34:45 +01: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 include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07: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