提交 cd8df1e6 编写于 作者: J John Ferlan

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.
上级 b61ae99b
...@@ -2598,14 +2598,6 @@ qemuCheckSCSIControllerIOThreads(const virDomainDef *domainDef, ...@@ -2598,14 +2598,6 @@ qemuCheckSCSIControllerIOThreads(const virDomainDef *domainDef,
if (!def->iothread) if (!def->iothread)
return true; 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 && if (def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) { def->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
......
...@@ -3947,6 +3947,11 @@ qemuDomainDeviceDefValidateControllerAttributes(const virDomainControllerDef *co ...@@ -3947,6 +3947,11 @@ qemuDomainDeviceDefValidateControllerAttributes(const virDomainControllerDef *co
_("'ioeventfd' is only supported by virtio-scsi controller")); _("'ioeventfd' is only supported by virtio-scsi controller"));
return -1; return -1;
} }
if (controller->iothread) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("'iothread' is only supported for virtio-scsi controller"));
return -1;
}
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册