]> git.proxmox.com Git - qemu.git/blobdiff - hw/virtio-net.c
vhost: force vhost off for non-MSI guests
[qemu.git] / hw / virtio-net.c
index 161f11445f25dd8462df8019a1ec8002d358ae37..671d952921ae6016892593499531a3b9b00fa3bf 100644 (file)
@@ -119,7 +119,11 @@ static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
         return;
     }
     if (!n->vhost_started) {
-        int r = vhost_net_start(tap_get_vhost_net(n->nic->nc.peer), &n->vdev);
+        int r;
+        if (!vhost_net_query(tap_get_vhost_net(n->nic->nc.peer), &n->vdev)) {
+            return;
+        }
+        r = vhost_net_start(tap_get_vhost_net(n->nic->nc.peer), &n->vdev);
         if (r < 0) {
             error_report("unable to start vhost net: %d: "
                          "falling back on userspace virtio", -r);