mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Add check for iothread attribute in validate controller
Let's make sure that non SCSI virtio-scsi isn't used for any type other than a virtio-scsi controller.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user