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 <fiuczy(a)linux.ibm.com>
Signed-off-by: Bjoern Walk <bwalk(a)linux.ibm.com>
---
src/qemu/qemu_hotplug.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index fd4bafef..7b775159 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2790,6 +2790,8 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver,
{
int ret = -1;
g_autofree char *devstr = NULL;
+ char *devName = NULL;
+ bool releaseaddr = false;
bool added = false;
bool teardowncgroup = false;
bool teardownlabel = false;
@@ -2805,6 +2807,10 @@ qemuDomainAttachMediatedDevice(virQEMUDriverPtr driver,
return -1;
break;
case VIR_MDEV_MODEL_TYPE_VFIO_CCW:
+ devName = hostdev->source.subsys.u.mdev.uuidstr;
+ if (qemuDomainEnsureVirtioAddress(&releaseaddr, vm, &dev, devName) <
0)
+ return -1;
+ break;
case VIR_MDEV_MODEL_TYPE_LAST:
break;
}
--
2.21.0