[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH] virtio: Only display errors if GUEST_ERROR is enabled
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH] virtio: Only display errors if GUEST_ERROR is enabled |
Date: |
Thu, 10 Dec 2020 18:59:16 +0100 |
Do not display virtio guest errors until the user request it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/virtio/virtio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index eff35fab7ce..bde0d31c5d9 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3622,9 +3622,11 @@ void GCC_FMT_ATTR(2, 3) virtio_error(VirtIODevice *vdev,
const char *fmt, ...)
{
va_list ap;
- va_start(ap, fmt);
- error_vreport(fmt, ap);
- va_end(ap);
+ if (qemu_loglevel_mask(LOG_GUEST_ERROR)) {
+ va_start(ap, fmt);
+ error_vreport(fmt, ap);
+ va_end(ap);
+ }
if (virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) {
vdev->status = vdev->status | VIRTIO_CONFIG_S_NEEDS_RESET;
--
2.26.2
- [RFC PATCH] virtio: Only display errors if GUEST_ERROR is enabled,
Philippe Mathieu-Daudé <=