Skip to content

KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems

Reiji Watanabe kvm kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: PMU: Introduce pmu_v3_is_supported() helperarch/arm64/kvm/pmu-emul.c arch/arm64/kvm/sys_regs.c include/kvm/arm_pmu.h+10 -31 reply
2/2KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systemsarch/arm64/kvm/arm.c arch/arm64/kvm/pmu-emul.c include/kvm/arm_pmu.h+11 -32 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems

On systems where the PMUVer is not uniform across all PEs, KVM currently does not advertise PMUv3 to the guests, even if userspace successfully runs KVM_ARM_VCPU_INIT with KVM_ARM_VCPU_PMU_V3.

In such systems, KVM should either disallow userspace from configuring vPMU, or advertise PMUv3 to the guest. This series addresses this inconsistent behavior by implementing the former, as such systems would be extremely uncommon and unlikely to even use KVM (according to Marc [1]).

The series is based on v6.4-rc5.

[1] https://lore.kernel.org/all/[email protected]/

Reiji Watanabe (2):
KVM: arm64: PMU: Introduce pmu_v3_is_supported() helper
KVM: arm64: PMU: Disallow vPMU on non-uniform PMUVer systems

 arch/arm64/kvm/arm.c      |  1 +
 arch/arm64/kvm/pmu-emul.c |  6 +-----
 arch/arm64/kvm/sys_regs.c |  2 +-
 include/kvm/arm_pmu.h     | 18 ++++++++++++++++++
 4 files changed, 21 insertions(+), 6 deletions(-)

base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7

Signature · 1 line
2.41.0.162.gfafddb0af9-goog