linux/drivers/vfio
Robin Murphy f203f7f1db vfio/type1: Give hardware MSI regions precedence
If the IOMMU driver advertises 'real' reserved regions for MSIs, but
still includes the software-managed region as well, we are currently
blind to the former and will configure the IOMMU domain to map MSIs into
the latter, which is unlikely to work as expected.

Since it would take a ridiculous hardware topology for both regions to
be valid (which would be rather difficult to support in general), we
should be safe to assume that the presence of any hardware regions makes
the software region irrelevant. However, the IOMMU driver might still
advertise the software region by default, particularly if the hardware
regions are filled in elsewhere by generic code, so it might not be fair
for VFIO to be super-strict about not mixing them. To that end, make
vfio_iommu_has_sw_msi() robust against the presence of both region types
at once, so that we end up doing what is almost certainly right, rather
than what is almost certainly wrong.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-08-10 13:11:50 -06:00
..
mdev vfio/mdev: Use a module softdep for vfio_mdev 2017-02-08 13:13:25 -07:00
pci vfio/pci: Fix handling of RC integrated endpoint PCIe capability size 2017-07-27 10:39:33 -06:00
platform vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare() 2016-11-17 08:33:20 -07:00
Kconfig vfio: Fix build break when SPAPR_TCE_IOMMU=n 2017-02-08 13:13:25 -07:00
Makefile vfio: Mediated device Core driver 2016-11-17 08:24:48 -07:00
vfio.c vfio: Remove unnecessary uses of vfio_container.group_lock 2017-07-07 15:37:38 -06:00
vfio_iommu_spapr_tce.c powerpc updates for 4.12 part 1. 2017-05-05 11:36:44 -07:00
vfio_iommu_type1.c vfio/type1: Give hardware MSI regions precedence 2017-08-10 13:11:50 -06:00
vfio_spapr_eeh.c
virqfd.c sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00