diff mbox

vhost: make priority higher than kvm

Message ID 1367993031-25463-1-git-send-email-qemulist@gmail.com
State New
Headers show

Commit Message

pingfan liu May 8, 2013, 6:03 a.m. UTC
From: Liu Ping Fan <pingfank@linux.vnet.ibm.com>

vhost should have high priority than kvm.
Take the following scenario:
  kvm_region_add earlier before vhost_region_add, then vring's desc[i]
can refer addressX known by guest, and then used by guest. But vhost
does not know this yet, and the vring handler will fail.

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
 hw/virtio/vhost.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index fbabf99..91c313b 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -856,7 +856,7 @@  int vhost_dev_init(struct vhost_dev *hdev, int devfd, const char *devpath,
         .log_global_stop = vhost_log_global_stop,
         .eventfd_add = vhost_eventfd_add,
         .eventfd_del = vhost_eventfd_del,
-        .priority = 10
+        .priority = 9
     };
     hdev->mem = g_malloc0(offsetof(struct vhost_memory, regions));
     hdev->n_mem_sections = 0;