Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-26 Thread Mike Rapoport
On Tue, Nov 26, 2019 at 05:40:26PM +0100, Christoph Hellwig wrote: > On Tue, Nov 26, 2019 at 12:26:38PM +0100, Christian Zigotzky wrote: > > Hello Christoph, > > > > The PCI TV card works with your patch! I was able to patch your Git kernel > > with the patch above. > > > > I haven't found any

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-26 Thread Robin Murphy
On 2019-11-26 6:51 pm, Nicolas Saenz Julienne wrote: On Mon, 2019-11-25 at 16:33 +, Robin Murphy wrote: On 25/11/2019 7:44 am, Christoph Hellwig wrote: On Sat, Nov 23, 2019 at 09:51:08AM -0700, Nathan Chancellor wrote: Just as an FYI, this introduces a warning on arm32 allyesconfig for

Re: [PATCH v3 09/14] iommu/arm-smmu: Prevent forced unbinding of Arm SMMU drivers

2019-11-26 Thread Saravana Kannan via iommu
On Tue, Nov 26, 2019 at 1:13 AM John Garry wrote: > > On 21/11/2019 11:49, Will Deacon wrote: > > Forcefully unbinding the Arm SMMU drivers is a pretty dangerous operation, > > since it will likely lead to catastrophic failure for any DMA devices > > mastering through the SMMU being unbound. When

Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-26 Thread Nicolas Saenz Julienne
On Mon, 2019-11-25 at 16:33 +, Robin Murphy wrote: > On 25/11/2019 7:44 am, Christoph Hellwig wrote: > > On Sat, Nov 23, 2019 at 09:51:08AM -0700, Nathan Chancellor wrote: > > > Just as an FYI, this introduces a warning on arm32 allyesconfig for me: > > > > I think the dma_limit argument to

[PATCH v4] iommu: fix KASAN use-after-free in iommu_insert_resv_region

2019-11-26 Thread Eric Auger
In case the new region gets merged into another one, the nr list node is freed. Checking its type while completing the merge algorithm leads to a use-after-free. Use new->type instead. Fixes: 4dbd258ff63e ("iommu: Revisit iommu_insert_resv_region() implementation") Signed-off-by: Eric Auger

[PATCH v3 2/2] PCI: Add DMA alias quirk for PLX PEX NTB

2019-11-26 Thread James Sewart via iommu
The PLX PEX NTB forwards DMA transactions using Requester ID's that don't exist as PCI devices. The devfn for a transaction is used as an index into a lookup table storing the origin of a transaction on the other side of the bridge. This patch aliases all possible devfn's to the NTB device so

[PATCH v3 1/2] PCI: Add helper pci_add_dma_alias_range

2019-11-26 Thread James Sewart via iommu
pci_add_dma_alias_range can be used to create a dma alias for range of devfns. Reviewed-by: Logan Gunthorpe Signed-off-by: James Sewart --- drivers/pci/pci.c | 30 +++--- include/linux/pci.h | 1 + 2 files changed, 24 insertions(+), 7 deletions(-) diff --git

Re: [PATCH v2] PCI: Add DMA alias quirk for PLX PEX NTB

2019-11-26 Thread Christoph Hellwig
> +int _pci_add_dma_alias_range(struct pci_dev *dev, u8 devfn_from, int len) This should be mrked static. Also single underscore prefixes are rather unusual in Linux. Either use two or use a more descriptive name. > @@ -5875,18 +5887,21 @@ int pci_set_vga_state(struct pci_dev *dev, bool >

Re: [PATCH v3] iommu: fix KASAN use-after-free in iommu_insert_resv_region

2019-11-26 Thread Jerry Snitselaar
On Tue Nov 26 19, Eric Auger wrote: In case the new region gets merged into another one, the nr list node is freed. Checking its type while completing the merge algorithm leads to a use-after-free. Use new->type instead. Fixes: 4dbd258ff63e ("iommu: Revisit iommu_insert_resv_region()

[PATCH v2] PCI: Add DMA alias quirk for PLX PEX NTB

2019-11-26 Thread James Sewart via iommu
The PLX PEX NTB forwards DMA transactions using Requester ID's that don't exist as PCI devices. The devfn for a transaction is used as an index into a lookup table storing the origin of a transaction on the other side of the bridge. Add helper pci_add_dma_alias_range that can alias a range of

Re: [PATCH v2] PCI: Add DMA alias quirk for PLX PEX NTB

2019-11-26 Thread Logan Gunthorpe
On 2019-11-26 10:03 a.m., James Sewart wrote: > The PLX PEX NTB forwards DMA transactions using Requester ID's that > don't exist as PCI devices. The devfn for a transaction is used as an > index into a lookup table storing the origin of a transaction on the > other side of the bridge. > > Add

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-26 Thread Christoph Hellwig
On Tue, Nov 26, 2019 at 12:26:38PM +0100, Christian Zigotzky wrote: > Hello Christoph, > > The PCI TV card works with your patch! I was able to patch your Git kernel > with the patch above. > > I haven't found any error messages in the dmesg yet. Thanks. Unfortunately this is a bit of a hack as

Re: [PATCH v3 1/7] linux/log2.h: Add roundup/rounddown_pow_two64() family of functions

2019-11-26 Thread Leon Romanovsky
On Tue, Nov 26, 2019 at 10:19:39AM +0100, Nicolas Saenz Julienne wrote: > Some users need to make sure their rounding function accepts and returns > 64bit long variables regardless of the architecture. Sadly > roundup/rounddown_pow_two() takes and returns unsigned longs. Create a > new generic

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-26 Thread Christian Zigotzky
On 25 November 2019 at 08:39 am, Christoph Hellwig wrote: On Sat, Nov 23, 2019 at 12:42:27PM +0100, Christian Zigotzky wrote: Hello Christoph, Please find attached the dmesg of your Git kernel. Thanks. It looks like on your platform the swiotlb buffer isn't actually addressable based on the

[PATCH v3] iommu: fix KASAN use-after-free in iommu_insert_resv_region

2019-11-26 Thread Eric Auger
In case the new region gets merged into another one, the nr list node is freed. Checking its type while completing the merge algorithm leads to a use-after-free. Use new->type instead. Fixes: 4dbd258ff63e ("iommu: Revisit iommu_insert_resv_region() implementation") Signed-off-by: Eric Auger

Re: [PATCH v3 09/14] iommu/arm-smmu: Prevent forced unbinding of Arm SMMU drivers

2019-11-26 Thread John Garry
On 21/11/2019 11:49, Will Deacon wrote: Forcefully unbinding the Arm SMMU drivers is a pretty dangerous operation, since it will likely lead to catastrophic failure for any DMA devices mastering through the SMMU being unbound. When the driver then attempts to "handle" the fatal faults, it's very

[PATCH v3 1/7] linux/log2.h: Add roundup/rounddown_pow_two64() family of functions

2019-11-26 Thread Nicolas Saenz Julienne
Some users need to make sure their rounding function accepts and returns 64bit long variables regardless of the architecture. Sadly roundup/rounddown_pow_two() takes and returns unsigned longs. Create a new generic 64bit variant of the function and cleanup rougue custom implementations.

[PATCH v3 0/7] Raspberry Pi 4 PCIe support

2019-11-26 Thread Nicolas Saenz Julienne
This series aims at providing support for Raspberry Pi 4's PCIe controller, which is also shared with the Broadcom STB family of devices. There was a previous attempt to upstream this some years ago[1] but was blocked as most STB PCIe integrations have a sparse DMA mapping[2] which is something