KVM: x86: Add AMD Guest PerfMonV2 PMU support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest12 patches 1 replyIn review
- v11 patch 0 repliesSuperseded
Changes in v7 from the cover letter
- Massage/rewrite changelogs to use preferred style.
- Actually move PERF_GLOBAL_CTRL and friends out of pmu_intel.c.
- Move intel_pmu_has_perf_global_ctrl() to common code instead of open coding it.
- Split moving pmc_is_enabled() out to a separate patch.
- Rebase on the s/global_ovf_ctrl_mask/global_status_mask rename
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | KVM: x86/pmu: Rename global_ovf_ctrl_mask to global_status_maskarch/ arch/ | +15 | 0 replies | |
| 2/12 | KVM: x86/pmu: Move reprogram_counters() to pmu.harch/ arch/ | +12 | 0 replies | |
| 3/12 | KVM: x86/pmu: Reject userspace attempts to set reserved GLOBAL_STATUS bitsarch/ | +3 | 0 replies | |
| 4/12 | KVM: x86/pmu: Move handling PERF_GLOBAL_CTRL and friends to common x86arch/ arch/ arch/ +2 more | +86 | 0 replies | |
| 5/12 | KVM: x86/pmu: Provide Intel PMU's pmc_is_enabled() as generic x86 codearch/ arch/ arch/ +2 more | +16 | 0 replies | |
| 6/12 | KVM: x86: Explicitly zero cpuid "0xa" leaf when PMU is disabledarch/ | +1 | 0 replies | |
| 7/12 | KVM: x86/pmu: Disable vPMU if the minimum num of counters isn't metarch/ arch/ arch/ | +12 | 0 replies | |
| 8/12 | KVM: x86/pmu: Advertise PERFCTR_CORE iff the min nr of counters is metarch/ | +12 | 0 replies | |
| 9/12 | KVM: x86/pmu: Constrain the num of guest counters with kvm_pmu_caparch/ | +3 | 0 replies | |
| 10/12 | KVM: x86/cpuid: Add a KVM-only leaf to redirect AMD PerfMonV2 flagarch/ | +7 | 0 replies | |
| 11/12 | KVM: x86/svm/pmu: Add AMD PerfMonV2 supportarch/ arch/ arch/ | +72 | 0 replies | |
| 12/12 | KVM: x86/cpuid: Add AMD CPUID ExtPerfMonAndDbg leaf 0x80000022arch/ arch/ | +31 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v7 yet.
Cover letter [PATCH v7 00/12] KVM: x86: Add AMD Guest PerfMonV2 PMU support
v7 of AMD PMU v2 support. This includes the global_ovf_ctrl_mask => global_status_mask rename that I *just* posted. I really wanted to apply v6 and be done with this series, and so sent it out separately, but the code movement from pmu_intel.c to common x86 was too buggy to do in fixup.
Lightly tested (it's late, it's Friday).
v7:
- Massage/rewrite changelogs to use preferred style.
- Actually move PERF_GLOBAL_CTRL and friends out of pmu_intel.c.
- Move intel_pmu_has_perf_global_ctrl() to common code instead of open coding it.
- Split moving pmc_is_enabled() out to a separate patch.
- Rebase on the s/global_ovf_ctrl_mask/global_status_mask rename
v6: https://lore.kernel.org/all/[email protected]
v5: https://lore.kernel.org/all/[email protected]
v4: https://lore.kernel.org/kvm/[email protected]
Like Xu (11):
KVM: x86/pmu: Move reprogram_counters() to pmu.h
KVM: x86/pmu: Reject userspace attempts to set reserved GLOBAL_STATUS
bits
KVM: x86/pmu: Move handling PERF_GLOBAL_CTRL and friends to common x86
KVM: x86/pmu: Provide Intel PMU's pmc_is_enabled() as generic x86 code
KVM: x86: Explicitly zero cpuid "0xa" leaf when PMU is disabled
KVM: x86/pmu: Disable vPMU if the minimum num of counters isn't met
KVM: x86/pmu: Advertise PERFCTR_CORE iff the min nr of counters is met
KVM: x86/pmu: Constrain the num of guest counters with kvm_pmu_cap
KVM: x86/cpuid: Add a KVM-only leaf to redirect AMD PerfMonV2 flag
KVM: x86/svm/pmu: Add AMD PerfMonV2 support
KVM: x86/cpuid: Add AMD CPUID ExtPerfMonAndDbg leaf 0x80000022
Sean Christopherson (1):
KVM: x86/pmu: Rename global_ovf_ctrl_mask to global_status_mask
arch/x86/include/asm/kvm-x86-pmu-ops.h | 1 - arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/cpuid.c | 30 ++++++++- arch/x86/kvm/pmu.c | 92 +++++++++++++++++++++++--- arch/x86/kvm/pmu.h | 56 ++++++++++++++-- arch/x86/kvm/reverse_cpuid.h | 7 ++ arch/x86/kvm/svm/pmu.c | 68 +++++++++++++------ arch/x86/kvm/svm/svm.c | 19 +++++- arch/x86/kvm/vmx/nested.c | 4 +- arch/x86/kvm/vmx/pmu_intel.c | 77 ++++----------------- arch/x86/kvm/vmx/vmx.h | 12 ---- arch/x86/kvm/x86.c | 10 +++ 12 files changed, 260 insertions(+), 118 deletions(-)
base-commit: b9846a698c9aff4eb2214a06ac83638ad098f33f
Signature · 1 line
2.41.0.rc2.161.g9c6817b8e7-goog