From: Sean Christopherson <seanjc@google.com>
To: Yang Weijiang <weijiang.yang@intel.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH v3 3/3] x86: Check platform vPMU capabilities before run lbr tests
Date: Fri, 24 Jun 2022 22:23:32 +0000 [thread overview]
Message-ID: <YrY5ZNGjyWhPJy1Z@google.com> (raw)
In-Reply-To: <20220624090828.62191-4-weijiang.yang@intel.com>
On Fri, Jun 24, 2022, Yang Weijiang wrote:
> Use new helper to check whether pmu is available and Perfmon/Debug
> capbilities are supported before read MSR_IA32_PERF_CAPABILITIES to
> avoid test failure. The issue can be captured when enable_pmu=0.
>
> Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
> ---
> lib/x86/processor.h | 2 +-
> x86/pmu_lbr.c | 32 +++++++++++++-------------------
> 2 files changed, 14 insertions(+), 20 deletions(-)
>
> diff --git a/lib/x86/processor.h b/lib/x86/processor.h
> index 70b9193..bb917b0 100644
> --- a/lib/x86/processor.h
> +++ b/lib/x86/processor.h
> @@ -193,7 +193,7 @@ static inline bool is_intel(void)
> #define X86_FEATURE_PAUSEFILTER (CPUID(0x8000000A, 0, EDX, 10))
> #define X86_FEATURE_PFTHRESHOLD (CPUID(0x8000000A, 0, EDX, 12))
> #define X86_FEATURE_VGIF (CPUID(0x8000000A, 0, EDX, 16))
> -
> +#define X86_FEATURE_PDCM (CPUID(0x1, 0, ECX, 15))
Please try to think critically about the code you're writing. All of the existing
X86_FEATURE_* definitions are organized by leaf, sub-leaf, register _and_ bit
position. And now there's X86_FEATURE_PDCM...
next prev parent reply other threads:[~2022-06-24 22:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 9:08 [kvm-unit-tests PATCH v3 0/3] Fix up test failures due to recent KVM changes Yang Weijiang
2022-06-24 9:08 ` [PATCH v3 1/3] x86: Don't overwrite bits 11 and 12 of MSR_IA32_MISC_ENABLE Yang Weijiang
2022-06-24 9:08 ` [PATCH v3 2/3] x86: Skip perf related tests when platform cannot support Yang Weijiang
2022-06-24 22:08 ` Sean Christopherson
2022-06-25 6:34 ` Yang, Weijiang
2022-06-24 9:08 ` [PATCH v3 3/3] x86: Check platform vPMU capabilities before run lbr tests Yang Weijiang
2022-06-24 22:23 ` Sean Christopherson [this message]
2022-06-25 6:38 ` Yang, Weijiang
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=YrY5ZNGjyWhPJy1Z@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=weijiang.yang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox