summaryrefslogtreecommitdiff
path: root/include/kvm
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2016-01-11 17:46:15 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2016-02-29 21:34:21 +0300
commit808e738142e7086ef793ebf9797099c392894e65 (patch)
tree38c6f338451aca94c326fe5991fbf7fa13aeccc7 /include/kvm
parent5f0a714a2b63c25ffba5d832773f3ca4f0d02e21 (diff)
downloadlinux-808e738142e7086ef793ebf9797099c392894e65.tar.xz
arm64: KVM: Add a new feature bit for PMUv3
To support guest PMUv3, use one bit of the VCPU INIT feature array. Initialize the PMU when initialzing the vcpu with that bit and PMU overflow interrupt set. Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Acked-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_pmu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index 9f87d717ef84..ee62497d46f7 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -53,6 +53,7 @@ void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val);
void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val);
void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data,
u64 select_idx);
+bool kvm_arm_support_pmu_v3(void);
#else
struct kvm_pmu {
};
@@ -80,6 +81,7 @@ static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {}
static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {}
static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu,
u64 data, u64 select_idx) {}
+static inline bool kvm_arm_support_pmu_v3(void) { return false; }
#endif
#endif