]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Add check for iothread attribute in validate controller
authorJohn Ferlan <jferlan@redhat.com>
Fri, 8 Dec 2017 19:03:54 +0000 (14:03 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 2 Feb 2018 19:35:26 +0000 (14:35 -0500)
Let's make sure that non SCSI virtio-scsi isn't used for any type
other than a virtio-scsi controller.

src/qemu/qemu_command.c
src/qemu/qemu_domain.c

index 8227b9a65294aaf0e20c4fdf3c03fda84126c199..8d7e4daa866d47931f50507c61af6f0751deae69 100644 (file)
@@ -2598,14 +2598,6 @@ qemuCheckSCSIControllerIOThreads(const virDomainDef *domainDef,
     if (!def->iothread)
         return true;
 
-    if (def->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                       _("IOThreads only supported for virtio-scsi "
-                         "controllers model is '%s'"),
-                       virDomainControllerModelSCSITypeToString(def->model));
-        return false;
-    }
-
     if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
         def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
index 152718c0d7b1302ea04e65a5f0beae8e98dff3ac..0a9f9203195d640a7947771d74257f5dcdab97f9 100644 (file)
@@ -3947,6 +3947,11 @@ qemuDomainDeviceDefValidateControllerAttributes(const virDomainControllerDef *co
                            _("'ioeventfd' is only supported by virtio-scsi controller"));
             return -1;
         }
+        if (controller->iothread) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+                           _("'iothread' is only supported for virtio-scsi controller"));
+            return -1;
+        }
     }
 
     return 0;