From 3666d7ac6931077ce8fc4eb9c629a8b220242344 Mon Sep 17 00:00:00 2001 From: Bjoern Walk Date: Mon, 28 Oct 2019 09:06:13 +0100 Subject: [PATCH] qemu: hotplug: ensure address generation for vfio-ccw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When attaching a mediated host device of model vfio-ccw without specifying a guest-address, none is generated by libvirt. Let's fix this and make sure to generate a device address during live-hotplug. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk Signed-off-by: Ján Tomko Reviewed-by: Ján Tomko --- src/qemu/qemu_hotplug.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 374c85042d..811ad952c5 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2799,7 +2799,13 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver, if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0) return -1; break; - case VIR_MDEV_MODEL_TYPE_VFIO_CCW: + case VIR_MDEV_MODEL_TYPE_VFIO_CCW: { + const char *devName = hostdev->source.subsys.u.mdev.uuidstr; + bool releaseaddr = false; + + if (qemuDomainEnsureVirtioAddress(&releaseaddr, vm, &dev, devName) < 0) + return -1; + } break; case VIR_MDEV_MODEL_TYPE_LAST: break; } -- GitLab