From: Alex Williamson Date: Wed, 22 Feb 2017 20:19:58 +0000 (-0700) Subject: vfio/pci: Report errors from qdev_unplug() via device request X-Git-Tag: v2.9.0-rc0~74^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35c7cb4caff66fe4c01711243d42de4445cb83e2;p=thirdparty%2Fqemu.git 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 Reviewed-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 332f41d6627..f2ba9b6cfaf 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)