summaryrefslogtreecommitdiffstats
path: root/include/kvm/arm_pmu.h
diff options
context:
space:
mode:
authorShannon Zhao2016-01-11 15:46:15 +0100
committerMarc Zyngier2016-02-29 19:34:21 +0100
commit808e738142e7086ef793ebf9797099c392894e65 (patch)
tree38c6f338451aca94c326fe5991fbf7fa13aeccc7 /include/kvm/arm_pmu.h
parentarm64: KVM: Free perf event of PMU when destroying vcpu (diff)
downloadkernel-qcow2-linux-808e738142e7086ef793ebf9797099c392894e65.tar.gz
kernel-qcow2-linux-808e738142e7086ef793ebf9797099c392894e65.tar.xz
kernel-qcow2-linux-808e738142e7086ef793ebf9797099c392894e65.zip
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/arm_pmu.h')
-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