mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Babu Moger <babu.moger@amd.com>,
	Sandipan Das <sandipan.das@amd.com>,
	Like Xu <like.xu.linux@gmail.com>,
	Mingwei Zhang <mizhang@google.com>
Subject: Re: [PATCH 0/2] KVM: x86/pmu: Globally enable GP counters at "RESET"
Date: Mon, 11 Mar 2024 09:25:09 +0800	[thread overview]
Message-ID: <7baff2e1-0901-4a3a-b43b-06f2de6cb50b@linux.intel.com> (raw)
In-Reply-To: <20240309013641.1413400-1-seanjc@google.com>


On 3/9/2024 9:36 AM, Sean Christopherson wrote:
> Globally enable GP counters in PERF_GLOBAL_CTRL when refreshing a vCPU's
> PMU to emulate the architecturally defined post-RESET behavior of the MSR.
>
> Extend pmu_counters_test.c to verify the behavior.
>
> Note, this is slightly different than what I "posted" before: it keeps
> PERF_GLOBAL_CTRL '0' if there are no counters.  That's technically not
> what the SDM dictates, but I went with the common sense route of
> interpreting the SDM to mean "globally enable all GP counters".
>
> I figured it was much more likely that the SDM writers didn't think
> about virtual CPUs that can have a PMU without any GP counters, versus
> Intel really wanting to set _all_ bits in PERF_GLOBAL_CTRL :-)
>
> Sean Christopherson (2):
>    KVM: x86/pmu: Set enable bits for GP counters in PERF_GLOBAL_CTRL at
>      "RESET"
>    KVM: selftests: Verify post-RESET value of PERF_GLOBAL_CTRL in PMCs
>      test
>
>   arch/x86/kvm/pmu.c                            | 16 +++++++++++++--
>   .../selftests/kvm/x86_64/pmu_counters_test.c  | 20 ++++++++++++++++++-
>   2 files changed, 33 insertions(+), 3 deletions(-)
>
>
> base-commit: 964d0c614c7f71917305a5afdca9178fe8231434

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>

Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>


  parent reply	other threads:[~2024-03-11  1:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09  1:36 Sean Christopherson
2024-03-09  1:36 ` [PATCH 1/2] KVM: x86/pmu: Set enable bits for GP counters in PERF_GLOBAL_CTRL " Sean Christopherson
2024-04-16 19:19   ` Moger, Babu
2024-03-09  1:36 ` [PATCH 2/2] KVM: selftests: Verify post-RESET value of PERF_GLOBAL_CTRL in PMCs test Sean Christopherson
2024-03-11  1:25 ` Mi, Dapeng [this message]
2024-04-09  2:01 ` [PATCH 0/2] KVM: x86/pmu: Globally enable GP counters at "RESET" 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=7baff2e1-0901-4a3a-b43b-06f2de6cb50b@linux.intel.com \
    --to=dapeng1.mi@linux.intel.com \
    --cc=babu.moger@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mizhang@google.com \
    --cc=pbonzini@redhat.com \
    --cc=sandipan.das@amd.com \
    --cc=seanjc@google.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

all inboxes | Powered by JetHome®