diff mbox

[v4,30/47] ivshmem: reset mask on device reset

Message ID 1443094669-4144-31-git-send-email-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau Sept. 24, 2015, 11:37 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

The interrupt mask is a state value, it should be reset, like the
interrupt status.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/misc/ivshmem.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Claudio Fontana Sept. 29, 2015, 1:40 p.m. UTC | #1
On 24.09.2015 13:37, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The interrupt mask is a state value, it should be reset, like the
> interrupt status.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  hw/misc/ivshmem.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index 3231a46..9974f25 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -620,6 +620,7 @@ static void ivshmem_reset(DeviceState *d)
>      IVShmemState *s = IVSHMEM(d);
>  
>      s->intrstatus = 0;
> +    s->intrmask = 0;
>      ivshmem_use_msix(s);
>  }
>  

Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
diff mbox

Patch

diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 3231a46..9974f25 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -620,6 +620,7 @@  static void ivshmem_reset(DeviceState *d)
     IVShmemState *s = IVSHMEM(d);
 
     s->intrstatus = 0;
+    s->intrmask = 0;
     ivshmem_use_msix(s);
 }