From: Anselm Busse <abusse@amazon.com>
To: unlisted-recipients:; (no To-header on input)
Cc: <dwmw@amazon.co.uk>, <hborghor@amazon.de>, <sironi@amazon.de>,
"Anselm Busse" <abusse@amazon.com>,
Sean Christopherson <seanjc@google.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH 0/2] KVM support for Intel PMU v5 fixed function PMC bitmap
Date: Thu, 27 Apr 2023 09:53:31 +0000 [thread overview]
Message-ID: <20230427095333.35038-1-abusse@amazon.com> (raw)
Starting with v5, the Intel PMU allows to indicate the available fixed
function PMCs not only through CPUID.0AH.EDX[4:0] but also through a
bit mask in CPUID.0AH.ECX. According to the SDM the OS can consider a
fix function PMC i supported for:
CPUID.0AH.ECX[i] || (CPUID.0AH.EDX[4:0] > i)
This behavior is already supported by the Intel PMU driver. However, KVM
support is missing. This patch series add the support by first
refactoring the tracking of available fixed function PMCs in KVM from a
number to a bitmap in the frist patch. The second patch populates the
bitmap accoring to the rule given by the SDM mentioned above.
Regards,
Anselm
Anselm Busse (2):
KVM: vmx/pmu: Indicate available fixed function PMCs through a bitmap
KVM: vmx/pmu: Add support for selected fixed vPMU enablement for PMU v5
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kvm/pmu.h | 6 ++---
arch/x86/kvm/svm/pmu.c | 2 +-
arch/x86/kvm/vmx/pmu_intel.c | 40 ++++++++++++++++++++-------------
4 files changed, 30 insertions(+), 20 deletions(-)
base-commit: 0cfd8703e7da687924371e9bc77a025bdeba9637
--
2.39.2
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
next reply other threads:[~2023-04-27 9:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 9:53 Anselm Busse [this message]
2023-04-27 9:53 ` [PATCH 1/2] KVM: vmx/pmu: Indicate available fixed function PMCs through a bitmap Anselm Busse
2023-05-25 22:35 ` Sean Christopherson
2023-04-27 9:53 ` [PATCH 2/2] KVM: vmx/pmu: Add support for selected fixed vPMU enablement for PMU v5 Anselm Busse
2023-05-16 13:29 ` [PATCH 0/2] KVM support for Intel PMU v5 fixed function PMC bitmap Like Xu
2023-05-25 22:30 ` 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=20230427095333.35038-1-abusse@amazon.com \
--to=abusse@amazon.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=hborghor@amazon.de \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=sironi@amazon.de \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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