aboutsummaryrefslogtreecommitdiff
path: root/kvm.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-07-26 15:35:16 +0100
committerAvi Kivity <avi@redhat.com>2012-08-09 16:16:57 +0300
commitf3e1bed8daa35726d2731dd2a010fb91a5bb3792 (patch)
tree320076dc4d40b033e32b6cca95d810bc36d4e98a /kvm.h
parent614e41bc26dda751321da47acb1f9cb287b52085 (diff)
downloadqemu-f3e1bed8daa35726d2731dd2a010fb91a5bb3792.zip
qemu-f3e1bed8daa35726d2731dd2a010fb91a5bb3792.tar.gz
qemu-f3e1bed8daa35726d2731dd2a010fb91a5bb3792.tar.bz2
kvm: Decouple 'GSI routing' from 'kernel irqchip'
Don't assume having an in-kernel irqchip means that GSI routing is enabled. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
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 34d32c7..444ed2e 100644
--- a/kvm.h
+++ b/kvm.h
@@ -27,6 +27,7 @@ extern bool kvm_kernel_irqchip;
extern bool kvm_async_interrupts_allowed;
extern bool kvm_irqfds_allowed;
extern bool kvm_msi_via_irqfd_allowed;
+extern bool kvm_gsi_routing_allowed;
#if defined CONFIG_KVM || !defined NEED_CPU_H
#define kvm_enabled() (kvm_allowed)
@@ -60,12 +61,21 @@ extern bool kvm_msi_via_irqfd_allowed;
*/
#define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_allowed)
+/**
+ * kvm_gsi_routing_enabled:
+ *
+ * Returns: true if GSI routing is enabled (ie the kernel supports
+ * it and we're running in a configuration that permits it).
+ */
+#define kvm_gsi_routing_enabled() (kvm_gsi_routing_allowed)
+
#else
#define kvm_enabled() (0)
#define kvm_irqchip_in_kernel() (false)
#define kvm_async_interrupts_enabled() (false)
#define kvm_irqfds_enabled() (false)
#define kvm_msi_via_irqfd_enabled() (false)
+#define kvm_gsi_routing_allowed() (false)
#endif
struct kvm_run;