vhost-net: fix reversed logic in mask notifiers
commitaa22e82eaef365c65898cfbf0e9398cff571902d
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 25 May 2010 14:00:43 +0000 (25 17:00 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 27 May 2010 13:54:31 +0000 (27 16:54 +0300)
treed0f91ec6de966e6b348275da9c252a92a264c5d8
parent413ce615484153757e5b974676beac32b6cb7750
vhost-net: fix reversed logic in mask notifiers

When guest notifier is assigned, we set mask notifier,
which will assign kvm irqfd.
When guest notifier is unassigned, mask notifier is unset,
which should unassign kvm irqfd.

The way to do this is to call mask notifier telling it to mask the vector.
This, unless vector is already masked which unassigns irqfd already.

The logic in unassign was reversed, which left kvm irqfd assigned.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Reported-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/msix.c