diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2019-03-05 05:30:01 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2019-04-26 09:08:17 +0200 |
commit | cdd6ad3ac63d2fa320baefcf92a02a918375c30f (patch) | |
tree | 0f4c98d67883cf3dfa08cd2731d3a9497ea4ccf7 /include/linux/kvm_host.h | |
parent | 8ec2fa52eac53bff7ef1cedbc4ad8af650ec937c (diff) | |
download | linux-cdd6ad3ac63d2fa320baefcf92a02a918375c30f.tar.gz linux-cdd6ad3ac63d2fa320baefcf92a02a918375c30f.tar.bz2 linux-cdd6ad3ac63d2fa320baefcf92a02a918375c30f.zip |
KVM: polling: add architecture backend to disable polling
There are cases where halt polling is unwanted. For example when running
KVM on an over committed LPAR we rather want to give back the CPU to
neighbour LPARs instead of polling. Let us provide a callback that
allows architectures to disable polling.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9d55c63db09b..b3aff1a3f633 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1305,6 +1305,16 @@ static inline bool vcpu_valid_wakeup(struct kvm_vcpu *vcpu) } #endif /* CONFIG_HAVE_KVM_INVALID_WAKEUPS */ +#ifdef CONFIG_HAVE_KVM_NO_POLL +/* Callback that tells if we must not poll */ +bool kvm_arch_no_poll(struct kvm_vcpu *vcpu); +#else +static inline bool kvm_arch_no_poll(struct kvm_vcpu *vcpu) +{ + return false; +} +#endif /* CONFIG_HAVE_KVM_NO_POLL */ + #ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg); |