Mediated devices of model 'vfio-ccw' are using CCW addresses, so make sure to call the correct address preparation code for the model. Reviewed-by: Shalini Chellathurai Saroja <shalini@xxxxxxxxxxxxx> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx> Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7a1bbc7c..46d30ddd 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2446,8 +2446,15 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver, virDomainDeviceDef dev = { VIR_DOMAIN_DEVICE_HOSTDEV, { .hostdev = hostdev } }; - if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0) - return -1; + switch (hostdev->source.subsys.u.mdev.model) { + case VIR_MDEV_MODEL_TYPE_VFIO_PCI: + if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0) + return -1; + break; + case VIR_MDEV_MODEL_TYPE_VFIO_CCW: + case VIR_MDEV_MODEL_TYPE_LAST: + break; + } if (qemuHostdevPrepareMediatedDevices(driver, vm->def->name, -- 2.17.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list