public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM support for Intel PMU v5 fixed function PMC bitmap
@ 2023-04-27  9:53 Anselm Busse
  2023-04-27  9:53 ` [PATCH 1/2] KVM: vmx/pmu: Indicate available fixed function PMCs through a bitmap Anselm Busse
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Anselm Busse @ 2023-04-27  9:53 UTC (permalink / raw)
  Cc: dwmw, hborghor, sironi, Anselm Busse, Sean Christopherson,
	Paolo Bonzini, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, kvm, linux-kernel

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-25 22:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-27  9:53 [PATCH 0/2] KVM support for Intel PMU v5 fixed function PMC bitmap Anselm Busse
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox