arm64: KVM: Add access handler for PMCNTENSET and PMCNTENCLR register
authorShannon Zhao <shannon.zhao@linaro.org>
Tue, 8 Sep 2015 04:26:13 +0000 (12:26 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:20 +0000 (18:34 +0000)
commit96b0eebcc6a14e3bdb9ff0e7176fbfc225bdde94
treeafd6c0fcecda21c73164e7fee6c9bef65ee50e16
parent051ff581ce70e822729e9474941f3c206cbf7436
arm64: KVM: Add access handler for PMCNTENSET and PMCNTENCLR register

Since the reset value of PMCNTENSET and PMCNTENCLR is UNKNOWN, use
reset_unknown for its reset handler. Add a handler to emulate writing
PMCNTENSET or PMCNTENCLR register.

When writing to PMCNTENSET, call perf_event_enable to enable the perf
event. When writing to PMCNTENCLR, call perf_event_disable to disable
the perf event.

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