mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
i386/cpu: Warn about why CPUID_EXT_PDCM is not available
When user requests PDCM explicitly via "+pdcm" without PMU enabled, emit a warning to inform the user. Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250304052450.465445-3-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
e68ec29809
commit
00268e0002
@@ -8339,6 +8339,9 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
|
||||
}
|
||||
|
||||
if (!cpu->enable_pmu) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user