Commit 35c7cb4c authored by Alex Williamson's avatar Alex Williamson
Browse files

vfio/pci: Report errors from qdev_unplug() via device request



Currently we ignore this error, report it with error_reportf_err()

Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
parent 796b288f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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)