]> git.ipfire.org Git - thirdparty/qemu.git/commit
i386/tdx: Wire CPU features up with attributes of TD guest
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 8 May 2025 14:59:17 +0000 (10:59 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 May 2025 17:01:40 +0000 (19:01 +0200)
commitbb3be394cf80d68251e5b89e823dddc679b6e644
tree8ef96d940b797c134828c5004877aa60f2fe06f1
parent714af52276e74a1829674d180ef26ecb6261834c
i386/tdx: Wire CPU features up with attributes of TD guest

For QEMU VMs,
  - PKS is configured via CPUID_7_0_ECX_PKS, e.g., -cpu xxx,+pks  and
  - PMU is configured by x86cpu->enable_pmu, e.g., -cpu xxx,pmu=on

While the bit 30 (PKS) and bit 63 (PERFMON) of TD's attributes are also
used to configure the PKS and PERFMON/PMU of TD, reuse the existing
configuration interfaces of 'cpu' for TD's attributes.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250508150002.689633-12-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/tdx.c