OSDN Git Service

vfio-pci: Rework MSIX setup/teardown
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 8 Oct 2012 14:45:29 +0000 (08:45 -0600)
commitfd704adc479810477606c3418aeb64a590f51fe3
treefcb445548d0da6458ca973ad1aa6628fdcb6943c
parent12af1344871aee4a8df011c3b0548f7c77332d54
vfio-pci: Rework MSIX setup/teardown

We try to do lazy initialization of MSIX since we don't actually need
to setup anything until MSIX vectors start getting used.  This leads
to problems if MSIX is enabled, but never used (we can end up trying
to re-enable INTx while it's still enabled).  We also run into
problems trying to expand our reset function to tear down interrupts
as we can then get vector release notifications after we've released
data structures.  By making explicit initialization and teardown we
can avoid both of these problems and behave more similar to bare
metal.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio_pci.c