arm64: KVM: Add access handler for event type register
authorShannon Zhao <shannon.zhao@linaro.org>
Tue, 23 Feb 2016 03:11:27 +0000 (11:11 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:20 +0000 (18:34 +0000)
commit9feb21ac57d53003557ddc01f9aee496269996c7
tree9a36bbeb24394c0ec290789a71c44532149aeb98
parent7f7663587165fe1a81c3390358cb70eb7234706f
arm64: KVM: Add access handler for event type register

These kind of registers include PMEVTYPERn, PMCCFILTR and PMXEVTYPER
which is mapped to PMEVTYPERn or PMCCFILTR.

The access handler translates all aarch32 register offsets to aarch64
ones and uses vcpu_sys_reg() to access their values to avoid taking care
of big endian.

When writing to these registers, create a perf_event for the selected
event type.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/sys_regs.c