Currently, virtio-scsi doesn't support any control or event message, this patch add the basic initialization.
Some backends need this feature, like dpdk.
Signed-off-by: Li Feng fengli@smartx.com --- src/hw/virtio-scsi.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c index 369c981..e16d4b0 100644 --- a/src/hw/virtio-scsi.c +++ b/src/hw/virtio-scsi.c @@ -203,8 +203,18 @@ init_virtio_scsi(void *data) } }
+ if (vp_find_vq(vp, 0, &vq) < 0 ) { + dprintf(1, "fail to find ctrl vq for virtio-scsi %pP\n", pci); + goto fail; + } + + if (vp_find_vq(vp, 1, &vq) < 0 ) { + dprintf(1, "fail to find event vq for virtio-scsi %pP\n", pci); + goto fail; + } + if (vp_find_vq(vp, 2, &vq) < 0 ) { - dprintf(1, "fail to find vq for virtio-scsi %pP\n", pci); + dprintf(1, "fail to find req vq for virtio-scsi %pP\n", pci); goto fail; }