Re: [PATCH] iommu: Don't call .probe_finalize() under group->mutex

2020-05-20 Thread Yong Wu
On Tue, 2020-05-19 at 15:28 +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The .probe_finalize() call-back of some IOMMU drivers calls into > arm_iommu_attach_device(). This function will call back into the > IOMMU core code, where it tries to take group->mutex again, resulting > in a deadlo

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-20 Thread Sai Prakash Ranjan
On 2020-05-19 20:41, Rob Clark wrote: On Tue, May 19, 2020 at 2:26 AM Sai Prakash Ranjan wrote: Hi Will, On 2020-05-18 21:15, Will Deacon wrote: > On Mon, May 11, 2020 at 11:30:08AM -0600, Jordan Crouse wrote: >> On Fri, May 08, 2020 at 08:40:40AM -0700, Rob Clark wrote: >> > On Fri, May 8, 2

Re: next/master bisection: baseline.login on panda

2020-05-20 Thread Guillaume Tucker
Please see the bisection report below about a boot failure. Reports aren't automatically sent to the public while we're trialing new bisection features on kernelci.org but this one looks valid. Unfortunately there isn't anything in the kernel log, it's probably crashing very early on. The bisect

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Nicolas Saenz Julienne
Hi Jim, thanks for having a go at this! My two cents. On Tue, 2020-05-19 at 16:34 -0400, Jim Quinlan wrote: > The device variable 'dma_pfn_offset' is used to do a single > linear map between cpu addrs and dma addrs. The variable > 'dma_map' is added to struct device to point to an array > of mult

Re: [PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver

2020-05-20 Thread Will Deacon
On Tue, Apr 21, 2020 at 05:57:46PM +0200, Jean-Philippe Brucker wrote: > Some Arm SMMUv3 implementations, for example Arm CoreLink MMU-600, embed > the PMCG registers into the SMMU MMIO regions. It currently causes probe > failure because the PMU and SMMU drivers request overlapping resources. > >

Re: [PATCH v6 2/5] iommu/arm-smmu: Add support for TTBR1

2020-05-20 Thread Will Deacon
On Tue, May 19, 2020 at 07:53:26PM -0600, Jordan Crouse wrote: > On Mon, May 18, 2020 at 03:59:59PM +0100, Will Deacon wrote: > > On Thu, Apr 09, 2020 at 05:33:47PM -0600, Jordan Crouse wrote: > > > Add support to enable TTBR1 if the domain requests it via the > > > DOMAIN_ATTR_SPLIT_TABLES attribu

Re: [PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver

2020-05-20 Thread Jean-Philippe Brucker
On Wed, May 20, 2020 at 01:24:53PM +0100, Will Deacon wrote: > On Tue, Apr 21, 2020 at 05:57:46PM +0200, Jean-Philippe Brucker wrote: > > Some Arm SMMUv3 implementations, for example Arm CoreLink MMU-600, embed > > the PMCG registers into the SMMU MMIO regions. It currently causes probe > > failure

Re: [PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-05-20 Thread Will Deacon
On Mon, May 18, 2020 at 08:50:27AM -0700, Rob Clark wrote: > On Mon, May 18, 2020 at 8:18 AM Will Deacon wrote: > > On Wed, Mar 18, 2020 at 04:43:07PM -0700, Rob Clark wrote: > > > We do in fact need live domain switching, that is really the whole > > > point. The GPU CP (command processor/parser

Re: [PATCH] iomm/arm-smmu: Add stall implementation hook

2020-05-20 Thread Will Deacon
On Wed, May 20, 2020 at 03:02:45PM +0530, Sai Prakash Ranjan wrote: > On 2020-05-19 20:41, Rob Clark wrote: > > On Tue, May 19, 2020 at 2:26 AM Sai Prakash Ranjan > > wrote: > > > On 2020-05-18 21:15, Will Deacon wrote: > > > > So this sounds like an erratum to me, and I'm happy to set HUPCF if we

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Jim Quinlan via iommu
On Wed, May 20, 2020 at 1:43 AM Greg Kroah-Hartman wrote: > > On Tue, May 19, 2020 at 04:34:07PM -0400, Jim Quinlan wrote: > > diff --git a/include/linux/device.h b/include/linux/device.h > > index ac8e37cd716a..6cd916860b5f 100644 > > --- a/include/linux/device.h > > +++ b/include/linux/device.h

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Greg Kroah-Hartman
On Wed, May 20, 2020 at 09:50:36AM -0400, Jim Quinlan wrote: > On Wed, May 20, 2020 at 1:43 AM Greg Kroah-Hartman > wrote: > > > > On Tue, May 19, 2020 at 04:34:07PM -0400, Jim Quinlan wrote: > > > diff --git a/include/linux/device.h b/include/linux/device.h > > > index ac8e37cd716a..6cd916860b5f

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Jim Quinlan via iommu
On Wed, May 20, 2020 at 10:03 AM Greg Kroah-Hartman < gre...@linuxfoundation.org> wrote: > On Wed, May 20, 2020 at 09:50:36AM -0400, Jim Quinlan wrote: > > On Wed, May 20, 2020 at 1:43 AM Greg Kroah-Hartman > > wrote: > > > > > > On Tue, May 19, 2020 at 04:34:07PM -0400, Jim Quinlan wrote: > > >

Re: [PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-05-20 Thread Jordan Crouse
On Wed, May 20, 2020 at 01:57:01PM +0100, Will Deacon wrote: > On Mon, May 18, 2020 at 08:50:27AM -0700, Rob Clark wrote: > > On Mon, May 18, 2020 at 8:18 AM Will Deacon wrote: > > > On Wed, Mar 18, 2020 at 04:43:07PM -0700, Rob Clark wrote: > > > > We do in fact need live domain switching, that i

[PATCH v2 3/4] iommu/arm-smmu-v3: Use pci_ats_supported()

2020-05-20 Thread Jean-Philippe Brucker
The new pci_ats_supported() function checks if a device supports ATS and is allowed to use it. Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/arm-smmu-v3.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iomm

[PATCH v2 4/4] iommu/vt-d: Use pci_ats_supported()

2020-05-20 Thread Jean-Philippe Brucker
The pci_ats_supported() helper checks if a device supports ATS and is allowed to use it. By checking the ATS capability it also integrates the pci_ats_disabled() check from pci_ats_init(). Simplify the vt-d checks. Acked-by: Lu Baolu Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/intel-

[PATCH v2 1/4] PCI/ATS: Only enable ATS for trusted devices

2020-05-20 Thread Jean-Philippe Brucker
Add pci_ats_supported(), which checks whether a device has an ATS capability, and whether it is trusted. A device is untrusted if it is plugged into an external-facing port such as Thunderbolt and could be spoofing an existing device to exploit weaknesses in the IOMMU configuration. PCIe ATS is o

[PATCH v2 0/4] PCI, iommu: Factor 'untrusted' check for ATS enablement

2020-05-20 Thread Jean-Philippe Brucker
IOMMU drivers currently check themselves if a device is untrusted (plugged into an external-facing port) before enabling ATS. Move the check to drivers/pci. The only functional change should be to the AMD IOMMU driver. With this change all IOMMU drivers block 'Translated' PCIe transactions and Tran

[PATCH v2 2/4] iommu/amd: Use pci_ats_supported()

2020-05-20 Thread Jean-Philippe Brucker
The pci_ats_supported() function checks if a device supports ATS and is allowed to use it. In addition to checking that the device has an ATS capability and that the global pci=noats is not set (pci_ats_disabled()), it also checks if a device is untrusted. A device is untrusted if it is plugged in

Re: [PATCH 00/15] PCI: brcmstb: enable PCIe for STB chips

2020-05-20 Thread Bjorn Helgaas
On Tue, May 19, 2020 at 04:33:58PM -0400, Jim Quinlan wrote: > This patchset expands the usefulness of the Broadcom Settop Box PCIe > controller by building upon the PCIe driver used currently by the > Raspbery Pi. Other forms of this patchset were submitted by me years > ago and not accepted; the

Re: [PATCH v1 2/6] arm/smmu: Add auxiliary domain support for arm-smmuv2

2020-05-20 Thread Rob Clark
On Wed, May 20, 2020 at 8:13 AM Jordan Crouse wrote: > > On Wed, May 20, 2020 at 01:57:01PM +0100, Will Deacon wrote: > > On Mon, May 18, 2020 at 08:50:27AM -0700, Rob Clark wrote: > > > On Mon, May 18, 2020 at 8:18 AM Will Deacon wrote: > > > > On Wed, Mar 18, 2020 at 04:43:07PM -0700, Rob Clark

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Christoph Hellwig
If you don't Cc me on the whole series I have absolutely no way to review it. Don't ever do these stupid partial Ccs as they cause nothing but pain. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinf

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Jim Quinlan via iommu
Sorry, I meant to put you on the to-list for all patches. The last time I sent out this many patches using a collective cc-list for all patches I was told to reduce my cc-list. Jim On Wed, May 20, 2020 at 1:42 PM Christoph Hellwig wrote: > > If you don't Cc me on the whole series I have absolut

Re: [PATCH 09/15] device core: Add ability to handle multiple dma offsets

2020-05-20 Thread Dan Williams
On Wed, May 20, 2020 at 11:27 AM Jim Quinlan wrote: > > Sorry, I meant to put you on the to-list for all patches. The last > time I sent out this many patches using a collective cc-list for all > patches I was told to reduce my cc-list. You'd be forgiven. There are some developers that are ok t