aboutsummaryrefslogtreecommitdiff
path: root/kvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'kvm.h')
-rw-r--r--kvm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kvm.h b/kvm.h
index bfe0bf5b7b..a52b87452a 100644
--- a/kvm.h
+++ b/kvm.h
@@ -25,6 +25,7 @@
extern int kvm_allowed;
extern bool kvm_kernel_irqchip;
extern bool kvm_async_interrupt_injection;
+extern bool kvm_irqfds_allowed;
#if defined CONFIG_KVM || !defined NEED_CPU_H
#define kvm_enabled() (kvm_allowed)
@@ -38,10 +39,19 @@ extern bool kvm_async_interrupt_injection;
* (where the vcpu must be stopped at a suitable point first).
*/
#define kvm_async_interrupt_injection() (kvm_async_interrupt_injection)
+/**
+ * kvm_irqfds_enabled:
+ *
+ * Returns: true if we can use irqfds to inject interrupts into
+ * a KVM CPU (ie the kernel supports irqfds and we are running
+ * with a configuration where it is meaningful to use them).
+ */
+#define kvm_irqfds_enabled() (kvm_irqfds_allowed)
#else
#define kvm_enabled() (0)
#define kvm_irqchip_in_kernel() (false)
#define kvm_async_interrupt_injection() (false)
+#define kvm_irqfds_enabled() (false)
#endif
struct kvm_run;