aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2017-02-22 13:19:58 -0700
committerAlex Williamson <alex.williamson@redhat.com>2017-02-22 13:19:58 -0700
commit35c7cb4caff66fe4c01711243d42de4445cb83e2 (patch)
tree05ab5e83f86991b1f9cd85f30652b654633fb921 /hw/vfio
parent796b288f7be875045670f963ce99991b3c8e96ac (diff)
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')
-rw-r--r--hw/vfio/pci.c6
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)