Jia He fb20fbb764 vhost: avoid to start/stop virtqueue which is not ready
In our Armv8a server, we try to configure the vhost scsi but fail
to boot up the guest (-machine virt-2.10). The guest's boot failure
is very early, even earlier than grub.

There are 3 virtqueues (ctrl, event and cmd) for virtio scsi device,
but ovmf and seabios will only set the physical address for the 3rd
one (cmd). Then in vhost_virtqueue_start(), virtio_queue_get_desc_addr
will be 0 for ctrl and event vq when qemu negotiates with ovmf. So
vhost_memory_map fails with ENOMEM.

This patch just fixs it by early quitting the virtqueue start/stop
when virtio_queue_get_desc_addr is 0.

Btw, after guest kernel starts, all the 3 queues will be initialized
and set address correctly.

Already tested on Arm64 and X86_64 qemu.

Signed-off-by: Jia He <jia.he@hxt-semitech.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-03-01 18:17:47 +02:00
..
2018-02-19 18:27:32 +01:00
2018-02-22 15:12:51 +00:00
2017-10-27 16:03:54 +02:00
2018-02-13 18:25:48 +02:00
2018-01-19 11:18:51 -02:00
2016-01-29 15:07:25 +00:00
2018-02-21 07:24:50 -05:00
2018-02-09 13:52:15 +01:00
2018-02-19 13:03:24 +02:00