Re: [PATCH v2] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-23 Thread Suravee Suthikulpanit
On 1/24/20 5:32 AM, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan --- Changes since v1: -- Fix bug in sucessful return

[PATCH AUTOSEL 5.4 14/33] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping

2020-01-23 Thread Sasha Levin
From: Logan Gunthorpe [ Upstream commit 3c124435e8dd516df4b2fc983f4415386fd6edae ] Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware. See commit

[PATCH AUTOSEL 4.19 03/11] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping

2020-01-23 Thread Sasha Levin
From: Logan Gunthorpe [ Upstream commit 3c124435e8dd516df4b2fc983f4415386fd6edae ] Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware. See commit

[PATCH AUTOSEL 5.4 13/33] iommu/amd: Support multiple PCI DMA aliases in device table

2020-01-23 Thread Sasha Levin
From: Logan Gunthorpe [ Upstream commit 3332364e4ebc0581d133a334645a20fd13b580f1 ] Non-Transparent Bridge (NTB) devices (among others) may have many DMA aliases seeing the hardware will send requests with different device ids depending on their origin across the bridged hardware. See commit

[PATCH v2] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-23 Thread Shuah Khan
init_iommu_perf_ctr() clobbers the register when it checks write access to IOMMU perf counters and fails to restore when they are writable. Add save and restore to fix it. Signed-off-by: Shuah Khan --- Changes since v1: -- Fix bug in sucessful return path. Add a return instead of fall

Re: [PATCH] iommu: amd: Fix IOMMU perf counter clobbering during init

2020-01-23 Thread Shuah Khan
On 1/21/20 8:32 AM, Shuah Khan wrote: On 1/20/20 7:10 PM, Suravee Suthikulpanit wrote: On 1/17/2020 5:08 PM, Joerg Roedel wrote: Adding Suravee, who wrote the IOMMU Perf Counter code. On Tue, Jan 14, 2020 at 08:12:20AM -0700, Shuah Khan wrote: init_iommu_perf_ctr() clobbers the register when

Re: [PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver

2020-01-23 Thread Robin Murphy
Hi Maxime, This looks like a pretty decent first cut of a driver, thanks! Plenty of comments, but overall it looks to be in mostly the right shape to begin with. On 22/01/2020 12:44 pm, Maxime Ripard wrote: The Allwinner H6 has introduced an IOMMU for a few DMA controllers, mostly video

Re: [PATCH v5 3/7] PCI: Introduce pci_real_dma_dev()

2020-01-23 Thread Lorenzo Pieralisi
On Wed, Jan 22, 2020 at 03:12:59PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 21, 2020 at 06:37:47AM -0700, Jon Derrick wrote: > > The current DMA alias implementation requires the aliased device be on > > the same PCI bus as the requester ID. This introduces an arch-specific > > mechanism to point

Re: [RFC PATCH 3/4] iommu: Preallocate iommu group when probing devices

2020-01-23 Thread Robin Murphy
On 22/01/2020 5:39 am, Lu Baolu wrote: Hi Robin, On 1/21/20 8:45 PM, Robin Murphy wrote: On 19/01/2020 6:29 am, Lu Baolu wrote: Hi Joerg, On 1/17/20 6:21 PM, Joerg Roedel wrote: On Wed, Jan 01, 2020 at 01:26:47PM +0800, Lu Baolu wrote: This splits iommu group allocation from adding

Re: [PATCH 1/3] dt-bindings: iommu: Add Allwinner H6 IOMMU bindings

2020-01-23 Thread Rob Herring
On Wed, 22 Jan 2020 13:44:07 +0100, Maxime Ripard wrote: > The Allwinner H6 has introduced an IOMMU. Let's add a device tree binding > for it. > > Signed-off-by: Maxime Ripard > --- > Documentation/devicetree/bindings/iommu/allwinner,sun50i-h6-iommu.yaml | 61 >