Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-26 Thread David Gibson
On Fri, Apr 23, 2021 at 10:31:46AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Friday, April 23, 2021 7:40 AM > > > > On Thu, Apr 22, 2021 at 04:38:08PM -0600, Alex Williamson wrote: > > > > > Because it's fundamental to the isolation of the device? What you're > > > proposing

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-26 Thread David Gibson
On Thu, Apr 22, 2021 at 11:13:37AM -0600, Alex Williamson wrote: > On Wed, 21 Apr 2021 20:03:01 -0300 > Jason Gunthorpe wrote: > > > On Wed, Apr 21, 2021 at 01:33:12PM -0600, Alex Williamson wrote: > > > > > > I still expect that VFIO_GROUP_SET_CONTAINER will be used to connect > > > > /dev/{ioa

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-26 Thread David Gibson
On Thu, Apr 22, 2021 at 08:39:50PM -0300, Jason Gunthorpe wrote: > On Thu, Apr 22, 2021 at 04:38:08PM -0600, Alex Williamson wrote: > > > Because it's fundamental to the isolation of the device? What you're > > proposing doesn't get around the group issue, it just makes it implicit > > rather tha

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-26 Thread David Gibson
On Fri, Apr 23, 2021 at 07:28:03PM -0300, Jason Gunthorpe wrote: > On Fri, Apr 23, 2021 at 10:38:51AM -0600, Alex Williamson wrote: > > On Thu, 22 Apr 2021 20:39:50 -0300 > > > > /dev/ioasid should understand the group concept somehow, otherwise it > > > is incomplete and maybe even security broke

Re: [PATCH v5 16/16] of: Add plumbing for restricted DMA pool

2021-04-26 Thread Claire Chang
On Fri, Apr 23, 2021 at 9:35 PM Robin Murphy wrote: > > On 2021-04-22 09:15, Claire Chang wrote: > > If a device is not behind an IOMMU, we look up the device node and set > > up the restricted DMA when the restricted-dma-pool is presented. > > > > Signed-off-by: Claire Chang > > --- > > driver

Re: [PATCH v5 08/16] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-04-26 Thread Claire Chang
On Fri, Apr 23, 2021 at 9:31 PM Robin Murphy wrote: > > On 2021-04-22 09:15, Claire Chang wrote: > > Update is_swiotlb_active to add a struct device argument. This will be > > useful later to allow for restricted DMA pool. > > > > Signed-off-by: Claire Chang > > --- > > drivers/gpu/drm/i915/gem

Re: [PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization

2021-04-26 Thread Claire Chang
On Fri, Apr 23, 2021 at 7:34 PM Steven Price wrote: > > On 22/04/2021 09:14, Claire Chang wrote: > > Add the initialization function to create restricted DMA pools from > > matching reserved-memory nodes. > > > > Signed-off-by: Claire Chang > > --- > > include/linux/device.h | 4 +++ > > inc

Re: [PATCH v2 01/10] memory: tegra: Implement SID override programming

2021-04-26 Thread Krzysztof Kozlowski
On 26/04/2021 14:13, Thierry Reding wrote: > On Mon, Apr 26, 2021 at 10:28:43AM +0200, Krzysztof Kozlowski wrote: (...) >>> + >>> + value = readl(mc->regs + client->regs.sid.override); >>> + old = value & MC_SID_STREAMID_OVERRIDE_MASK; >>> + >>> + if (old != sid) { >>> + dev_dbg(m

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-26 Thread Jason Gunthorpe
On Sun, Apr 25, 2021 at 09:24:46AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Friday, April 23, 2021 7:50 PM > > > > On Fri, Apr 23, 2021 at 09:06:44AM +, Tian, Kevin wrote: > > > > > Or could we still have just one /dev/ioasid but allow userspace to create > > > multiple

Re: [PATCH v2 01/10] memory: tegra: Implement SID override programming

2021-04-26 Thread Thierry Reding
On Mon, Apr 26, 2021 at 10:28:43AM +0200, Krzysztof Kozlowski wrote: > On 20/04/2021 19:26, Thierry Reding wrote: > > From: Thierry Reding > > > > Instead of programming all SID overrides during early boot, perform the > > operation on-demand after the SMMU translations have been set up for a > >

Re: [PATCH v2 01/10] memory: tegra: Implement SID override programming

2021-04-26 Thread Krzysztof Kozlowski
On 20/04/2021 19:26, Thierry Reding wrote: > From: Thierry Reding > > Instead of programming all SID overrides during early boot, perform the > operation on-demand after the SMMU translations have been set up for a > device. This reuses data from device tree to match memory clients for a > device

Re: [PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-04-26 Thread Dmitry Osipenko
26.04.2021 10:14, Thierry Reding пишет: > On Sat, Apr 24, 2021 at 11:27:10PM +0300, Dmitry Osipenko wrote: >> 23.04.2021 18:23, Dmitry Osipenko пишет: >>> 23.04.2021 18:01, Guillaume Tucker пишет: On 02/04/2021 15:40, Dmitry Osipenko wrote: > 01.04.2021 11:55, Nicolin Chen пишет: >> On

Re: [PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-04-26 Thread Thierry Reding
On Sat, Apr 24, 2021 at 11:27:10PM +0300, Dmitry Osipenko wrote: > 23.04.2021 18:23, Dmitry Osipenko пишет: > > 23.04.2021 18:01, Guillaume Tucker пишет: > >> On 02/04/2021 15:40, Dmitry Osipenko wrote: > >>> 01.04.2021 11:55, Nicolin Chen пишет: > On Mon, Mar 29, 2021 at 02:32:56AM +0300, Dmi