aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorNikolay Nikolaev <n.nikolaev@virtualopensystems.com>2014-05-27 15:03:35 +0300
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 16:41:54 +0300
commit69e03ae64ba01c4846425fb13e494bce3eedfa6b (patch)
tree46132c9d7295857aee9ca9b49b99ee0d4042599c /kvm-all.c
parentf57fcf706342f8545d77a538c4319b752511f672 (diff)
Add kvm_eventfds_enabled function
Add a function to check if the eventfd capability is present in KVM in the host kernel. Signed-off-by: Antonios Motakis <a.motakis@virtualopensystems.com> Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 4e19eff0ef..92f56d8a31 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -113,6 +113,7 @@ KVMState *kvm_state;
bool kvm_kernel_irqchip;
bool kvm_async_interrupts_allowed;
bool kvm_halt_in_kernel_allowed;
+bool kvm_eventfds_allowed;
bool kvm_irqfds_allowed;
bool kvm_msi_via_irqfd_allowed;
bool kvm_gsi_routing_allowed;
@@ -1541,6 +1542,9 @@ int kvm_init(MachineClass *mc)
(kvm_check_extension(s, KVM_CAP_READONLY_MEM) > 0);
#endif
+ kvm_eventfds_allowed =
+ (kvm_check_extension(s, KVM_CAP_IOEVENTFD) > 0);
+
ret = kvm_arch_init(s);
if (ret < 0) {
goto err;