]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 8 May 2025 14:59:12 +0000 (10:59 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 May 2025 17:01:40 +0000 (19:01 +0200)
commit1619d0e45be0d1e48a46d80963b4e77dc1b000a2
treeb020210821ef7321e758a746e5aa301f68792edb
parent8eddedc3701d2190db976a05155a8263c8ec175b
i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object

It will need special handling for TDX VMs all around the QEMU.
Introduce is_tdx_vm() helper to query if it's a TDX VM.

Cache tdx_guest object thus no need to cast from ms->cgs every time.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250508150002.689633-7-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/tdx.c
target/i386/kvm/tdx.h