qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting s


From: Keith Busch
Subject: Re: [PATCH v3 4/4] hw/blocl/nvme: trigger async event during injecting smart warning
Date: Thu, 14 Jan 2021 14:29:56 -0800

On Thu, Jan 14, 2021 at 03:22:51PM +0800, zhenwei pi wrote:
> @@ -2860,6 +2887,12 @@ static void nvme_set_smart_warning(Object *obj, 
> Visitor *v, const char *name,
>      }
>  
>      s->smart_critical_warning = value;
> +
> +    /* test each bit of uint8_t for smart.critical_warning */
> +    for (event = 0; event < 8; event++) {
> +        if (value & (1 << event))
> +            nvme_enqueue_smart_event(s, 1 << event);

I think you need to save the events that have already been raised with
the host so that you don't send duplicate responses everytime a new
event is added to the 'critical_warning'.



reply via email to

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