qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST


From: Stefano Garzarella
Subject: Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
Date: Fri, 8 Jan 2021 13:02:43 +0100

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






reply via email to

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