From: Sean Christopherson <seanjc@google.com>
To: Like Xu <like.xu.linux@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Jim Mattson <jmattson@google.com>,
kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v4 18/24] x86/pmu: Add a set of helpers related to global registers
Date: Wed, 2 Nov 2022 17:56:06 +0000 [thread overview]
Message-ID: <Y2KvNo4t6YDNwMy/@google.com> (raw)
In-Reply-To: <20221024091223.42631-19-likexu@tencent.com>
On Mon, Oct 24, 2022, Like Xu wrote:
> @@ -194,4 +197,34 @@ static inline void reset_all_counters(void)
> reset_all_fixed_counters();
> }
>
> +static inline void pmu_clear_global_status(void)
> +{
> + wrmsr(pmu.msr_global_status_clr, rdmsr(pmu.msr_global_status));
> +}
> +
> +static inline u64 pmu_get_global_status(void)
> +{
> + return rdmsr(pmu.msr_global_status);
> +}
> +
> +static inline u64 pmu_get_global_enable(void)
> +{
> + return rdmsr(pmu.msr_global_ctl);
> +}
> +
> +static inline void pmu_set_global_enable(u64 bitmask)
> +{
> + wrmsr(pmu.msr_global_ctl, bitmask);
> +}
> +
> +static inline void pmu_reset_global_enable(void)
> +{
> + wrmsr(pmu.msr_global_ctl, 0);
> +}
> +
> +static inline void pmu_ack_global_status(u64 value)
> +{
> + wrmsr(pmu.msr_global_status_clr, value);
> +}
Other, than pmu_clear_global_status(), which provides novel functionality, the
rest of these wrappers are superfluous.
next prev parent reply other threads:[~2022-11-02 17:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 9:11 [kvm-unit-tests PATCH v4 00/24] x86/pmu: Test case optimization, fixes and additions Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 01/24] x86/pmu: Add PDCM check before accessing PERF_CAP register Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 02/24] x86/pmu: Test emulation instructions on full-width counters Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 03/24] x86/pmu: Pop up FW prefix to avoid out-of-context propagation Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 04/24] x86/pmu: Report SKIP when testing Intel LBR on AMD platforms Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 05/24] x86/pmu: Fix printed messages for emulated instruction test Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 06/24] x86/pmu: Introduce __start_event() to drop all of the manual zeroing Like Xu
2022-11-02 17:41 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 07/24] x86/pmu: Introduce multiple_{one, many}() to improve readability Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 08/24] x86/pmu: Reset the expected count of the fixed counter 0 when i386 Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 09/24] x86: create pmu group for quick pmu-scope testing Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 10/24] x86/pmu: Refine info to clarify the current support Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 11/24] x86/pmu: Update rdpmc testcase to cover #GP path Like Xu
2022-11-02 17:42 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 12/24] x86/pmu: Rename PC_VECTOR to PMI_VECTOR for better readability Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 13/24] x86/pmu: Add lib/x86/pmu.[c.h] and move common code to header files Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 14/24] x86/pmu: Read cpuid(10) in the pmu_init() to reduce VM-Exit Like Xu
2022-11-02 17:45 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 15/24] x86/pmu: Initialize PMU perf_capabilities at pmu_init() Like Xu
2022-11-02 17:45 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 16/24] x86/pmu: Add GP counter related helpers Like Xu
2022-11-02 17:54 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 17/24] x86/pmu: Add GP/Fixed counters reset helpers Like Xu
2022-11-02 17:55 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 18/24] x86/pmu: Add a set of helpers related to global registers Like Xu
2022-11-02 17:56 ` Sean Christopherson [this message]
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 19/24] x86: Add tests for Guest Processor Event Based Sampling (PEBS) Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 20/24] x86/pmu: Add global helpers to cover Intel Arch PMU Version 1 Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 21/24] x86/pmu: Add gp_events pointer to route different event tables Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 22/24] x86/pmu: Add nr_gp_counters to limit the number of test counters Like Xu
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 23/24] x86/pmu: Update testcases to cover AMD PMU Like Xu
2022-11-02 17:58 ` Sean Christopherson
2022-11-02 20:10 ` Sean Christopherson
2022-10-24 9:12 ` [kvm-unit-tests PATCH v4 24/24] x86/pmu: Add AMD Guest PerfMonV2 testcases Like Xu
2022-11-02 18:35 ` [kvm-unit-tests PATCH v4 00/24] x86/pmu: Test case optimization, fixes and additions Sean Christopherson
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=Y2KvNo4t6YDNwMy/@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu.linux@gmail.com \
--cc=pbonzini@redhat.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;
as well as URLs for NNTP newsgroup(s).