Skip to contentSkip to conversation

Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available"

PATCH In review Paolo Bonzini 2 participants 2 messages Aug 19, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available"

This reverts commit 00268e00027459abede448662f8794d78eb4b0a4. (The only conflict is in the !is_tdx_vm() part of the condition, which is safe to keep).

mark_unavailable_features() actively blocks usage of the feature, so it is a functional change, not merely a emitting warning. The commit was intended to merely warn if PDCM was enabled when the performance counters are not, so revert it.

---
 target/i386/cpu.c | 3 ---
 1 file changed, 3 deletions(-)
target/i386/cpu.c +0 -3
index 673f8583c80..6d85149e6e1 100644
@@ -8946,9 +8946,6 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
 
     /* PDCM is fixed1 bit for TDX */
     if (!cpu->enable_pmu && !is_tdx_vm()) {
-        mark_unavailable_features(cpu, FEAT_1_ECX,
-                                  env->user_features[FEAT_1_ECX] & CPUID_EXT_PDCM,
-                                  "This feature is not available due to PMU being disabled");
         env->features[FEAT_1_ECX] &= ~CPUID_EXT_PDCM;
     }
 
Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Paolo Bonzini

This reverts commit 00268e00027459abede448662f8794d78eb4b0a4. (The only conflict is in the !is_tdx_vm() part of the condition, which is safe to keep).

mark_unavailable_features() actively blocks usage of the feature, so it is a functional change, not merely a emitting warning. The commit was intended to merely warn if PDCM was enabled when the performance counters are not, so revert it.

Quoted 7 lines
---
 target/i386/cpu.c | 3 ---
 1 file changed, 3 deletions(-)
Quoted 18 lines
target/i386/cpu.c +0 -3
index 673f8583c80..6d85149e6e1 100644
@@ -8946,9 +8946,6 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
 
     /* PDCM is fixed1 bit for TDX */
     if (!cpu->enable_pmu && !is_tdx_vm()) {
-        mark_unavailable_features(cpu, FEAT_1_ECX,
-                                  env->user_features[FEAT_1_ECX] & CPUID_EXT_PDCM,
-                                  "This feature is not available due to PMU being disabled");
         env->features[FEAT_1_ECX] &= ~CPUID_EXT_PDCM;
     }
 
Signature · 1 line
2.50.1

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|