From 35c7cb4caff66fe4c01711243d42de4445cb83e2 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Wed, 22 Feb 2017 13:19:58 -0700 Subject: vfio/pci: Report errors from qdev_unplug() via device request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we ignore this error, report it with error_reportf_err() Signed-off-by: Alex Williamson Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé --- hw/vfio/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hw/vfio') 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) -- cgit v1.2.3