]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch kvm-arm64/nv-pmu into kvmarm/next
authorOliver Upton <oliver.upton@linux.dev>
Mon, 11 Nov 2024 18:48:49 +0000 (18:48 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 11 Nov 2024 18:49:02 +0000 (18:49 +0000)
* kvm-arm64/nv-pmu:
  : Support for vEL2 PMU controls
  :
  : Align the vEL2 PMU support with the current state of non-nested KVM,
  : including:
  :
  :  - Trap routing, with the annoying complication of EL2 traps that apply
  :    in Host EL0
  :
  :  - PMU emulation, using the correct configuration bits depending on
  :    whether a counter falls in the hypervisor or guest range of PMCs
  :
  :  - Perf event swizzling across nested boundaries, as the event filtering
  :    needs to be remapped to cope with vEL2
  KVM: arm64: nv: Reprogram PMU events affected by nested transition
  KVM: arm64: nv: Apply EL2 event filtering when in hyp context
  KVM: arm64: nv: Honor MDCR_EL2.HLP
  KVM: arm64: nv: Honor MDCR_EL2.HPME
  KVM: arm64: Add helpers to determine if PMC counts at a given EL
  KVM: arm64: nv: Adjust range of accessible PMCs according to HPMN
  KVM: arm64: Rename kvm_pmu_valid_counter_mask()
  KVM: arm64: nv: Advertise support for FEAT_HPMN0
  KVM: arm64: nv: Describe trap behaviour of MDCR_EL2.HPMN
  KVM: arm64: nv: Honor MDCR_EL2.{TPM, TPMCR} in Host EL0
  KVM: arm64: nv: Reinject traps that take effect in Host EL0
  KVM: arm64: nv: Rename BEHAVE_FORWARD_ANY
  KVM: arm64: nv: Allow coarse-grained trap combos to use complex traps
  KVM: arm64: Describe RES0/RES1 bits of MDCR_EL2
  arm64: sysreg: Add new definitions for ID_AA64DFR0_EL1
  arm64: sysreg: Migrate MDCR_EL2 definition to table
  arm64: sysreg: Describe ID_AA64DFR2_EL1 fields

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1  2 
arch/arm64/include/asm/kvm_arm.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/emulate-nested.c
arch/arm64/kvm/nested.c
arch/arm64/kvm/sys_regs.c
arch/arm64/tools/sysreg

Simple merge
Simple merge
index e316bea9825ca3fdb9377bf2b43125154a2af582,725b5cd18ee0d5ff7c0030da429efbd06bf9633b..f333b189fb432cb683f6d6c9bcf7583f9b11e29f
@@@ -500,7 -498,7 +499,8 @@@ enum vcpu_sysreg 
  
        /* Anything from this can be RES0/RES1 sanitised */
        MARKER(__SANITISED_REG_START__),
 +      TCR2_EL2,       /* Extended Translation Control Register (EL2) */
+       MDCR_EL2,       /* Monitor Debug Configuration Register (EL2) */
  
        /* Any VNCR-capable reg goes after this point */
        MARKER(__VNCR_START__),
index 0ab0905533545b79bc290e96b94dcfd0ac67b2c9,71c97c214c1c5c63a57b8b4e9c8b9abd954446be..1ffbfd1c3cf2ecfa50284f8d4f54a22d06079ed2
@@@ -359,8 -368,14 +367,8 @@@ static const struct trap_bits coarse_tr
                .index          = MDCR_EL2,
                .value          = MDCR_EL2_TDCC,
                .mask           = MDCR_EL2_TDCC,
-               .behaviour      = BEHAVE_FORWARD_ANY,
+               .behaviour      = BEHAVE_FORWARD_RW,
        },
 -      [CGT_CPACR_E0POE] = {
 -              .index          = CPTR_EL2,
 -              .value          = CPACR_ELx_E0POE,
 -              .mask           = CPACR_ELx_E0POE,
 -              .behaviour      = BEHAVE_FORWARD_RW,
 -      },
        [CGT_CPTR_TAM] = {
                .index          = CPTR_EL2,
                .value          = CPTR_EL2_TAM,
Simple merge
Simple merge
Simple merge