]> git.proxmox.com Git - mirror_qemu.git/commit - hw/misc/ivshmem.c
ivshmem: Improve MSI irqfd error handling
authorLadi Prosek <lprosek@redhat.com>
Mon, 11 Dec 2017 07:21:09 +0000 (08:21 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 Feb 2018 13:09:24 +0000 (14:09 +0100)
commit0b88dd942073e7e65f095551d60be5dc0c8e1413
treea02fcde2fa3d23e3fdc54fed2684fa567b0d41ec
parent089fd80376196adc0274a53eb9729c3ef7ee5ae7
ivshmem: Improve MSI irqfd error handling

Adds a rollback path to ivshmem_enable_irqfd() and fixes
ivshmem_disable_irqfd() to bail if irqfd has not been enabled.

To reproduce, run:

  ivshmem-server -n 0

and QEMU with:

  -device ivshmem-doorbell,chardev=iv
  -chardev socket,path=/tmp/ivshmem_socket,id=iv

then load, unload, and load again the Windows driver, at the time of writing
available at:

https://github.com/virtio-win/kvm-guest-drivers-windows/tree/master/ivshmem

The issue is believed to have been masked by other guest drivers, notably
Linux ones, not enabling MSI-X on the device.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20171211072110.9058-4-lprosek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/misc/ivshmem.c