aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_pmu.h
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-06-18 16:01:53 +0800
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 18:34:19 +0000
commitab9468340d2bcc2a837b8b536fa819a0fc05a32e (patch)
treed9e22dc177d720d7ddaa6b403a44b57d907abfdc /include/kvm/arm_pmu.h
parentarm64: KVM: Define PMU data structure for each vcpu (diff)
downloadlinux-dev-ab9468340d2bcc2a837b8b536fa819a0fc05a32e.tar.xz
linux-dev-ab9468340d2bcc2a837b8b536fa819a0fc05a32e.zip
arm64: KVM: Add access handler for PMCR register
Add reset handler which gets host value of PMCR_EL0 and make writable bits architecturally UNKNOWN except PMCR.E which is zero. Add an access handler for PMCR. 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>
Diffstat (limited to 'include/kvm/arm_pmu.h')
-rw-r--r--include/kvm/arm_pmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 3c2fd568e0a8..8157fe5bcbb0 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -34,9 +34,13 @@ struct kvm_pmu {
struct kvm_pmc pmc[ARMV8_PMU_MAX_COUNTERS];
bool ready;
};
+
+#define kvm_arm_pmu_v3_ready(v) ((v)->arch.pmu.ready)
#else
struct kvm_pmu {
};
+
+#define kvm_arm_pmu_v3_ready(v) (false)
#endif
#endif