kvm: x86: Fix PMU virtualization for some basic events
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: x86: Update vPMCs when retiring instructionsarch/ arch/ arch/ | +35 | 8 replies | |
| 2/2 | KVM: x86: Update vPMCs when retiring branch instructionsarch/ arch/ arch/ +1 more | +39 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] kvm: x86: Fix PMU virtualization for some basic events
Google Cloud has a customer that needs accurate virtualization of two architected PMU events on Intel hardware: "instructions retired" and "branch instructions retired." The existing PMU virtualization code fails to account for instructions that are emulated by kvm.
Accurately virtualizing all PMU events for all microarchitectures is a herculean task, but there are only 8 architected events, so maybe we can at least try to get those right.
Eric Hankland wrote this code originally, but his plate is full, so I've volunteered to shepherd the changes through upstream acceptance.
Jim Mattson (2):
KVM: x86: Update vPMCs when retiring instructions
KVM: x86: Update vPMCs when retiring branch instructions
arch/x86/kvm/emulate.c | 57 +++++++++++++++++++++----------------- arch/x86/kvm/kvm_emulate.h | 1 + arch/x86/kvm/pmu.c | 31 +++++++++++++++++++++ arch/x86/kvm/pmu.h | 1 + arch/x86/kvm/vmx/nested.c | 6 +++- arch/x86/kvm/x86.c | 5 ++++ 6 files changed, 75 insertions(+), 26 deletions(-)
Signature · 1 line
2.34.0.rc1.387.gb447b232ab-goog