[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 18/65] i386/tdx: Make Intel-PT unsupported for TD guest
From: |
Xiaoyao Li |
Subject: |
[PATCH v5 18/65] i386/tdx: Make Intel-PT unsupported for TD guest |
Date: |
Thu, 29 Feb 2024 01:36:39 -0500 |
Due to the fact that Intel-PT virtualization support has been broken in
QEMU since Sapphire Rapids generation[1], below warning is triggered when
luanching TD guest:
warning: host doesn't support requested feature: CPUID.07H:EBX.intel-pt [bit
25]
Before Intel-pt is fixed in QEMU, just make Intel-PT unsupported for TD
guest, to avoid the confusing warning.
[1]
https://lore.kernel.org/qemu-devel/20230531084311.3807277-1-xiaoyao.li@intel.com/
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
Changes in v4:
- newly added patch;
---
target/i386/kvm/tdx.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
index 85d96140b450..239170142e4f 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -292,6 +292,11 @@ void tdx_get_supported_cpuid(uint32_t function, uint32_t
index, int reg,
if (function == 1 && reg == R_ECX && !enable_cpu_pm) {
*ret &= ~CPUID_EXT_MONITOR;
}
+
+ /* QEMU Intel-pt support is broken, don't advertise Intel-PT */
+ if (function == 7 && reg == R_EBX) {
+ *ret &= ~CPUID_7_0_EBX_INTEL_PT;
+ }
}
enum tdx_ioctl_level{
--
2.34.1
- [PATCH v5 08/65] kvm: handle KVM_EXIT_MEMORY_FAULT, (continued)
- [PATCH v5 08/65] kvm: handle KVM_EXIT_MEMORY_FAULT, Xiaoyao Li, 2024/02/29
- [PATCH v5 09/65] trace/kvm: Add trace for page convertion between shared and private, Xiaoyao Li, 2024/02/29
- [PATCH v5 10/65] kvm/memory: Make memory type private by default if it has guest memfd backend, Xiaoyao Li, 2024/02/29
- [PATCH v5 11/65] *** HACK *** linux-headers: Update headers to pull in TDX API changes, Xiaoyao Li, 2024/02/29
- [PATCH v5 12/65] i386: Introduce tdx-guest object, Xiaoyao Li, 2024/02/29
- [PATCH v5 13/65] target/i386: Implement mc->kvm_type() to get VM type, Xiaoyao Li, 2024/02/29
- [PATCH v5 14/65] i386/tdx: Implement tdx_kvm_init() to initialize TDX VM context, Xiaoyao Li, 2024/02/29
- [PATCH v5 15/65] i386/tdx: Get tdx_capabilities via KVM_TDX_CAPABILITIES, Xiaoyao Li, 2024/02/29
- [PATCH v5 16/65] i386/tdx: Introduce is_tdx_vm() helper and cache tdx_guest object, Xiaoyao Li, 2024/02/29
- [PATCH v5 17/65] i386/tdx: Adjust the supported CPUID based on TDX restrictions, Xiaoyao Li, 2024/02/29
- [PATCH v5 18/65] i386/tdx: Make Intel-PT unsupported for TD guest,
Xiaoyao Li <=
- [PATCH v5 21/65] i386/tdx: Integrate tdx_caps->attrs_fixed0/1 to tdx_cpuid_lookup, Xiaoyao Li, 2024/02/29
- [PATCH v5 19/65] i386/tdx: Update tdx_cpuid_lookup[].tdx_fixed0/1 by tdx_caps.cpuid_config[], Xiaoyao Li, 2024/02/29
- [PATCH v5 20/65] i386/tdx: Integrate tdx_caps->xfam_fixed0/1 into tdx_cpuid_lookup, Xiaoyao Li, 2024/02/29
- [PATCH v5 24/65] i386/tdx: Initialize TDX before creating TD vcpus, Xiaoyao Li, 2024/02/29
- [PATCH v5 25/65] i386/tdx: Add property sept-ve-disable for tdx-guest object, Xiaoyao Li, 2024/02/29
- [PATCH v5 22/65] i386/kvm: Move architectural CPUID leaf generation to separate helper, Xiaoyao Li, 2024/02/29
- [PATCH v5 23/65] kvm: Introduce kvm_arch_pre_create_vcpu(), Xiaoyao Li, 2024/02/29
- [PATCH v5 32/65] i386/tdx: Set kvm_readonly_mem_enabled to false for TDX VM, Xiaoyao Li, 2024/02/29
- [PATCH v5 31/65] i386/tdx: Implement user specified tsc frequency, Xiaoyao Li, 2024/02/29
- [PATCH v5 30/65] i386/tdx: Support user configurable mrconfigid/mrowner/mrownerconfig, Xiaoyao Li, 2024/02/29