]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: validate: Don't check bus type in qemuValidateDomainDeviceDefDiskIOThreads
authorPeter Krempa <pkrempa@redhat.com>
Thu, 10 Jun 2021 14:43:36 +0000 (16:43 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jun 2021 14:58:23 +0000 (16:58 +0200)
IOThreads are supported with all 3 currently supported buses which can
have virtio devices (PCI, CCW, MMIO) , so there's no need for this check.

Additionally this check was buggy in the current location as on e.g.
hotplug cases the address may not yet be assigned for the disk and thus
a bogus error would be printed.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1970277
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_validate.c

index 58565092a58d2a23ecfd69d2a2e910b568f2ae9d..382473d03b7abf84fc0beeee36d30e138ae01a5c 100644 (file)
@@ -2430,16 +2430,8 @@ static bool
 qemuValidateDomainDeviceDefDiskIOThreads(const virDomainDef *def,
                                          const virDomainDiskDef *disk)
 {
-    /* Right "type" of disk" */
     switch ((virDomainDiskBus)disk->bus) {
     case VIR_DOMAIN_DISK_BUS_VIRTIO:
-        if (disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI &&
-            disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                            _("IOThreads only available for virtio pci and "
-                              "virtio ccw disk"));
-            return false;
-        }
         break;
 
     case VIR_DOMAIN_DISK_BUS_IDE: