qemu-e2k/backends
Raphael Norwitz b8487a3578 backends/vhost-user.c: prevent using uninitialized vqs
Similar rational to: e6cc11d64f

For vhost scsi and vhost-user-scsi an issue was observed
where, of the 3 virtqueues, seabios would only set cmd,
leaving ctrl and event without a physical address.
This can caused vhost_verify_ring_part_mapping to return
ENOMEM, causing the following logs:

qemu-system-x86_64: Unable to map available ring for ring 0
qemu-system-x86_64: Verify ring failure on region 0

The issue has already been fixed elsewhere, but it was noted
that in backends/vhost-user.c, the vhost_user_backend_dev_init()
function, which other vdevs use in their realize() to initialize
their vqs, was not being properly zeroing out the queues. This
commit ensures hardware modules using the
vhost_user_backend_dev_init() API properly zero out their vqs on
initialization.

Suggested-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <1566498865-55506-2-git-send-email-raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-16 06:27:35 -04:00
..
Makefile.objs rng-builtin: add an RNG backend that uses qemu_guest_getrandom() 2019-09-04 06:32:51 -04:00
cryptodev-builtin.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
cryptodev-vhost-user.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
cryptodev-vhost.c cryptodev: add vhost support 2018-03-01 18:26:17 +02:00
cryptodev.c Include hw/boards.h a bit less 2019-08-16 13:31:53 +02:00
hostmem-file.c hostmem-file: fix pmem file size check 2019-09-03 14:39:46 -03:00
hostmem-memfd.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
hostmem-ram.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
hostmem.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
rng-builtin.c virtio-rng: change default backend to rng-builtin 2019-09-04 06:32:51 -04:00
rng-egd.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
rng-random.c VirtIO-RNG: Update default entropy source to `/dev/urandom` 2019-07-03 17:23:39 +02:00
rng.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
tpm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
vhost-user.c backends/vhost-user.c: prevent using uninitialized vqs 2019-09-16 06:27:35 -04:00