]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Fix IOMMU table for VFIO dev
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 15 Jul 2014 07:00:55 +0000 (17:00 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 5 Aug 2014 05:41:12 +0000 (15:41 +1000)
commit4e7efb0a38771d83198bc80fb167155558be7d85
tree0a288cce8018c5a1d4ee682676c1530687f60663
parent07b2ebd1bddabfe2d327321f5d5a69bad99cb547
powerpc/powernv: Fix IOMMU table for VFIO dev

On PHB3, PCI devices can bypass IOMMU for DMA access. If we pass
through one PCI device, whose hose driver ever enable the bypass
mode, pdev->dev.archdata.dma_data.iommu_table_base isn't IOMMU
table. However, EEH needs access the IOMMU table when the device
is owned by guest.

The patch fixes pdev->dev.archdata.dma_data.iommu_table when
passing through the device to guest in pnv_pci_ioda2_set_bypass().

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/pci-ioda.c