qemu/include/hw
Isaku Yamahata b65a6011d1 i386/tdvf: Introduce function to parse TDVF metadata
TDX VM needs to boot with its specialized firmware, Trusted Domain
Virtual Firmware (TDVF). QEMU needs to parse TDVF and map it in TD
guest memory prior to running the TDX VM.

A TDVF Metadata in TDVF image describes the structure of firmware.
QEMU refers to it to setup memory for TDVF. Introduce function
tdvf_parse_metadata() to parse the metadata from TDVF image and store
the info of each TDVF section.

TDX metadata is located by a TDX metadata offset block, which is a
GUID-ed structure. The data portion of the GUID structure contains
only an 4-byte field that is the offset of TDX metadata to the end
of firmware file.

Select X86_FW_OVMF when TDX is enable to leverage existing functions
to parse and search OVMF's GUID-ed structures.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
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-18-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-28 19:01:41 +02:00
..
acpi hw/acpi/pcihp: Fix typo in function name 2025-05-09 23:49:26 +03:00
adc hw/adc: Remove MAX111X device 2024-10-15 15:16:17 +01:00
arm hw/arm: Replace TABs for spaces in OMAP board and device code 2025-05-14 14:29:47 +01:00
audio virtio-snd: rewrite invalid tx/rx message handling 2024-04-09 02:31:16 -04:00
block hw/block: Remove ecc 2024-10-15 15:16:17 +01:00
char include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
core target/migration: Inline VMSTATE_CPU() 2025-05-08 14:22:12 +02:00
cpu Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cxl hw/cxl/cxl-mailbox-utils: CXL CCI Get/Set alert config commands 2025-05-14 05:39:14 -04:00
display include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
dma include/hw/dma/xlnx_dpdma: Remove dependency on console.h 2025-05-14 11:50:42 +02:00
firmware hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() 2024-06-19 12:40:49 +02:00
fsi include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
gpio include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
hyperv hw/hyperv/hyperv.h: header cleanup 2025-05-08 14:22:12 +02:00
i2c include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
i386 i386/tdvf: Introduce function to parse TDVF metadata 2025-05-28 19:01:41 +02:00
ide include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
input hw/input: Remove lm832x device 2024-10-01 14:41:10 +01:00
intc hw/intc/loongarch_pch: Merge three memory region into one 2025-05-14 15:56:28 +08:00
ipack hw/ipack: Remove legacy qemu_allocate_irqs() use 2025-01-31 19:36:44 +01:00
ipmi include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
isa include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
loongarch hw/loongarch/virt: Update the ACPI table for hotplug cpu 2025-03-05 09:39:18 +08:00
m68k include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
mem include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
mips include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
misc include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
net include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
nubus include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
nvram include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
openrisc hw/openrisc: Support monitor dumpdtb command 2025-02-24 15:03:42 +00:00
pci hw/pci-host: Remove unused pci_host_data_be_ops 2025-05-20 08:04:18 +02:00
pci-bridge hw/pci-bridge/cxl-upstream: Add properties to control link speed and width 2024-11-04 16:03:24 -05:00
pci-host hw/pci-host: Remove unused pci_host_data_be_ops 2025-05-20 08:04:18 +02:00
ppc include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
remote include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
riscv hw/riscv: Configurable MPFS CLINT timebase freq 2025-05-19 13:30:24 +10:00
rtc hw/i386: move rtc-reset-reinjection command out of hw/rtc 2024-05-10 15:45:15 +02:00
rx hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary 2024-02-15 16:58:46 +01:00
s390x hw/s390x: Remove the obsolete hpage_1m_allowed switch 2025-05-14 06:57:07 +02:00
scsi scsi: introduce requests_lock 2025-03-13 17:57:23 +01:00
sd hw/sd/sdhci: Remove need for SDHCI_VENDOR_IMX definition 2025-03-12 11:11:42 +01:00
sensor hw/sensor: Add IC_DEVICE_ID to ISL voltage regulators 2022-07-14 16:24:38 +02:00
sh4 include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
southbridge include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
sparc hw/sparc/grlib: split out the headers for each peripherals 2024-02-15 16:58:46 +01:00
ssi hw/ssi/pnv_spi: Put a limit to RDR match failures 2025-03-11 22:43:31 +10:00
timer include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
tricore include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
uefi hw/uefi: add include/hw/uefi/var-service.h 2025-03-04 12:01:42 +01:00
usb hw/usb/hcd-dwc3: Align global registers size with Linux 2025-02-25 15:32:58 +00:00
vfio vfio/container: pass listener_begin/commit callbacks 2025-05-09 12:42:28 +02:00
virtio vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
vmapple hw/vmapple/virtio-blk: Add support for apple virtio-blk 2025-03-04 14:45:34 +01:00
watchdog aspeed/wdt: Add AST2700 support 2024-06-16 21:08:54 +02:00
xen include/hw/xen/interface/io/blkif.h: fix "the the" typo in comment 2025-05-09 23:49:26 +03:00
xtensa include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
boards.h include/hw/boards: add warning about changing deprecation logic 2025-05-08 17:11:16 +01:00
clock.h clock: clear callback on unparent 2024-12-10 18:49:24 +01:00
elf_ops.h.inc hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc 2024-04-25 12:48:12 +02:00
fw-path-provider.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hotplug.h pci: fix 'hotplugglable' property behavior 2023-03-07 12:38:59 -05:00
hw.h meson: Only allow CONFIG_USER_ONLY from certain source sets 2025-04-23 14:08:44 -07:00
irq.h hw/irq: Introduce qemu_init_irqs() helper 2025-01-31 19:36:44 +01:00
loader-fit.h hw/mips/boston: Support dumpdtb monitor commands 2025-02-24 15:03:42 +00:00
loader.h load_aout: replace bswap_needed with big_endian 2025-03-21 12:51:16 +01:00
nmi.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
or-irq.h hw: Replace qemu_or_irq typedef by OrIRQState 2023-02-27 13:27:05 +00:00
platform-bus.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ptimer.h ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
qdev-clock.h clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
qdev-core.h hw/qdev: Factor qdev_hotunplug_allowed() out 2025-01-13 17:16:03 +01:00
qdev-dma.h Supply missing header guards 2019-06-12 13:20:21 +02:00
qdev-properties-system.h hw/vmapple/virtio-blk: Add support for apple virtio-blk 2025-03-04 14:45:34 +01:00
qdev-properties.h qdev, rust/hpet: fix type of HPET "timers" property 2025-03-20 12:14:45 +01:00
register.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
registerfields.h hw/registerfields: Add shared fields macros 2022-06-22 09:49:34 +02:00
resettable.h reset: Add RESET_TYPE_WAKEUP 2024-09-24 11:33:35 +02:00
stream.h hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
usb.h include/system: Move exec/memory.h to system/memory.h 2025-04-23 14:08:21 -07:00
vmstate-if.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00