aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2017-12-01 16:15:38 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-12-05 12:38:31 +0000
commit2994cb2ee244b7d6a00576b4fd178932d8b31439 (patch)
treebcdfe5a8c2051f13de3f609e9bd44e47adccbb90 /hw
parent88f714aa5a9a08bb029024c4ebd3857e3b63b7db (diff)
downloadqemu-2994cb2ee244b7d6a00576b4fd178932d8b31439.zip
qemu-2994cb2ee244b7d6a00576b4fd178932d8b31439.tar.gz
qemu-2994cb2ee244b7d6a00576b4fd178932d8b31439.tar.bz2
vhost-scsi: add missing virtqueue_size parameter
Commit 5c0919d02066 ("virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set.") introduced a new parameter to virtio-scsi. Later, commit 920036106044 ("vhost-user-scsi: add missing virtqueue_size param") added that parameter to the new vhost-user-scsi interface but neglected the existing vhost-scsi interface it was built on. Apply the same change to vhost-scsi, so that we can boot a guest with a device defined. This also avoids crashing a guest when hotplugging a vhost-scsi device. Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Message-id: 20171201151538.6844-2-farman@linux.vnet.ibm.com Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi/vhost-scsi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index cd4ab05..9c1bea8 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -233,6 +233,8 @@ static Property vhost_scsi_properties[] = {
DEFINE_PROP_STRING("wwpn", VirtIOSCSICommon, conf.wwpn),
DEFINE_PROP_UINT32("boot_tpgt", VirtIOSCSICommon, conf.boot_tpgt, 0),
DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues, 1),
+ DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSICommon, conf.virtqueue_size,
+ 128),
DEFINE_PROP_UINT32("max_sectors", VirtIOSCSICommon, conf.max_sectors,
0xFFFF),
DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSICommon, conf.cmd_per_lun, 128),