diff options
author | Alex Williamson | 2017-02-22 21:19:58 +0100 |
---|---|---|
committer | Alex Williamson | 2017-02-22 21:19:58 +0100 |
commit | 35c7cb4caff66fe4c01711243d42de4445cb83e2 (patch) | |
tree | 05ab5e83f86991b1f9cd85f30652b654633fb921 /hw/vfio/pci.c | |
parent | Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (diff) | |
download | qemu-35c7cb4caff66fe4c01711243d42de4445cb83e2.tar.gz qemu-35c7cb4caff66fe4c01711243d42de4445cb83e2.tar.xz qemu-35c7cb4caff66fe4c01711243d42de4445cb83e2.zip |
vfio/pci: Report errors from qdev_unplug() via device request
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>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r-- | hw/vfio/pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d662..f2ba9b6cfa 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -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) |