device-assignment: be more selective in interrupt disabling
commit96abccb54db35e4625e0ea7b5ea72106d708e241
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 17 Jun 2010 17:51:55 +0000 (17 11:51 -0600)
committerAvi Kivity <avi@redhat.com>
Wed, 23 Jun 2010 13:05:47 +0000 (23 16:05 +0300)
treecea17228b4867e35c0aa73418986d31cfd468546
parent92af0ed74e86e6f0867df53763d3af05005db73b
device-assignment: be more selective in interrupt disabling

An 82576 physical function assigned to a Windows 7 guest currently
doesn't work because the driver seems to gratuitiously disable
MSI and MSIX interrupts.  When it does this, we blindly deassign
the current interrupt setup, leaving the device with no interrupts.
Instead let's only deassign the irq if we were previously using
MSI/MSIX or if we're going to start using MSI/MSIX.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/device-assignment.c