mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
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>
This commit is contained in:
parent
796b288f7b
commit
35c7cb4caf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user