linux/arch/powerpc/platforms
Gaurav Batra 1f7aacc5eb powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device
For an SR-IOV device, while enabling DDW, a new table is created and
added at index 1 in the group. In the below 2 scenarios, the table is
incorrectly referenced at index 0 (which is where the table is for
default DMA window).

1. When adding DDW

   This issue is exposed with "slub_debug". Error thrown out from
   dma_iommu_dma_supported()

   Warning: IOMMU offset too big for device mask
   mask: 0xffffffff, table offset: 0x800000000000000

2. During Dynamic removal of the PCI device.

   Error is from iommu_tce_table_put() since a NULL table pointer is
   passed in.

Fixes: 381ceda88c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Gaurav Batra <gbatra@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230505184701.91613-1-gbatra@linux.vnet.ibm.com
2023-05-17 00:54:55 +10:00
..
4xx powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
8xx powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
40x powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
44x powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
52xx powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
82xx powerpc: drop MPC8272-ADS and PowerQUICC II FADS shared code. 2023-04-20 13:21:48 +10:00
83xx powerpc updates for 6.4 2023-04-28 16:24:32 -07:00
85xx powerpc/85xx: p2020: Enable boards by new config option CONFIG_PPC_P2020 2023-04-20 12:23:13 +10:00
86xx powerpc: drop HPCD/MPC8610 evaluation platform support 2023-04-20 13:21:47 +10:00
512x powerpc/mpc512x: fix resource printk format warning 2023-03-30 23:35:43 +11:00
amigaone powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
book3s driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
cell powerpc: Use of_address_to_resource() 2023-04-04 22:11:03 +10:00
chrp powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
embedded6xx powerpc: drop HPC II (MPC7448) evaluation platform support. 2023-04-20 13:21:47 +10:00
maple powerpc: Use of_property_read_bool() for boolean properties 2023-03-30 23:36:35 +11:00
microwatt powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
pasemi powerpc: Use of_property_read_bool() for boolean properties 2023-03-30 23:36:35 +11:00
powermac powerpc: Use of_address_to_resource() 2023-04-04 22:11:03 +10:00
powernv powerpc/iommu: Remove iommu_del_device() 2023-05-17 00:51:06 +10:00
ps3 powerpc/platforms: Use 'compatible' property for simple cases 2023-03-15 00:52:10 +11:00
pseries powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device 2023-05-17 00:54:55 +10:00
fsl_uli1575.c powerpc/fsl_uli1575: Mark uli_exclude_device() as static 2023-04-20 10:20:50 +10:00
Kconfig powerpc/fsl_uli1575: fix kconfig warnings and build errors 2023-05-08 23:00:00 +10:00
Kconfig.cputype powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00