* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2020-12-10 17:28 [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
@ 2021-01-05 11:04 ` Philippe Mathieu-Daudé
2021-01-06 14:07 ` Thomas Huth
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-05 11:04 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Michael S. Tsirkin
ping?
On 12/10/20 6:28 PM, Philippe Mathieu-Daudé wrote:
> Replace I/O write error reported with error_report() by
> qemu_log_mask(GUEST_ERROR) which allow filtering.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/virtio/virtio-pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index f863f69ede4..094c36aa3ea 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -27,6 +27,7 @@
> #include "hw/qdev-properties.h"
> #include "qapi/error.h"
> #include "qemu/error-report.h"
> +#include "qemu/log.h"
> #include "qemu/module.h"
> #include "hw/pci/msi.h"
> #include "hw/pci/msix.h"
> @@ -365,8 +366,9 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> virtio_queue_set_vector(vdev, vdev->queue_sel, val);
> break;
> default:
> - error_report("%s: unexpected address 0x%x value 0x%x",
> - __func__, addr, val);
> + qemu_log_mask(LOG_GUEST_ERROR,
> + "%s: unexpected address 0x%x value 0x%x\n",
> + __func__, addr, val);
> break;
> }
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2020-12-10 17:28 [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
2021-01-05 11:04 ` Philippe Mathieu-Daudé
@ 2021-01-06 14:07 ` Thomas Huth
2021-01-08 12:02 ` Stefano Garzarella
2021-01-12 19:53 ` Laurent Vivier
3 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2021-01-06 14:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial, Michael S. Tsirkin
On 10/12/2020 18.28, Philippe Mathieu-Daudé wrote:
> Replace I/O write error reported with error_report() by
> qemu_log_mask(GUEST_ERROR) which allow filtering.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/virtio/virtio-pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index f863f69ede4..094c36aa3ea 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -27,6 +27,7 @@
> #include "hw/qdev-properties.h"
> #include "qapi/error.h"
> #include "qemu/error-report.h"
> +#include "qemu/log.h"
> #include "qemu/module.h"
> #include "hw/pci/msi.h"
> #include "hw/pci/msix.h"
> @@ -365,8 +366,9 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> virtio_queue_set_vector(vdev, vdev->queue_sel, val);
> break;
> default:
> - error_report("%s: unexpected address 0x%x value 0x%x",
> - __func__, addr, val);
> + qemu_log_mask(LOG_GUEST_ERROR,
> + "%s: unexpected address 0x%x value 0x%x\n",
> + __func__, addr, val);
> break;
> }
> }
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2020-12-10 17:28 [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
2021-01-05 11:04 ` Philippe Mathieu-Daudé
2021-01-06 14:07 ` Thomas Huth
@ 2021-01-08 12:02 ` Stefano Garzarella
2021-01-08 15:00 ` Philippe Mathieu-Daudé
2021-01-12 19:53 ` Laurent Vivier
3 siblings, 1 reply; 7+ messages in thread
From: Stefano Garzarella @ 2021-01-08 12:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-trivial, qemu-devel, Michael S. Tsirkin
On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote:
>Replace I/O write error reported with error_report() by
>qemu_log_mask(GUEST_ERROR) which allow filtering.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>---
> hw/virtio/virtio-pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>index f863f69ede4..094c36aa3ea 100644
>--- a/hw/virtio/virtio-pci.c
>+++ b/hw/virtio/virtio-pci.c
>@@ -27,6 +27,7 @@
> #include "hw/qdev-properties.h"
> #include "qapi/error.h"
> #include "qemu/error-report.h"
^
Just a little thing, could we remove this inclusion since we are not
using error_report() anymore in this file?
Anyway the patch LGTM:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>+#include "qemu/log.h"
> #include "qemu/module.h"
> #include "hw/pci/msi.h"
> #include "hw/pci/msix.h"
>@@ -365,8 +366,9 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> virtio_queue_set_vector(vdev, vdev->queue_sel, val);
> break;
> default:
>- error_report("%s: unexpected address 0x%x value 0x%x",
>- __func__, addr, val);
>+ qemu_log_mask(LOG_GUEST_ERROR,
>+ "%s: unexpected address 0x%x value 0x%x\n",
>+ __func__, addr, val);
> break;
> }
> }
>--
>2.26.2
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2021-01-08 12:02 ` Stefano Garzarella
@ 2021-01-08 15:00 ` Philippe Mathieu-Daudé
2021-01-08 15:06 ` Stefano Garzarella
0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-08 15:00 UTC (permalink / raw)
To: Stefano Garzarella; +Cc: qemu-trivial, qemu-devel, Michael S. Tsirkin
On 1/8/21 1:02 PM, Stefano Garzarella wrote:
> On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote:
>> Replace I/O write error reported with error_report() by
>> qemu_log_mask(GUEST_ERROR) which allow filtering.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> hw/virtio/virtio-pci.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>> index f863f69ede4..094c36aa3ea 100644
>> --- a/hw/virtio/virtio-pci.c
>> +++ b/hw/virtio/virtio-pci.c
>> @@ -27,6 +27,7 @@
>> #include "hw/qdev-properties.h"
>> #include "qapi/error.h"
>> #include "qemu/error-report.h"
> ^
> Just a little thing, could we remove this inclusion since we are not
> using error_report() anymore in this file?
We can't because virtio_pci_device_plugged() calls
warn_report() twice :/
> Anyway the patch LGTM:
>
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks!
Phil.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2021-01-08 15:00 ` Philippe Mathieu-Daudé
@ 2021-01-08 15:06 ` Stefano Garzarella
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Garzarella @ 2021-01-08 15:06 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: qemu-trivial, qemu-devel, Michael S. Tsirkin
On Fri, Jan 08, 2021 at 04:00:21PM +0100, Philippe Mathieu-Daudé wrote:
>On 1/8/21 1:02 PM, Stefano Garzarella wrote:
>> On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote:
>>> Replace I/O write error reported with error_report() by
>>> qemu_log_mask(GUEST_ERROR) which allow filtering.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>> hw/virtio/virtio-pci.c | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>>> index f863f69ede4..094c36aa3ea 100644
>>> --- a/hw/virtio/virtio-pci.c
>>> +++ b/hw/virtio/virtio-pci.c
>>> @@ -27,6 +27,7 @@
>>> #include "hw/qdev-properties.h"
>>> #include "qapi/error.h"
>>> #include "qemu/error-report.h"
>> ^
>> Just a little thing, could we remove this inclusion since we are not
>> using error_report() anymore in this file?
>
>We can't because virtio_pci_device_plugged() calls
>warn_report() twice :/
Of course you are right :-)
Stefano
>
>> Anyway the patch LGTM:
>>
>> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
>Thanks!
>
>Phil.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
2020-12-10 17:28 [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR) Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2021-01-08 12:02 ` Stefano Garzarella
@ 2021-01-12 19:53 ` Laurent Vivier
3 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2021-01-12 19:53 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial, Michael S. Tsirkin
Le 10/12/2020 à 18:28, Philippe Mathieu-Daudé a écrit :
> Replace I/O write error reported with error_report() by
> qemu_log_mask(GUEST_ERROR) which allow filtering.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/virtio/virtio-pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index f863f69ede4..094c36aa3ea 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -27,6 +27,7 @@
> #include "hw/qdev-properties.h"
> #include "qapi/error.h"
> #include "qemu/error-report.h"
> +#include "qemu/log.h"
> #include "qemu/module.h"
> #include "hw/pci/msi.h"
> #include "hw/pci/msix.h"
> @@ -365,8 +366,9 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
> virtio_queue_set_vector(vdev, vdev->queue_sel, val);
> break;
> default:
> - error_report("%s: unexpected address 0x%x value 0x%x",
> - __func__, addr, val);
> + qemu_log_mask(LOG_GUEST_ERROR,
> + "%s: unexpected address 0x%x value 0x%x\n",
> + __func__, addr, val);
> break;
> }
> }
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread