]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: hotplug: Setup host side of VDPA device for disk hotplug
authorPeter Krempa <pkrempa@redhat.com>
Thu, 26 Oct 2023 13:12:35 +0000 (15:12 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 27 Oct 2023 13:04:20 +0000 (15:04 +0200)
The code which opens the VDPA device and prepares it for FD passing was
not called in the hotplug code path, preventing hotplug of VDPA disks
with:

 error: internal error: argument key 'path' must not have null value

Use the new helper qemuProcessPrepareHostStorageDisk to setup the VDPA
definition.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/539
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_hotplug.c

index 1f7f5bdd26bf2cb6d0e019141d78cd94091ef3f9..fec7c4be4e8b6afbeb928fe1d8cc66b66433c27f 100644 (file)
@@ -1007,6 +1007,9 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver *driver,
     if (qemuDomainDetermineDiskChain(driver, vm, disk, NULL) < 0)
         goto cleanup;
 
+    if (qemuProcessPrepareHostStorageDisk(vm, disk) < 0)
+        goto cleanup;
+
     if (qemuHotplugAttachManagedPR(vm, disk->src, VIR_ASYNC_JOB_NONE) < 0)
         goto cleanup;