qemu-trivial
[Top][All Lists]
Advanced

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

Re: [RFC PATCH] virtio: Only display errors if GUEST_ERROR is enabled


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH] virtio: Only display errors if GUEST_ERROR is enabled
Date: Thu, 10 Dec 2020 19:01:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 12/10/20 6:59 PM, Philippe Mathieu-Daudé wrote:
> 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)) {

Hmm could move the 'va_list ap;' declaration here.

> +        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;
> 




reply via email to

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