qemu/target/i386
Isaku Yamahata 40da501d89 i386/tdx: handle TDG.VP.VMCALL<GetQuote>
Add property "quote-generation-socket" to tdx-guest, which is a property
of type SocketAddress to specify Quote Generation Service(QGS).

On request of GetQuote, it connects to the QGS socket, read request
data from shared guest memory, send the request data to the QGS,
and store the response into shared guest memory, at last notify
TD guest by interrupt.

command line example:
  qemu-system-x86_64 \
    -object '{"qom-type":"tdx-guest","id":"tdx0","quote-generation-socket":{"type":"unix", "path":"/var/run/tdx-qgs/qgs.socket"}}' \
    -machine confidential-guest-support=tdx0

Note, above example uses the unix socket. It can be other types, like vsock,
which depends on the implementation of QGS.

To avoid no response from QGS server, setup a timer for the transaction.
If timeout, make it an error and interrupt guest. Define the threshold of
time to 30s at present, maybe change to other value if not appropriate.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Co-developed-by: Chenyi Qiang <chenyi.qiang@intel.com>
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Tested-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-06-20 13:25:59 +02:00
..
emulate target/i386/emulate: more lflags cleanups 2025-05-27 19:21:19 +02:00
hvf i386/hvf: Make CPUID_HT supported 2025-05-20 08:04:18 +02:00
kvm i386/tdx: handle TDG.VP.VMCALL<GetQuote> 2025-06-20 13:25:59 +02:00
nvmm qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
tcg target/i386: fix TB exit logic in gen_movl_seg() when writing to SS 2025-06-17 09:54:51 +02:00
whpx qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
arch_dump.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
arch_memory_mapping.c exec/cpu-all: remove system/memory include 2025-04-23 15:04:57 -07:00
confidential-guest.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
confidential-guest.h i386/cgs: Introduce x86_confidential_guest_check_features() 2025-05-28 19:35:55 +02:00
cpu-apic.c include/system: Move exec/address-spaces.h to system/address-spaces.h 2025-04-23 14:08:21 -07:00
cpu-dump.c target/i386: remove CC_OP_CLR 2024-10-31 18:28:33 +01:00
cpu-internal.h include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 2025-04-23 15:07:32 -07:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu-system.c qapi: make most CPU commands unconditionally available 2025-05-28 18:55:50 +02:00
cpu.c i386/cpu: Warn about why CPUID_EXT_PDCM is not available 2025-06-20 13:25:59 +02:00
cpu.h i386/cpu: Rename enable_cpuid_0x1f to force_cpuid_0x1f 2025-06-20 13:25:59 +02:00
gdbstub.c target/i386/gdbstub: Expose orig_ax 2024-10-13 10:05:51 -07:00
helper.c tcg: Define INSN_START_WORDS as constant 3 2025-05-01 07:37:13 -07:00
helper.h target/i386: optimize computation of ZF from CC_OP_DYNAMIC 2024-10-31 18:28:33 +01:00
host-cpu.c i386/tdx: Validate phys_bits against host value 2025-05-28 19:35:55 +02:00
host-cpu.h i386/tdx: Validate phys_bits against host value 2025-05-28 19:35:55 +02:00
Kconfig i386: select correct components for no-board build 2024-05-10 15:45:15 +02:00
machine.c hw/i386/x86: Remove X86MachineClass::save_tsc_khz field 2025-05-30 09:52:08 +02:00
meson.build target/i386: add a directory for x86 instruction emulator 2025-04-17 18:23:26 +02:00
monitor.c qapi: remove the misc-target.json file 2025-05-28 18:54:18 +02:00
ops_sse.h target/i386: Use correct type for get_float_exception_flags() values 2025-06-06 14:32:55 +02:00
sev-system-stub.c qapi: make SEV commands unconditionally available 2025-05-28 18:54:16 +02:00
sev.c * target/i386/kvm: Intel TDX support 2025-05-30 11:41:07 -04:00
sev.h target/i386/sev: Reduce system specific declarations 2024-12-20 17:44:56 +01:00
svm.h target/i386: check intercept for XSETBV 2023-10-17 15:20:53 +02:00
trace-events target/i386/sev: Use size_t for object sizes 2024-06-28 19:26:54 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xsave_helper.c exec/cpu-all: remove tswap include 2025-04-23 15:04:57 -07:00