diff options
| author | Christoffer Dall <christoffer.dall@linaro.org> | 2017-02-01 06:51:52 -0500 |
|---|---|---|
| committer | Christoffer Dall <cdall@linaro.org> | 2017-04-09 10:49:39 -0400 |
| commit | 3dbbdf78636e66094d82c4df496c54ff6ae46e31 (patch) | |
| tree | 968dce0cdf805eda9e658abfc6186748666c5f63 /include/kvm | |
| parent | d9e1397783765a275c3a7930250dcdb7e9480d7d (diff) | |
KVM: arm/arm64: Report PMU overflow interrupts to userspace irqchip
When not using an in-kernel VGIC, but instead emulating an interrupt
controller in userspace, we should report the PMU overflow status to
that userspace interrupt controller using the KVM_CAP_ARM_USER_IRQ
feature.
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include/kvm')
| -rw-r--r-- | include/kvm/arm_pmu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index 92e7e97ca8ff..1ab4633adf4f 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h | |||
| @@ -50,6 +50,8 @@ void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val); | |||
| 50 | void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val); | 50 | void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val); |
| 51 | void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu); | 51 | void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu); |
| 52 | void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu); | 52 | void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu); |
| 53 | bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu); | ||
| 54 | void kvm_pmu_update_run(struct kvm_vcpu *vcpu); | ||
| 53 | void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val); | 55 | void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val); |
| 54 | void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val); | 56 | void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val); |
| 55 | void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data, | 57 | void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data, |
| @@ -85,6 +87,11 @@ static inline void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val) {} | |||
| 85 | static inline void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val) {} | 87 | static inline void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val) {} |
| 86 | static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {} | 88 | static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {} |
| 87 | static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {} | 89 | static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {} |
| 90 | static inline bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu) | ||
| 91 | { | ||
| 92 | return false; | ||
| 93 | } | ||
| 94 | static inline void kvm_pmu_update_run(struct kvm_vcpu *vcpu) {} | ||
| 88 | static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {} | 95 | static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {} |
| 89 | static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {} | 96 | static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {} |
| 90 | static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, | 97 | static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, |
