]> git.ipfire.org Git - thirdparty/qemu.git/commit
vhost_net: don't set backend for the uninitialized virtqueue
authorJason Wang <jasowang@redhat.com>
Mon, 25 Mar 2019 03:40:36 +0000 (11:40 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 17 May 2019 09:00:12 +0000 (17:00 +0800)
commit23bfaf77fa801ba30bb136de7cec47728eb02f4b
treec7ef1f748984a222eca2d7418a471bcd4c2d2ebd
parentd8276573da58e8ce78dab8c46dd660efd664bcb7
vhost_net: don't set backend for the uninitialized virtqueue

We used to set backend unconditionally, this won't work for some
guests (e.g windows driver) who may not initialize all virtqueues. For
kernel backend, this will fail since it may try to validate the rings
during setting backend.

Fixing this by simply skipping the backend set when we find desc is
not ready.

Reviewed-by: Michael S. Tsirkin<mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/vhost_net.c
hw/virtio/virtio.c
include/hw/virtio/virtio.h