]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: command: Make vhost-scsi device string depend on address
authorCole Robinson <crobinso@redhat.com>
Tue, 22 Jan 2019 19:20:06 +0000 (14:20 -0500)
committerCole Robinson <crobinso@redhat.com>
Thu, 24 Jan 2019 23:59:38 +0000 (18:59 -0500)
The vhost-scsi device string should depend on the requested
address type, not strictly on the emulated arch. This is the
same logic used by qemuBuildVirtioDevStr, and this particular
path is already tested in the hostdev-scsi-vhost-scsi-ccw tests

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_command.c

index bbc85e75f06dc54e6c4de97f7c8f2362bcd31863..a1d991cefc0ceaf990cad1bbf14182f50f8feb43 100644 (file)
@@ -4925,7 +4925,7 @@ qemuBuildSCSIVHostHostdevDevStr(const virDomainDef *def,
         goto cleanup;
     }
 
-    if (ARCH_IS_S390(def->os.arch))
+    if (dev->info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW)
         virBufferAddLit(&buf, "vhost-scsi-ccw");
     else
         virBufferAddLit(&buf, "vhost-scsi-pci");