mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
FROMGIT: KVM: arm64: Use symbolic names for the PMU versions
Instead of using a bunch of magic numbers, use the existing definitions that have been added since8673e02e58("arm64: perf: Add support for ARMv8.5-PMU 64-bit counters") Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> (cherry picked from commit8e26d11f68git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next) Signed-off-by: Will Deacon <willdeacon@google.com> Change-Id: I13e35e71ec8620676f3f946925093ec451d6e861 Bug: 178098380 Test: atest VirtualizationHostTestCases on an EL2-enabled device
This commit is contained in:
committed by
Will Deacon
parent
07f2cb0ecc
commit
a295756dff
@@ -23,11 +23,11 @@ static void kvm_pmu_stop_counter(struct kvm_vcpu *vcpu, struct kvm_pmc *pmc);
|
||||
static u32 kvm_pmu_event_mask(struct kvm *kvm)
|
||||
{
|
||||
switch (kvm->arch.pmuver) {
|
||||
case 1: /* ARMv8.0 */
|
||||
case ID_AA64DFR0_PMUVER_8_0:
|
||||
return GENMASK(9, 0);
|
||||
case 4: /* ARMv8.1 */
|
||||
case 5: /* ARMv8.4 */
|
||||
case 6: /* ARMv8.5 */
|
||||
case ID_AA64DFR0_PMUVER_8_1:
|
||||
case ID_AA64DFR0_PMUVER_8_4:
|
||||
case ID_AA64DFR0_PMUVER_8_5:
|
||||
return GENMASK(15, 0);
|
||||
default: /* Shouldn't be here, just for sanity */
|
||||
WARN_ONCE(1, "Unknown PMU version %d\n", kvm->arch.pmuver);
|
||||
|
||||
Reference in New Issue
Block a user