qemu: assume QEMU_CAPS_VIRTIO_SCSI_IOTHREAD

All the supported QEMU versions should have iothread support
on the virtio-scsi controllers if they are compiled in.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2022-08-25 17:29:48 +02:00
parent d8e274253a
commit efb3ca87d5

View File

@ -5301,8 +5301,6 @@ static int
qemuProcessStartValidateIOThreads(virDomainObj *vm, qemuProcessStartValidateIOThreads(virDomainObj *vm,
virQEMUCaps *qemuCaps) virQEMUCaps *qemuCaps)
{ {
size_t i;
if (vm->def->niothreadids > 0 && if (vm->def->niothreadids > 0 &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) { !virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@ -5310,20 +5308,6 @@ qemuProcessStartValidateIOThreads(virDomainObj *vm,
return -1; return -1;
} }
for (i = 0; i < vm->def->ncontrollers; i++) {
virDomainControllerDef *cont = vm->def->controllers[i];
if (cont->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI &&
cont->model == VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI &&
cont->iothread > 0 &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_SCSI_IOTHREAD)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("IOThreads for virtio-scsi not supported for "
"this QEMU"));
return -1;
}
}
return 0; return 0;
} }