diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-07-26 15:35:16 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-09 16:16:57 +0300 |
commit | f3e1bed8daa35726d2731dd2a010fb91a5bb3792 (patch) | |
tree | 320076dc4d40b033e32b6cca95d810bc36d4e98a /kvm.h | |
parent | 614e41bc26dda751321da47acb1f9cb287b52085 (diff) |
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.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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; |