vfio/pci: Report errors from qdev_unplug() via device request
PATCH 1/1 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 <[email protected]>
--- hw/vfio/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
hw/vfio/pci.c +5 -1
@@ -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)
Hi Alex,
Quoted 3 lines · Alex Williamson
Currently we ignore this error, report it with
error_reportf_err()Signed-off-by Alex Williamson <[email protected]>
Reviewed-by Eric Auger <[email protected]>
Eric
Quoted 27 lines
--- hw/vfio/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)hw/vfio/pci.c +5
-1@@ -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)
Philippe Mathieu-Daudé
Reviewed-byQuoted 9 lines · Auger Eric
Hi Alex,
Quoted 3 lines · Alex Williamson
Currently we ignore this error, report it with
error_reportf_err()Signed-off-by Alex Williamson <[email protected]>Reviewed-by Eric Auger <[email protected]>Eric
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 29 lines
Quoted 28 lines
--- hw/vfio/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)hw/vfio/pci.c +5
-1@@ -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)