Re: [PATCH] media: staging: tegra-vde: Fix build error

2019-09-20 Thread Arnd Bergmann
On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko wrote: > > 25.07.2019 5:41, YueHaibing пишет: > > If IOMMU_SUPPORT is not set, and COMPILE_TEST is y, > > IOMMU_IOVA may be set to m. So building will fails: > > > > drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map': > >

Re: [PATCHv7 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-20 Thread Stephen Boyd
Quoting Sai Prakash Ranjan (2019-09-20 01:04:29) > From: Vivek Gautam > > Add reset hook for sdm845 based platforms to turn off > the wait-for-safe sequence. > > Understanding how wait-for-safe logic affects USB and UFS performance > on MTP845 and DB845 boards: > > Qcom's implementation of

Re: [PATCH] media: staging: tegra-vde: Fix build error

2019-09-20 Thread Dmitry Osipenko
20.09.2019 22:32, Arnd Bergmann пишет: > On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko wrote: >> >> 25.07.2019 5:41, YueHaibing пишет: >>> If IOMMU_SUPPORT is not set, and COMPILE_TEST is y, >>> IOMMU_IOVA may be set to m. So building will fails: >>> >>> drivers/staging/media/tegra-vde/iommu.o:

Re: [PATCH 4/5] iommu/amd: Hold the domain lock when calling iommu_map_page

2019-09-20 Thread Sironi, Filippo via iommu
> On 10. Sep 2019, at 19:49, Filippo Sironi wrote: > > iommu_map_page calls into __domain_flush_pages, which requires the > domain lock since it traverses the device list, which the lock protects. > > Signed-off-by: Filippo Sironi > --- > drivers/iommu/amd_iommu.c | 5 + > 1 file

Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file

2019-09-20 Thread Jean-Philippe Brucker
On Fri, Sep 20, 2019 at 08:07:38AM +0800, Guo Ren wrote: > On Thu, Sep 19, 2019 at 11:18 PM Jean-Philippe Brucker > wrote: > > > > > The SMMU does support PCI Virtual Function - an hypervisor can assign a > > VF to a guest, and let that guest partition the VF into smaller contexts > > by using

Plumber VFIO/IOMMU/PCI "Dual Stage SMMUv3 Status" Follow-up

2019-09-20 Thread Auger Eric
Hi Will, As a follow-up of the VFIO/IOMMU/PCI "Dual Stage SMMUv3 Status" session, please find some further justifications about the SMMUv3 nested stage enablement series. In the text below, I only talk about use cases featuring VFIO assigned devices where the physical IOMMU is actually involved.

Re: [PATCHv6 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-20 Thread Sai Prakash Ranjan
On 2019-09-20 01:30, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2019-09-19 11:54:27) On 2019-09-19 08:48, Sai Prakash Ranjan wrote: > On 2019-09-19 05:55, Bjorn Andersson wrote: >> In the transition to this new design we lost the ability to >> enable/disable the safe toggle per board,

[PATCHv7 1/3] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-09-20 Thread Sai Prakash Ranjan
From: Vivek Gautam There are scnenarios where drivers are required to make a scm call in atomic context, such as in one of the qcom's arm-smmu-500 errata [1]. [1] ("https://source.codeaurora.org/quic/la/kernel/msm-4.9/ tree/drivers/iommu/arm-smmu.c?h=msm-4.9#n4842") Signed-off-by: Vivek

[PATCHv7 3/3] iommu: arm-smmu-impl: Add sdm845 implementation hook

2019-09-20 Thread Sai Prakash Ranjan
From: Vivek Gautam Add reset hook for sdm845 based platforms to turn off the wait-for-safe sequence. Understanding how wait-for-safe logic affects USB and UFS performance on MTP845 and DB845 boards: Qcom's implementation of arm,mmu-500 adds a WAIT-FOR-SAFE logic to address under-performance

[PATCHv7 2/3] firmware/qcom_scm: Add scm call to handle smmu errata

2019-09-20 Thread Sai Prakash Ranjan
From: Vivek Gautam Qcom's smmu-500 needs to toggle wait-for-safe sequence to handle TLB invalidation sync's. Few firmwares allow doing that through SCM interface. Add API to toggle wait for safe from firmware through a SCM call. Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson

[PATCHv7 0/3] QCOM smmu-500 wait-for-safe handling for sdm845

2019-09-20 Thread Sai Prakash Ranjan
Previous version of the patches are at [1]: QCOM's implementation of smmu-500 on sdm845 adds a hardware logic called wait-for-safe. This logic helps in meeting the invalidation requirements from 'real-time clients', such as display and camera. This wait-for-safe logic ensures that the

Re: [PATCH 2/2] dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

2019-09-20 Thread Robin Murphy
On 20/09/2019 14:48, Rob Herring wrote: Convert the Arm SMMv3 binding to the DT schema format. Cc: Joerg Roedel Cc: Mark Rutland Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring --- .../devicetree/bindings/iommu/arm,smmu-v3.txt | 77

Re: [PATCH 1/4] iommu: Introduce cache_invalidate API

2019-09-20 Thread Jean-Philippe Brucker
On Wed, Sep 18, 2019 at 04:26:31PM -0700, Jacob Pan wrote: > From: Yi L Liu > > In any virtualization use case, when the first translation stage > is "owned" by the guest OS, the host IOMMU driver has no knowledge > of caching structure updates unless the guest invalidation activities > are

Re: [PATCH v4 3/4] vfio: zpci: defining the VFIO headers

2019-09-20 Thread Cornelia Huck
On Thu, 19 Sep 2019 16:55:57 -0400 Matthew Rosato wrote: > On 9/19/19 11:20 AM, Cornelia Huck wrote: > > On Fri, 6 Sep 2019 20:13:50 -0400 > > Matthew Rosato wrote: > > > >> From: Pierre Morel > >> > >> We define a new device region in vfio.h to be able to > >> get the ZPCI CLP information

Re: [PATCH v4 4/4] vfio: pci: Using a device region to retrieve zPCI information

2019-09-20 Thread Cornelia Huck
On Thu, 19 Sep 2019 16:57:10 -0400 Matthew Rosato wrote: > On 9/19/19 11:25 AM, Cornelia Huck wrote: > > On Fri, 6 Sep 2019 20:13:51 -0400 > > Matthew Rosato wrote: > > > >> From: Pierre Morel > >> > >> We define a new configuration entry for VFIO/PCI, VFIO_PCI_ZDEV > >> > >> When the

Re: [PATCH v4 4/4] vfio: pci: Using a device region to retrieve zPCI information

2019-09-20 Thread Matthew Rosato
On 9/20/19 10:26 AM, Cornelia Huck wrote: > On Thu, 19 Sep 2019 16:57:10 -0400 > Matthew Rosato wrote: > >> On 9/19/19 11:25 AM, Cornelia Huck wrote: >>> On Fri, 6 Sep 2019 20:13:51 -0400 >>> Matthew Rosato wrote: >>> From: Pierre Morel We define a new configuration entry

Re: [PATCH v4 4/4] vfio: pci: Using a device region to retrieve zPCI information

2019-09-20 Thread Matthew Rosato
On 9/19/19 6:57 PM, Alex Williamson wrote: > On Fri, 6 Sep 2019 20:13:51 -0400 > Matthew Rosato wrote: > >> From: Pierre Morel >> >> We define a new configuration entry for VFIO/PCI, VFIO_PCI_ZDEV >> >> When the VFIO_PCI_ZDEV feature is configured we initialize >> a new device region,

Re: [PATCH 2/2] dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

2019-09-20 Thread Rob Herring
On Fri, Sep 20, 2019 at 9:17 AM Robin Murphy wrote: > > On 20/09/2019 14:48, Rob Herring wrote: > > Convert the Arm SMMv3 binding to the DT schema format. > > > > Cc: Joerg Roedel > > Cc: Mark Rutland > > Cc: Will Deacon > > Cc: Robin Murphy > > Cc: iommu@lists.linux-foundation.org > >

Re: [PATCH 2/4] iommu: Add I/O ASID allocator

2019-09-20 Thread Jean-Philippe Brucker
On Wed, Sep 18, 2019 at 04:26:32PM -0700, Jacob Pan wrote: > From: Jean-Philippe Brucker > > Some devices might support multiple DMA address spaces, in particular > those that have the PCI PASID feature. PASID (Process Address Space ID) > allows to share process address spaces with devices

[PATCH 1/2] dt-bindings: iommu: Convert Arm SMMU to DT schema

2019-09-20 Thread Rob Herring
Convert the Arm SMMU binding to DT schema. The existing binding doc doesn't cover the number of variations of compatible properties found in .dts files. "qcom,msm8998-smmu-v2" was also missing, so add it. SoCFPGA Stratix10 has a single clock defined which doesn't match the binding. This issue

Re: [PATCH v4 3/4] vfio: zpci: defining the VFIO headers

2019-09-20 Thread Matthew Rosato
On 9/20/19 10:02 AM, Cornelia Huck wrote: > On Thu, 19 Sep 2019 16:55:57 -0400 > Matthew Rosato wrote: > >> On 9/19/19 11:20 AM, Cornelia Huck wrote: >>> On Fri, 6 Sep 2019 20:13:50 -0400 >>> Matthew Rosato wrote: >>> From: Pierre Morel We define a new device region in

Re: [PATCH 4/4] iommu: Introduce guest PASID bind function

2019-09-20 Thread Jean-Philippe Brucker
On Wed, Sep 18, 2019 at 04:26:34PM -0700, Jacob Pan wrote: > Guest shared virtual address (SVA) may require host to shadow guest > PASID tables. Guest PASID can also be allocated from the host via > enlightened interfaces. In this case, guest needs to bind the guest > mm, i.e. cr3 in guest

[PATCH 2/2] dt-bindings: iommu: Convert Arm SMMUv3 to DT schema

2019-09-20 Thread Rob Herring
Convert the Arm SMMv3 binding to the DT schema format. Cc: Joerg Roedel Cc: Mark Rutland Cc: Will Deacon Cc: Robin Murphy Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring --- .../devicetree/bindings/iommu/arm,smmu-v3.txt | 77 -

Re: [PATCH 3/4] iommu/ioasid: Add custom allocators

2019-09-20 Thread Jean-Philippe Brucker
On Wed, Sep 18, 2019 at 04:26:33PM -0700, Jacob Pan wrote: > +/* > + * struct ioasid_allocator_data - Internal data structure to hold information > + * about an allocator. There are two types of allocators: > + * > + * - Default allocator always has its own XArray to track the IOASIDs >

Re: [PATCH v4 3/4] vfio: zpci: defining the VFIO headers

2019-09-20 Thread Matthew Rosato
On 9/19/19 6:49 PM, Alex Williamson wrote: > On Thu, 19 Sep 2019 16:27:08 -0600 > Alex Williamson wrote: > >> On Thu, 19 Sep 2019 16:55:57 -0400 >> Matthew Rosato wrote: >> >>> On 9/19/19 11:20 AM, Cornelia Huck wrote: On Fri, 6 Sep 2019 20:13:50 -0400 Matthew Rosato wrote: