RE: [PATCH v10 0/5] NVIDIA ARM SMMU Implementation

2020-07-17 Thread Krishna Reddy
>On Mon, Jul 13, 2020 at 02:50:20PM +0100, Will Deacon wrote: >> On Tue, Jul 07, 2020 at 10:00:12PM -0700, Krishna Reddy wrote: > >> Changes in v10: >> > Perform SMMU base ioremap before calling implementation init. >> > Check for Global faults across both ARM MMU-500s during global interrupt. >>

Re: [PATCH v5 4/5] iommu/uapi: Handle data and argsz filled by users

2020-07-17 Thread Alex Williamson
On Thu, 16 Jul 2020 11:45:16 -0700 Jacob Pan wrote: > IOMMU UAPI data has a user filled argsz field which indicates the data > length comes with the API call. User data is not trusted, argsz must be > validated based on the current kernel data size, mandatory data size, > and feature flags. > >

Re: [PATCH v5 1/5] docs: IOMMU user API

2020-07-17 Thread Alex Williamson
On Thu, 16 Jul 2020 11:45:13 -0700 Jacob Pan wrote: > IOMMU UAPI is newly introduced to support communications between guest > virtual IOMMU and host IOMMU. There has been lots of discussions on how > it should work with VFIO UAPI and userspace in general. > > This document is indended to

Re: [PATCH v5 04/15] vfio/type1: Report iommu nesting info to userspace

2020-07-17 Thread Auger Eric
Yi, On 7/12/20 1:20 PM, Liu Yi L wrote: > This patch exports iommu nesting capability info to user space through > VFIO. User space is expected to check this info for supported uAPIs (e.g. it is not only to check the supported uAPIS but rather to know which callbacks it must call upon vIOMMU

Re: [PATCH v5 03/15] iommu/smmu: Report empty domain nesting info

2020-07-17 Thread Auger Eric
Yi, On 7/12/20 1:20 PM, Liu Yi L wrote: > This patch is added as instead of returning a boolean for DOMAIN_ATTR_NESTING, > iommu_domain_get_attr() should return an iommu_nesting_info handle. you may add in the commit message you return an empty nesting info struct for now as true nesting is not

Re: [PATCH v5 15/15] iommu/vt-d: Support reporting nesting capability info

2020-07-17 Thread Auger Eric
Hi Yi, Missing a proper commit message. You can comment on the fact you only support the case where all the physical iomms have the same CAP/ECAP MASKS On 7/12/20 1:21 PM, Liu Yi L wrote: > Cc: Kevin Tian > CC: Jacob Pan > Cc: Alex Williamson > Cc: Eric Auger > Cc: Jean-Philippe Brucker >

Re: [PATCH v5 02/15] iommu: Report domain nesting info

2020-07-17 Thread Auger Eric
Hi Yi, On 7/12/20 1:20 PM, Liu Yi L wrote: > IOMMUs that support nesting translation needs report the capability info s/needs/need to report > to userspace, e.g. the format of first level/stage paging structures. It gives information about requirements the userspace needs to implement plus other

Re: [PATCH v5 5/5] iommu/vt-d: Check UAPI data processed by IOMMU core

2020-07-17 Thread Auger Eric
Hi Jacob, On 7/16/20 8:45 PM, Jacob Pan wrote: > IOMMU generic layer already does sanity checks UAPI data for version > match and argsz range under generic information. > Remove the redundant version check from VT-d driver and check for vendor > specific data size. > > Signed-off-by: Jacob Pan

Re: [PATCH v5 4/5] iommu/uapi: Handle data and argsz filled by users

2020-07-17 Thread Auger Eric
Hi Jacob, On 7/16/20 8:45 PM, Jacob Pan wrote: Could you share a branch? I was not able to apply this on either iommu/next or master? > IOMMU UAPI data has a user filled argsz field which indicates the data > length comes with the API call. s/ comes with the API call/ of the structure User data

Re: [PATCH v2 0/3] iommu/amd: I/O VA address limits

2020-07-17 Thread Sironi, Filippo via iommu
On Fri, 2020-07-17 at 15:36 +0100, Robin Murphy wrote: > On 2020-07-17 14:22, Sironi, Filippo wrote: > > On Fri, 2020-07-17 at 10:47 +0100, Robin Murphy wrote: > > > > > > On 2020-07-17 10:20, Sebastian Ott via iommu wrote: > > > > Hello Joerg, > > > > > > > > On 2020-07-10 14:31, Joerg Roedel

Re: [PATCH v2 0/3] iommu/amd: I/O VA address limits

2020-07-17 Thread Robin Murphy
On 2020-07-17 14:22, Sironi, Filippo wrote: On Fri, 2020-07-17 at 10:47 +0100, Robin Murphy wrote: On 2020-07-17 10:20, Sebastian Ott via iommu wrote: Hello Joerg, On 2020-07-10 14:31, Joerg Roedel wrote: On Wed, Jul 01, 2020 at 12:46:31AM +0200, Sebastian Ott wrote: The IVRS ACPI table

Re: [PATCH v5 3/5] iommu/uapi: Use named union for user data

2020-07-17 Thread Auger Eric
Hi Jacob, On 7/16/20 8:45 PM, Jacob Pan wrote: > IOMMU UAPI data size is filled by the user space which must be validated > by ther kernel. To ensure backward compatibility, user data can only be s/ther/the > extended by either re-purpose padding bytes or extend the variable sized > union at the

Re: [PATCH v5 2/5] iommu/uapi: Add argsz for user filled data

2020-07-17 Thread Auger Eric
Hi Jacob, On 7/16/20 8:45 PM, Jacob Pan wrote: > As IOMMU UAPI gets extended, user data size may increase. To support > backward compatibiliy, this patch introduces a size field to each UAPI > data structures. It is *always* the responsibility for the user to fill in > the correct size. Padding

Re: [PATCH v5 1/5] docs: IOMMU user API

2020-07-17 Thread Auger Eric
Hi Jacob, On 7/16/20 8:45 PM, Jacob Pan wrote: > IOMMU UAPI is newly introduced to support communications between guest > virtual IOMMU and host IOMMU. There has been lots of discussions on how > it should work with VFIO UAPI and userspace in general. > > This document is indended to clarify the

Re: [PATCH v2 0/3] iommu/amd: I/O VA address limits

2020-07-17 Thread Sironi, Filippo via iommu
On Fri, 2020-07-17 at 10:47 +0100, Robin Murphy wrote: > > On 2020-07-17 10:20, Sebastian Ott via iommu wrote: > > Hello Joerg, > > > > On 2020-07-10 14:31, Joerg Roedel wrote: > > > On Wed, Jul 01, 2020 at 12:46:31AM +0200, Sebastian Ott wrote: > > > > The IVRS ACPI table specifies maximum

Re: [PATCH v3 0/3] Allow for qcom-pdc to be loadable as a module

2020-07-17 Thread Marc Zyngier
On Fri, 10 Jul 2020 23:18:21 +, John Stultz wrote: > This patch series provides exports and config tweaks to allow > the qcom-pdc driver to be able to be configured as a permement > modules (particularlly useful for the Android Generic Kernel > Image efforts). > > This was part of a larger

Re: [PATCH v10 5/5] iommu/arm-smmu: Add global/context fault implementation hooks

2020-07-17 Thread Robin Murphy
On 2020-07-13 14:44, Will Deacon wrote: On Tue, Jul 07, 2020 at 10:00:17PM -0700, Krishna Reddy wrote: Add global/context fault hooks to allow vendor specific implementations override default fault interrupt handlers. Update NVIDIA implementation to override the default global/context fault

Re: [PATCH v5 03/15] iommu/smmu: Report empty domain nesting info

2020-07-17 Thread Auger Eric
Hi Jean, On 7/17/20 11:09 AM, Jean-Philippe Brucker wrote: > On Thu, Jul 16, 2020 at 10:38:17PM +0200, Auger Eric wrote: >> Hi Jean, >> >> On 7/16/20 5:39 PM, Jean-Philippe Brucker wrote: >>> On Tue, Jul 14, 2020 at 10:12:49AM +, Liu, Yi L wrote: > Have you verified that this doesn't

Re: [PATCH v10 0/5] NVIDIA ARM SMMU Implementation

2020-07-17 Thread Will Deacon
On Mon, Jul 13, 2020 at 02:50:20PM +0100, Will Deacon wrote: > On Tue, Jul 07, 2020 at 10:00:12PM -0700, Krishna Reddy wrote: > > Changes in v10: > > Perform SMMU base ioremap before calling implementation init. > > Check for Global faults across both ARM MMU-500s during global interrupt. > >

Re: [PATCH v2 0/3] iommu/amd: I/O VA address limits

2020-07-17 Thread Robin Murphy
On 2020-07-17 10:20, Sebastian Ott via iommu wrote: Hello Joerg, On 2020-07-10 14:31, Joerg Roedel wrote: On Wed, Jul 01, 2020 at 12:46:31AM +0200, Sebastian Ott wrote: The IVRS ACPI table specifies maximum address sizes for I/O virtual addresses that can be handled by the IOMMUs in the

Re: [PATCH v2 0/3] iommu/amd: I/O VA address limits

2020-07-17 Thread Sebastian Ott via iommu
Hello Joerg, On 2020-07-10 14:31, Joerg Roedel wrote: On Wed, Jul 01, 2020 at 12:46:31AM +0200, Sebastian Ott wrote: The IVRS ACPI table specifies maximum address sizes for I/O virtual addresses that can be handled by the IOMMUs in the system. Parse that data from the IVRS header to provide

Re: [PATCH v5 03/15] iommu/smmu: Report empty domain nesting info

2020-07-17 Thread Jean-Philippe Brucker
On Thu, Jul 16, 2020 at 10:38:17PM +0200, Auger Eric wrote: > Hi Jean, > > On 7/16/20 5:39 PM, Jean-Philippe Brucker wrote: > > On Tue, Jul 14, 2020 at 10:12:49AM +, Liu, Yi L wrote: > >>> Have you verified that this doesn't break the existing usage of > >>> DOMAIN_ATTR_NESTING in

RE: [PATCH] iommu/arm-smmu-v3: remove the approach of MSI polling for CMD SYNC

2020-07-17 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Friday, July 17, 2020 8:55 PM > To: Song Bao Hua (Barry Song) ; w...@kernel.org; > j...@8bytes.org > Cc: linux-ker...@vger.kernel.org; Linuxarm ; > linux-arm-ker...@lists.infradead.org;

Re: [PATCH] iommu/arm-smmu-v3: remove the approach of MSI polling for CMD SYNC

2020-07-17 Thread Robin Murphy
On 2020-07-17 00:07, Barry Song wrote: Before commit 587e6c10a7ce ("iommu/arm-smmu-v3: Reduce contention during command-queue insertion"), msi polling perhaps performed better since it could run outside the spin_lock_irqsave() while the code polling cons reg was running in the lock. But after

Re: [PATCH 4/4] iommu/mediatek: check 4GB mode by reading infracfg

2020-07-17 Thread Miles Chen
On Wed, 2020-07-15 at 23:05 +0200, Matthias Brugger wrote: > > On 02/07/2020 11:37, Miles Chen wrote: > > In previous disscusion [1] and [2], we found that it is risky to > > use max_pfn or totalram_pages to tell if 4GB mode is enabled. > > > > Check 4GB mode by reading infracfg register, remove

Re: [PATCH 1/4] dt-bindings: mediatek: add mediatek,infracfg phandle

2020-07-17 Thread Miles Chen
On Wed, 2020-07-15 at 14:51 -0600, Rob Herring wrote: > On Thu, Jul 02, 2020 at 05:37:17PM +0800, Miles Chen wrote: > > Add a description for mediatek,infracfg. We can check if 4GB mode > > is enable by reading it instead of checking the unexported > > symbol "max_pfn". > > > > This is a step