xqemu/hw/vfio
Eric Auger 58892b447f hw/vfio/platform: irqfd setup sequence update
With current implementation, eventfd VFIO signaling is first set up and
then irqfd is setup, if supported and allowed.

This start sequence causes several issues with IRQ forwarding setup
which, if supported, is transparently attempted on irqfd setup:
IRQ forwarding setup is likely to fail if the IRQ is detected as under
injection into the guest (active at irqchip level or VFIO masked).

This currently always happens because the current sequence explicitly
VFIO-masks the IRQ before setting irqfd.

Even if that masking were removed, we couldn't prevent the case where
the IRQ is under injection into the guest.

So the simpler solution is to remove this 2-step startup and directly
attempt irqfd setup. This is what this patch does.

Also in case the eventfd setup fails, there is no reason to go farther:
let's abort.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2015-10-05 12:30:12 -06:00
..
Makefile.objs vfio/pci: Split quirks to a separate file 2015-09-23 13:04:45 -06:00
calxeda-xgmac.c hw/vfio/platform: calxeda xgmac device 2015-06-09 08:17:17 -06:00
common.c vfio: Change polarity of our no-mmap option 2015-09-23 13:04:44 -06:00
pci-quirks.c vfio/pci: Remove use of g_malloc0_n() from quirks 2015-09-23 21:27:17 -06:00
pci.c vfio/pci: Add emulated PCI IDs 2015-09-23 13:04:49 -06:00
pci.h vfio/pci: Add emulated PCI IDs 2015-09-23 13:04:49 -06:00
platform.c hw/vfio/platform: irqfd setup sequence update 2015-10-05 12:30:12 -06:00