Re: [PATCH 0/2] iommu: Move Intel and AMD drivers into their own subdirectory

2020-06-03 Thread Jerry Snitselaar
On Thu Jun 04 20, Lu Baolu wrote: Hi Joerg, On 6/2/20 5:26 PM, Joerg Roedel wrote: Hi, two small patches to move the Intel and AMD IOMMU drivers into their own subdirectory under drivers/iommu/ to make the file structure a bit less cluttered. Does the MAINTAINERS file need to update? Best

Re: [PATCH 0/2] iommu: Move Intel and AMD drivers into their own subdirectory

2020-06-03 Thread Lu Baolu
Hi Joerg, On 6/2/20 5:26 PM, Joerg Roedel wrote: Hi, two small patches to move the Intel and AMD IOMMU drivers into their own subdirectory under drivers/iommu/ to make the file structure a bit less cluttered. Does the MAINTAINERS file need to update? Best regards, baolu Regards,

[PATCH] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-03 Thread Jordan Crouse
When CONFIG_OF=n of_match_device() gets pre-processed out of existence leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to keep the compiler from warning in that case. Fixes: 0e764a01015d ("iommu/arm-smmu: Allow client devices to select direct mapping") Reported-by: kbuild

[PATCH v3 09/13] device core: Introduce multiple dma pfn offsets

2020-06-03 Thread Jim Quinlan via iommu
The new field in struct device 'dma_pfn_offset_map' is used to facilitate the use of multiple pfn offsets between cpu addrs and dma addrs. It subsumes the role of dev->dma_pfn_offset -- a uniform offset -- and designates the single offset a special case. of_dma_configure() is the typical manner

[PATCH v3 00/13] PCI: brcmstb: enable PCIe for STB chips

2020-06-03 Thread Jim Quinlan via iommu
v3: Commit "device core: Introduce multiple dma pfn offsets" Commit "arm: dma-mapping: Invoke dma offset func if needed" -- The above two commits have been squashed. More importantly, the code has been modified so that the functionality for multiple pfn offsets subsumes the use of

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Bjorn Andersson
On Wed 03 Jun 03:24 PDT 2020, Thierry Reding wrote: > On Tue, Jun 02, 2020 at 12:32:49PM -0700, Bjorn Andersson wrote: > > On Tue 02 Jun 04:02 PDT 2020, Thierry Reding wrote: > > > > > On Wed, May 27, 2020 at 12:03:44PM +0100, Will Deacon wrote: > > > > Hi John, Bjorn, > > > > > > > > On Tue,

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Bjorn Andersson
On Wed 03 Jun 04:11 PDT 2020, Will Deacon wrote: > On Mon, Jun 01, 2020 at 11:32:10PM -0700, Bjorn Andersson wrote: > > On Wed 27 May 04:03 PDT 2020, Will Deacon wrote: > > > > > Hi John, Bjorn, > > > > > > On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: > > > > On Thu, May 14,

Re: [PATCH v4] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-03 Thread Mika Westerberg
On Wed, Jun 03, 2020 at 06:03:17AM -0700, Rajat Jain wrote: > Currently, an external malicious PCI device can masquerade the VID:PID > of faulty gfx devices, and thus apply iommu quirks to effectively > disable the IOMMU restrictions for itself. > > Thus we need to ensure that the device we are

[PATCH v4] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-03 Thread Rajat Jain via iommu
Currently, an external malicious PCI device can masquerade the VID:PID of faulty gfx devices, and thus apply iommu quirks to effectively disable the IOMMU restrictions for itself. Thus we need to ensure that the device we are applying quirks to, is indeed an internal trusted device.

Re: [PATCH v3] iommu/vt-d: Don't apply gfx quirks to untrusted devices

2020-06-03 Thread Rajat Jain via iommu
On Tue, Jun 2, 2020 at 10:30 PM Mika Westerberg wrote: > > On Tue, Jun 02, 2020 at 04:26:02PM -0700, Rajat Jain wrote: > > +static bool risky_device(struct pci_dev *pdev) > > +{ > > + if (pdev->untrusted) { > > + pci_warn(pdev, > > + "Skipping IOMMU quirk for

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Will Deacon
On Mon, Jun 01, 2020 at 11:32:10PM -0700, Bjorn Andersson wrote: > On Wed 27 May 04:03 PDT 2020, Will Deacon wrote: > > > Hi John, Bjorn, > > > > On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: > > > On Thu, May 14, 2020 at 12:34 PM wrote: > > > > > > > > On Thu 27 Feb 18:57 PST

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Robin Murphy
On 2020-06-02 07:32, Bjorn Andersson wrote: On Wed 27 May 04:03 PDT 2020, Will Deacon wrote: Hi John, Bjorn, On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: On Thu, May 14, 2020 at 12:34 PM wrote: On Thu 27 Feb 18:57 PST 2020, Bjorn Andersson wrote: Rob, Will, we're reaching

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Thierry Reding
On Tue, Jun 02, 2020 at 12:32:49PM -0700, Bjorn Andersson wrote: > On Tue 02 Jun 04:02 PDT 2020, Thierry Reding wrote: > > > On Wed, May 27, 2020 at 12:03:44PM +0100, Will Deacon wrote: > > > Hi John, Bjorn, > > > > > > On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: > > > > On Thu,

Re: [PATCH v7 21/24] iommu/arm-smmu-v3: Add stall support for platform devices

2020-06-03 Thread Jean-Philippe Brucker
On Tue, Jun 02, 2020 at 12:12:30PM +, Shameerali Kolothum Thodi wrote: > > > > > > + if (ssid_valid) > > > > > > + flt->prm.flags |= > > > > IOMMU_FAULT_PAGE_REQUEST_PASID_VALID; > > > > > > > > > > Do we need to set this for STALL mode only support? I had an issue

Re: [PATCH] iommu/dma: limit iova free size to unmmaped iova

2020-06-03 Thread guptap
On 2020-06-02 18:37, Robin Murphy wrote: On 2020-05-26 08:19, gup...@codeaurora.org wrote: On 2020-05-22 14:54, Robin Murphy wrote: On 2020-05-22 07:25, gup...@codeaurora.org wrote: On 2020-05-22 01:46, Robin Murphy wrote: On 2020-05-21 12:30, Prakash Gupta wrote: Sorry for delayed

Re: [PATCH 0/2] iommu: Move Intel and AMD drivers into their own subdirectory

2020-06-03 Thread Jerry Snitselaar
On Tue Jun 02 20, Joerg Roedel wrote: Hi, two small patches to move the Intel and AMD IOMMU drivers into their own subdirectory under drivers/iommu/ to make the file structure a bit less cluttered. Regards, Joerg Joerg Roedel (2): iommu/amd: Move AMD IOMMU driver into subdirectory

[RFC PATCH] dma-direct: dma_contiguous_pernuma_area[] can be static

2020-06-03 Thread kbuild test robot
Signed-off-by: kbuild test robot --- contiguous.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index 4b10d0ca0456d..2094c8e0590ac 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -37,7 +37,7 @@

Re: [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA

2020-06-03 Thread kbuild test robot
also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Barry-Song/support-per-numa-CMA-for-ARM-server/20200603-104821 base: https://git.kernel.org/pub/scm/linux/kernel/git

Re: [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA

2020-06-03 Thread kbuild test robot
the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Barry-Song/support-per-numa-CMA-for-ARM-server/20200603-104821 base: https://git.kernel.org/pub

Re: [PATCH] iommu/amd: Fix event counter availability check

2020-06-03 Thread Alexander Monakov
On Tue, 2 Jun 2020, Shuah Khan wrote: > I changed the logic to read config to get max banks and counters > before checking if counters are writable and tried writing to all. > The result is the same and all of them aren't writable. However, > when disable the writable check and assume they are, I