Received: from eggs.gnu.org ([208.118.235.92]:34138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZxU3-0001Aw-OL for qemu-devel@nongnu.org; Wed, 08 May 2013 02:04:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZxTs-0002nA-SR for qemu-devel@nongnu.org; Wed, 08 May 2013 02:04:11 -0400 Received: from mail-da0-x231.google.com ([2607:f8b0:400e:c00::231]:51085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZxTs-0002n1-MC for qemu-devel@nongnu.org; Wed, 08 May 2013 02:04:00 -0400 Received: by mail-da0-f49.google.com with SMTP id p5so786305dak.36 for ; Tue, 07 May 2013 23:03:59 -0700 (PDT) From: Liu Ping Fan Date: Wed, 8 May 2013 14:03:51 +0800 Message-Id: <1367993031-25463-1-git-send-email-qemulist@gmail.com> Subject: [Qemu-devel] [PATCH] vhost: make priority higher than kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , "Michael S. Tsirkin" From: Liu Ping Fan 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 --- hw/virtio/vhost.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.4.4