All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com,
	"Christian A. Ehrhardt" <christian.ehrhardt@canonical.com>,
	Xiaoyao Li <xiaoyao.li@intel.com>
Subject: Re: [PATCH 10.1?] Revert "i386/cpu: Warn about why CPUID_EXT_PDCM is not available"
Date: Tue, 19 Aug 2025 16:04:42 +0100	[thread overview]
Message-ID: <aKSSitJ-jeV8K7Ux@redhat.com> (raw)
In-Reply-To: <20250819150235.785559-1-pbonzini@redhat.com>

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 :|



      reply	other threads:[~2025-08-19 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aKSSitJ-jeV8K7Ux@redhat.com \
    --to=berrange@redhat.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiaoyao.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.