qemu/target
Xiaoyao Li 75ec6189f5 i386/tdx: Implement adjust_cpuid_features() for TDX
Maintain a TDX specific supported CPUID set, and use it to mask the
common supported CPUID value of KVM. It can avoid newly added supported
features (reported via KVM_GET_SUPPORTED_CPUID) for common VMs being
falsely reported as supported for TDX.

As the first step, initialize the TDX supported CPUID set with all the
configurable CPUID bits. It's not complete because there are other CPUID
bits are supported for TDX but not reported as directly configurable.
E.g. the XFAM related bits, attribute related bits and fixed-1 bits.
They will be handled in the future.

Also, what matters are the CPUID bits related to QEMU's feature word.
Only mask the CPUID leafs which are feature word leaf.

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-45-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-28 19:35:54 +02:00
..
alpha target/migration: Inline VMSTATE_CPU() 2025-05-08 14:22:12 +02:00
arm kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
avr accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
hexagon accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
hppa target/migration: Inline VMSTATE_CPU() 2025-05-08 14:22:12 +02:00
i386 i386/tdx: Implement adjust_cpuid_features() for TDX 2025-05-28 19:35:54 +02:00
loongarch kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
m68k accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
microblaze target/microblaze: Delay gdb_register_coprocessor() to realize 2025-05-14 14:29:45 +01:00
mips kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
openrisc target/migration: Inline VMSTATE_CPU() 2025-05-08 14:22:12 +02:00
ppc kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
riscv kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
rx accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
s390x kvm: Introduce kvm_arch_pre_create_vcpu() 2025-05-28 19:01:40 +02:00
sh4 accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
sparc accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
tricore accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
xtensa accel/tcg: Move cpu_get_tb_cpu_state to TCGCPUOps 2025-04-30 12:45:05 -07:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00