qemu: command: Make vhost-scsi device string depend on address

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>
This commit is contained in:
Cole Robinson 2019-01-22 14:20:06 -05:00
parent 0ba9786d8a
commit 5ac9889a69

View 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");