Skip to content

Commit 64b8100

Browse files
reijiw-kvmMarc Zyngier
authored andcommitted
KVM: arm64: PMU: Don't advertise STALL_SLOT_{FRONTEND,BACKEND}
Don't advertise STALL_SLOT_{FRONT,BACK}END events to the guest, similar to STALL_SLOT event, as when any of these three events are implemented, all three of them should be implemented, according to the Arm ARM. Suggested-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Reiji Watanabe <reijiw@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230819043947.4100985-5-reijiw@google.com
1 parent 8c694f5 commit 64b8100

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/arm64/kvm/pmu-emul.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,12 @@ u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1)
758758
} else {
759759
val = read_sysreg(pmceid1_el0);
760760
/*
761-
* Don't advertise STALL_SLOT, as PMMIR_EL0 is handled
761+
* Don't advertise STALL_SLOT*, as PMMIR_EL0 is handled
762762
* as RAZ
763763
*/
764-
val &= ~BIT_ULL(ARMV8_PMUV3_PERFCTR_STALL_SLOT - 32);
764+
val &= ~(BIT_ULL(ARMV8_PMUV3_PERFCTR_STALL_SLOT - 32) |
765+
BIT_ULL(ARMV8_PMUV3_PERFCTR_STALL_SLOT_FRONTEND - 32) |
766+
BIT_ULL(ARMV8_PMUV3_PERFCTR_STALL_SLOT_BACKEND - 32));
765767
base = 32;
766768
}
767769

0 commit comments

Comments
 (0)