diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-07-26 15:35:15 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-09 16:16:56 +0300 |
commit | 614e41bc26dda751321da47acb1f9cb287b52085 (patch) | |
tree | cebae99030003245232713e27ea8dbf342d4266b /kvm.h | |
parent | cc7e0ddf5a2307015eacfac2ac6a6a765898fcc3 (diff) | |
download | qemu-614e41bc26dda751321da47acb1f9cb287b52085.zip qemu-614e41bc26dda751321da47acb1f9cb287b52085.tar.gz qemu-614e41bc26dda751321da47acb1f9cb287b52085.tar.bz2 |
kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
Decouple another x86-specific assumption about what irqchips imply.
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 | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -26,6 +26,7 @@ extern int kvm_allowed; extern bool kvm_kernel_irqchip; extern bool kvm_async_interrupts_allowed; extern bool kvm_irqfds_allowed; +extern bool kvm_msi_via_irqfd_allowed; #if defined CONFIG_KVM || !defined NEED_CPU_H #define kvm_enabled() (kvm_allowed) @@ -50,11 +51,21 @@ extern bool kvm_irqfds_allowed; */ #define kvm_irqfds_enabled() (kvm_irqfds_allowed) +/** + * kvm_msi_via_irqfd_enabled: + * + * Returns: true if we can route a PCI MSI (Message Signaled Interrupt) + * to a KVM CPU via an irqfd. This requires that the kernel supports + * this and that we're running in a configuration that permits it. + */ +#define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_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) #endif struct kvm_run; |