]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vfio/pci: Report errors from qdev_unplug() via device request
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 22 Feb 2017 20:19:58 +0000 (13:19 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 22 Feb 2017 20:19:58 +0000 (13:19 -0700)
Currently we ignore this error, report it with error_reportf_err()

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/vfio/pci.c

index 332f41d6627f05e175b4a5bfbc4a77b4393f861a..f2ba9b6cfafca44cf8d16b0a13baf6bd652d95d7 100644 (file)
@@ -2506,12 +2506,16 @@ static void vfio_unregister_err_notifier(VFIOPCIDevice *vdev)
 static void vfio_req_notifier_handler(void *opaque)
 {
     VFIOPCIDevice *vdev = opaque;
+    Error *err = NULL;
 
     if (!event_notifier_test_and_clear(&vdev->req_notifier)) {
         return;
     }
 
-    qdev_unplug(&vdev->pdev.qdev, NULL);
+    qdev_unplug(&vdev->pdev.qdev, &err);
+    if (err) {
+        error_reportf_err(err, WARN_PREFIX, vdev->vbasedev.name);
+    }
 }
 
 static void vfio_register_req_notifier(VFIOPCIDevice *vdev)