hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 10 Dec 2020 17:28:34 +0000 (18:28 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 18 Jan 2021 10:51:26 +0000 (11:51 +0100)
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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20201210172834.178052-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/virtio/virtio-pci.c

index f863f69ede4f4bf1c09fc39a5035f04e78894c58..094c36aa3ea3aa5ebc4348aeb2bd682614546d40 100644 (file)
@@ -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;
     }
 }