[libvirt] [PATCH] qemu: hotplug: ensure address generation for vfio-ccw

Ján Tomko jtomko at redhat.com
Tue Nov 12 09:47:26 UTC 2019


On Mon, Oct 28, 2019 at 09:06:13AM +0100, Bjoern Walk wrote:
>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 at linux.ibm.com>
>Signed-off-by: Bjoern Walk <bwalk at 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)

vfio-ccw is not really a virtio device, is it?

Jano

>+            return -1;
>+        break;
>     case VIR_MDEV_MODEL_TYPE_LAST:
>         break;
>     }
>-- 
>2.21.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191112/08ec9ea7/attachment-0001.sig>


More information about the libvir-list mailing list