Do not allow to configure queues and queue size for non-NVMe disks.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
return -1;
}
+ if ((disk->queues || disk->queue_size) &&
+ disk->bus != VIR_DOMAIN_DISK_BUS_NVME) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("queue configuration is only valid for NVMe bus"));
+ return -1;
+ }
+
break;
}
case VIR_DOMAIN_DEVICE_AUDIO:
--- /dev/null
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw' queues='4' queue_size='512'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='52:54:00:bc:85:fe'/>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ </devices>
+</domain>
DO_TEST_FAILURE("2-nvme-same-controller");
DO_TEST("sata-rotation-rate");
DO_TEST_FAILURE("disk-virtio-rotation-rate");
+ DO_TEST_FAILURE("disk-virtio-queue-opts");
/* Address allocation tests */
DO_TEST("addr-single-sata-disk");