arm64: KVM: Add helper to handle PMCR register bits
authorShannon Zhao <shannon.zhao@linaro.org>
Wed, 28 Oct 2015 04:10:30 +0000 (12:10 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:21 +0000 (18:34 +0000)
commit76993739cd6f5b42e881fe3332b9f8eb98cd6907
treec2a3e47cacfff585748d69b685c6c8a2e5a390e4
parent7a0adc7064b88609e2917446af8789fac1d4fdd1
arm64: KVM: Add helper to handle PMCR register bits

According to ARMv8 spec, when writing 1 to PMCR.E, all counters are
enabled by PMCNTENSET, while writing 0 to PMCR.E, all counters are
disabled. When writing 1 to PMCR.P, reset all event counters, not
including PMCCNTR, to zero. When writing 1 to PMCR.C, reset PMCCNTR to
zero.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_perf_event.h
arch/arm64/kvm/sys_regs.c
include/kvm/arm_pmu.h
virt/kvm/arm/pmu.c