]> git.proxmox.com Git - mirror_qemu.git/commit
ivshmem: Assert interrupts are set up once
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Mar 2016 18:34:36 +0000 (19:34 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 21 Mar 2016 20:29:01 +0000 (21:29 +0100)
commit3c27969b3e7397bb63f363fc8b8bc0e601542d76
treeaf5af6db71cbb1d3a9f0db4ee15707ece05a0826
parent2d1d422d1145085fdde6a90d70cbbff7103d469b
ivshmem: Assert interrupts are set up once

An interrupt is set up when the interrupt's file descriptor is
received.  Each message applies to the next interrupt vector.
Therefore, each vector cannot be set up more than once.

ivshmem_add_kvm_msi_virq() half-heartedly tries not to rely on this by
doing nothing then, but that's not going to recover from this error
should it become possible in the future.  watch_vector_notifier()
doesn't even try.

Simply assert what is the case, so we get alerted if we ever screw it
up.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1458066895-20632-22-git-send-email-armbru@redhat.com>
hw/misc/ivshmem.c