msix: fix msix_set/unset_mask_notifier
commit0796aacb687817aede995439126400291111fb02
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 2 Jun 2010 17:49:35 +0000 (2 20:49 +0300)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 4 Jun 2010 16:57:03 +0000 (4 13:57 -0300)
treee4b2930b489a1aaddb246043fed4725897028d06
parentd81e05c864ea1d503c1b073e7c878f435fea85dd
msix: fix msix_set/unset_mask_notifier

Sridhar Samudrala reported hitting the following assertions
in msix.c when doing a guest reboot or live migration using vhost.
qemu-kvm/hw/msix.c:375: msix_mask_all: Assertion `r >= 0' failed.
qemu-kvm/hw/msix.c:640: msix_unset_mask_notifier:
Assertion `dev->msix_mask_notifier_opaque[vector]' failed.

The issue is that we didn't clear/set the opaque pointer
when vector is masked. The following patch fixes this.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
hw/msix.c