* [PATCH 10.1?] Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available"
@ 2025-08-19 15:02 Paolo Bonzini
2025-08-19 15:04 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2025-08-19 15:02 UTC (permalink / raw)
To: qemu-devel
Cc: stefanha, Christian A. Ehrhardt, Daniel P. Berrangé,
Xiaoyao Li
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.
Reported-by: Christian A. Ehrhardt <christian.ehrhardt@canonical.com>
Analyzed-by: Daniel P. Berrangé <berrange@redhat.com>
Analyzed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/cpu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 673f8583c80..6d85149e6e1 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 10.1?] Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available"
2025-08-19 15:02 [PATCH 10.1?] Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available" Paolo Bonzini
@ 2025-08-19 15:04 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2025-08-19 15:04 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, stefanha, Christian A. Ehrhardt, Xiaoyao Li
On Tue, Aug 19, 2025 at 05:02:35PM +0200, Paolo Bonzini wrote:
> 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.
>
> Reported-by: Christian A. Ehrhardt <christian.ehrhardt@canonical.com>
> Analyzed-by: Daniel P. Berrangé <berrange@redhat.com>
> Analyzed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> target/i386/cpu.c | 3 ---
> 1 file changed, 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 673f8583c80..6d85149e6e1 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -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;
> }
>
> --
> 2.50.1
>
With regards,
Daniel
--
|: 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 :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-19 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 15:02 [PATCH 10.1?] Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available" Paolo Bonzini
2025-08-19 15:04 ` Daniel P. Berrangé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.