[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/8] target/i386/intel-pt: print special message for INTEL_PT_
From: |
Xiaoyao Li |
Subject: |
[PATCH v2 4/8] target/i386/intel-pt: print special message for INTEL_PT_ADDR_RANGES_NUM |
Date: |
Mon, 8 Aug 2022 16:58:30 +0800 |
Bit[2:0] of CPUID.14H_01H:EAX stands as a whole for the number of INTEL
PT ADDR RANGES. For unsupported value that exceeds what KVM reports,
report it as a whole in mark_unavailable_features() as well.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
target/i386/cpu.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 8b74d18c127f..dc0c1bbcbb16 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4385,7 +4385,14 @@ static void mark_unavailable_features(X86CPU *cpu,
FeatureWord w, uint64_t mask,
return;
}
- for (i = 0; i < 64; ++i) {
+ if ((w == FEAT_14_1_EAX) && (mask & INTEL_PT_ADDR_RANGES_NUM_MASK)) {
+ warn_report("%s: CPUID.14H_01H:EAX [bit 2:0]", verbose_prefix);
+ i = 3;
+ } else {
+ i = 0;
+ }
+
+ for (; i < 64; ++i) {
if ((1ULL << i) & mask) {
g_autofree char *feat_word_str = feature_word_description(f, i);
warn_report("%s: %s%s%s [bit %d]",
--
2.27.0
- [PATCH v2 0/8] Make Intel PT configurable, Xiaoyao Li, 2022/08/08
- [PATCH v2 1/8] target/i386: Print CPUID subleaf info for unsupported feature, Xiaoyao Li, 2022/08/08
- [PATCH v2 2/8] target/i386/intel-pt: Fix INTEL_PT_ADDR_RANGES_NUM_MASK, Xiaoyao Li, 2022/08/08
- [PATCH v2 3/8] target/i386/intel-pt: Introduce FeatureWordInfo for Intel PT CPUID leaf 0xD, Xiaoyao Li, 2022/08/08
- [PATCH v2 5/8] target/i386/intel-pt: Rework/rename the default INTEL-PT feature set, Xiaoyao Li, 2022/08/08
- [PATCH v2 4/8] target/i386/intel-pt: print special message for INTEL_PT_ADDR_RANGES_NUM,
Xiaoyao Li <=
- [PATCH v2 6/8] target/i386/intel-pt: Enable host pass through of Intel PT, Xiaoyao Li, 2022/08/08
- [PATCH v2 8/8] target/i386/intel-pt: Access MSR_IA32_RTIT_ADDRn based on guest CPUID configuration, Xiaoyao Li, 2022/08/08
- [PATCH v2 7/8] target/i386/intel-pt: Define specific PT feature set for IceLake-server and Snowridge, Xiaoyao Li, 2022/08/08