diff mbox

[4/4] Do not fail if eventfds are not supported

Message ID 000c01d087d1$f7c45c20$e74d1460$@samsung.com
State New
Headers show

Commit Message

Pavel Fedin May 6, 2015, 7:55 a.m. UTC
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 hw/virtio/virtio-mmio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

     }
diff mbox

Patch

diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 97a1fb0..a86c816 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -22,6 +22,7 @@ 
 #include "hw/sysbus.h"
 #include "hw/virtio/virtio.h"
 #include "qemu/host-utils.h"
+#include "sysemu/kvm.h"
 #include "hw/virtio/virtio-bus.h"
 #include "qemu/error-report.h"
 
@@ -124,7 +125,8 @@  static void virtio_mmio_start_ioeventfd(VirtIOMMIOProxy
*proxy)
     VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
     int n, r;
 
-    if (proxy->ioeventfd_disabled ||
+    if (!kvm_eventfds_enabled() ||
+        proxy->ioeventfd_disabled ||
         proxy->ioeventfd_started) {
         return;