arm64: KVM: PMU: Add perf event map and introduce perf event creating function
authorShannon Zhao <shannon.zhao@linaro.org>
Fri, 3 Jul 2015 06:27:25 +0000 (14:27 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:20 +0000 (18:34 +0000)
commit7f7663587165fe1a81c3390358cb70eb7234706f
tree07b2cb5d5c15e0beac3013f962cead0e6eb04303
parent96b0eebcc6a14e3bdb9ff0e7176fbfc225bdde94
arm64: KVM: PMU: Add perf event map and introduce perf event creating function

When we use tools like perf on host, perf passes the event type and the
id of this event type category to kernel, then kernel will map them to
hardware event number and write this number to PMU PMEVTYPER<n>_EL0
register. When getting the event number in KVM, directly use raw event
type to create a perf_event for it.

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>
include/kvm/arm_pmu.h
virt/kvm/arm/pmu.c