KVM: arm64: nv: More complete support for FEAT_PMUv3
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest12 patches 2 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | KVM: arm64: Rename kvm_pmu_valid_counter_mask()arch/ arch/ include/ | +12 | 0 replies | |
| 2/12 | KVM: arm64: nv: Adjust range of accessible PMCs according to HPMNarch/ arch/ include/ | +24 | 0 replies | |
| 3/12 | KVM: arm64: nv: Rename BEHAVE_FORWARD_ANYarch/ | +42 | 0 replies | |
| 4/12 | KVM: arm64: nv: Add support for describing traps that affect Host EL0arch/ | +34 | 1 reply | |
| 5/12 | KVM: arm64: nv: Reinject traps that take effect in Host EL0arch/ arch/ | +26 | 0 replies | |
| 6/12 | KVM: arm64: nv: Honor MDCR_EL2.{TPM, TPMCR} in Host EL0arch/ | +4 | 0 replies | |
| 7/12 | KVM: arm64: nv: Allow coarse-grained trap combos to use complex trapsarch/ | +2 | 0 replies | |
| 8/12 | KVM: arm64: nv: Describe trap behaviour of MDCR_EL2.HPMNarch/ | +101 | 0 replies | |
| 9/12 | KVM: arm64: nv: Advertise support for FEAT_HPMN0arch/ | +3 | 1 reply | |
| 10/12 | KVM: arm64: Add helpers to determine if PMC counts at a given ELarch/ | +28 | 0 replies | |
| 11/12 | KVM: arm64: nv: Honor NSH filter when in hyp contextarch/ | +14 | 0 replies | |
| 12/12 | KVM: arm64: nv: Reprogram PMU events affected by nested transitionarch/ arch/ include/ | +31 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/12] KVM: arm64: nv: More complete support for FEAT_PMUv3
Well, looks like that grew a bit :)
The coarse-grained traps for the PMU available at EL2 are annoyingly effective in both guest and host contexts, meaning the traps need to be evaluated for a VM's host EL0. Yuck.
First couple patches align the PMU emulation w/ the architecture, where a PMU has an implemented set of counters *and* a dynamic view of said counters based on the current context.
Patches 2-9 add support for Host EL0 traps to the NV trap infrastructure, and takes advantage of it for MDCR_EL2.{TPM, TPMCR, HPMN}.
The whole interaction of CGTs declaring their EL0-ness is a bit shaky, since it is a property of the triaged sysreg itself. I structured it this way for the mostly theoretical problem of a sysreg having multiple traps, only some of which take effect in Host EL0.
Last bit is the event filter fixes I had from before.
v1: https://lore.kernel.org/kvmarm/[email protected]/
Oliver Upton (12):
KVM: arm64: Rename kvm_pmu_valid_counter_mask()
KVM: arm64: nv: Adjust range of accessible PMCs according to HPMN
KVM: arm64: nv: Rename BEHAVE_FORWARD_ANY
KVM: arm64: nv: Add support for describing traps that affect Host EL0
KVM: arm64: nv: Reinject traps that take effect in Host EL0
KVM: arm64: nv: Honor MDCR_EL2.{TPM, TPMCR} in Host EL0
KVM: arm64: nv: Allow coarse-grained trap combos to use complex traps
KVM: arm64: nv: Describe trap behaviour of MDCR_EL2.HPMN
KVM: arm64: nv: Advertise support for FEAT_HPMN0
KVM: arm64: Add helpers to determine if PMC counts at a given EL
KVM: arm64: nv: Honor NSH filter when in hyp context
KVM: arm64: nv: Reprogram PMU events affected by nested transition
arch/arm64/include/asm/kvm_emulate.h | 5 + arch/arm64/kvm/emulate-nested.c | 319 +++++++++++++++++---------- arch/arm64/kvm/nested.c | 5 +- arch/arm64/kvm/pmu-emul.c | 97 ++++++-- arch/arm64/kvm/sys_regs.c | 12 +- include/kvm/arm_pmu.h | 12 +- 6 files changed, 311 insertions(+), 139 deletions(-)
base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba
Signature · 1 line
2.46.0.295.g3b9ea8a38a-goog