qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request
@ 2017-02-21 19:10 Alex Williamson
  2017-02-21 21:28 ` Auger Eric
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Williamson @ 2017-02-21 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: eric.auger, alex.williamson

Currently we ignore this error, report it with error_reportf_err()

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request
  2017-02-21 19:10 [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request Alex Williamson
@ 2017-02-21 21:28 ` Auger Eric
  2017-02-21 21:37   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Auger Eric @ 2017-02-21 21:28 UTC (permalink / raw)
  To: Alex Williamson, qemu-devel

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 <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

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)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request
  2017-02-21 21:28 ` Auger Eric
@ 2017-02-21 21:37   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-02-21 21:37 UTC (permalink / raw)
  To: Auger Eric, Alex Williamson, qemu-devel

On 02/21/2017 06:28 PM, Auger Eric wrote:
> 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 <alex.williamson@redhat.com>
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>
> Eric

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>
>> ---
>>  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)
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-21 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-21 19:10 [Qemu-devel] [PATCH] vfio/pci: Report errors from qdev_unplug() via device request Alex Williamson
2017-02-21 21:28 ` Auger Eric
2017-02-21 21:37   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).