qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via


From: Auger Eric
Subject: Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request
Date: Tue, 21 Feb 2017 22:28:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi Alex,

On 21/02/2017 20:10, Alex Williamson wrote:
> Currently we ignore this error, report it with error_reportf_err()
> 
> Signed-off-by: Alex Williamson <address@hidden>
Reviewed-by: Eric Auger <address@hidden>

Eric

> ---
>  hw/vfio/pci.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index 332f41d6627f..f2ba9b6cfafc 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)
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]