[bug report] iommu/amd: Improve error handling for amd_iommu_init_pci

2022-03-08 Thread Dan Carpenter
Hello Suravee Suthikulpanit, The patch 06687a03805e: "iommu/amd: Improve error handling for amd_iommu_init_pci" from Mar 1, 2022, leads to the following Smatch static checker warning: drivers/iommu/amd/init.c:1989 amd_iommu_init_pci() warn: duplicate check 'ret' (previous on line

Re: [BUG] crypto: ccree: driver does not handle case where cryptlen = authsize =0

2022-03-08 Thread Gilad Ben-Yossef
On Tue, Mar 8, 2022 at 11:40 AM Corentin Labbe wrote: > > Le Mon, Mar 07, 2022 at 02:56:21PM +0100, Corentin Labbe a écrit : > > Le Mon, Mar 07, 2022 at 03:53:02PM +0200, Gilad Ben-Yossef a écrit : > > > On Mon, Mar 7, 2022 at 3:45 PM Corentin Labbe > > > wrote: > > > > > > > > Le Mon, Mar 07, 2

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-08 Thread Christoph Hellwig
On Tue, Mar 08, 2022 at 04:38:21PM -0500, Boris Ostrovsky wrote: > > On 3/1/22 5:53 AM, Christoph Hellwig wrote: >> Allow to pass a remap argument to the swiotlb initialization functions >> to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping >> from xen_swiotlb_fixup, so we don't e

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-08 Thread Boris Ostrovsky
On 3/1/22 5:53 AM, Christoph Hellwig wrote: Allow to pass a remap argument to the swiotlb initialization functions to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping from xen_swiotlb_fixup, so we don't even need that quirk. Any chance this patch could be split? Lots of thin

Re: [PATCH] Documentation: x86: add documenation for AMD IOMMU

2022-03-08 Thread Robin Murphy
On 2022-03-08 19:04, Alex Deucher via iommu wrote: Add preliminary documenation for AMD IOMMU. Signed-off-by: Alex Deucher --- Documentation/x86/amd-iommu.rst | 85 +++ Documentation/x86/index.rst | 1 + Documentation/x86/intel-iommu.rst | 2 +- 3 file

[PATCH] Documentation: x86: add documenation for AMD IOMMU

2022-03-08 Thread Alex Deucher via iommu
Add preliminary documenation for AMD IOMMU. Signed-off-by: Alex Deucher --- Documentation/x86/amd-iommu.rst | 85 +++ Documentation/x86/index.rst | 1 + Documentation/x86/intel-iommu.rst | 2 +- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 1

Re: [PATCH v2 1/4] dt-bindings: arm-smmu: Document nvidia,memory-controller property

2022-03-08 Thread Thierry Reding
On Wed, Feb 16, 2022 at 02:25:20PM +0100, Thierry Reding wrote: > On Thu, Dec 09, 2021 at 05:35:57PM +0100, Thierry Reding wrote: > > From: Thierry Reding > > > > On NVIDIA SoC's the ARM SMMU needs to interact with the memory > > controller in order to map memory clients to the corresponding stre

Re: [PATCH v8 04/11] bus: platform,amba,fsl-mc,PCI: Add device DMA ownership management

2022-03-08 Thread Robin Murphy
On 2022-03-08 05:44, Lu Baolu wrote: The devices on platform/amba/fsl-mc/PCI buses could be bound to drivers with the device DMA managed by kernel drivers or user-space applications. Unfortunately, multiple devices may be placed in the same IOMMU group because they cannot be isolated from each ot

Re: [PATCH v8 01/11] iommu: Add DMA ownership management interfaces

2022-03-08 Thread Robin Murphy
On 2022-03-08 05:44, Lu Baolu wrote: Multiple devices may be placed in the same IOMMU group because they cannot be isolated from each other. These devices must either be entirely under kernel control or userspace control, never a mixture. This adds dma ownership management in iommu core and expo

Re: [PATCH v5 3/8] hisi_ptt: Register PMU device for PTT trace

2022-03-08 Thread Yicong Yang via iommu
On 2022/3/8 20:06, Jonathan Cameron wrote: > On Tue, 8 Mar 2022 19:13:08 +0800 > Yicong Yang wrote: > >> On 2022/3/8 18:21, Jonathan Cameron wrote: >>> On Tue, 8 Mar 2022 16:49:25 +0800 >>> Yicong Yang wrote: >>> Register PMU device of PTT trace, then users can use trace through perf >>>

Re: [PATCH v5 3/8] hisi_ptt: Register PMU device for PTT trace

2022-03-08 Thread Jonathan Cameron via iommu
On Tue, 8 Mar 2022 19:13:08 +0800 Yicong Yang wrote: > On 2022/3/8 18:21, Jonathan Cameron wrote: > > On Tue, 8 Mar 2022 16:49:25 +0800 > > Yicong Yang wrote: > > > >> Register PMU device of PTT trace, then users can use trace through perf > >> command. The driver makes use of perf AUX trace

Re: [PATCH v5 8/8] MAINTAINERS: Add maintainer for HiSilicon PTT driver

2022-03-08 Thread Yicong Yang via iommu
On 2022/3/8 18:32, Jonathan Cameron wrote: > On Tue, 8 Mar 2022 16:49:30 +0800 > Yicong Yang wrote: > >> Add maintainer for driver and documentation of HiSilicon PTT device. >> >> Signed-off-by: Yicong Yang > FWIW > Reviewed-by: Jonathan Cameron > > I've left the perf tool and iommu patches wi

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.18

2022-03-08 Thread Joerg Roedel
On Tue, Mar 08, 2022 at 10:18:10AM +, Will Deacon wrote: > Hi Joerg, > > Please pull this handful of Arm SMMU updates for 5.18. Summary in the tag. Pulled, thanks Will. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfound

Re: [PATCH v5 3/8] hisi_ptt: Register PMU device for PTT trace

2022-03-08 Thread Yicong Yang via iommu
On 2022/3/8 18:21, Jonathan Cameron wrote: > On Tue, 8 Mar 2022 16:49:25 +0800 > Yicong Yang wrote: > >> Register PMU device of PTT trace, then users can use trace through perf >> command. The driver makes use of perf AUX trace and support following >> events to configure the trace: >> >> - filte

Re: [PATCH v5 8/8] MAINTAINERS: Add maintainer for HiSilicon PTT driver

2022-03-08 Thread Jonathan Cameron via iommu
On Tue, 8 Mar 2022 16:49:30 +0800 Yicong Yang wrote: > Add maintainer for driver and documentation of HiSilicon PTT device. > > Signed-off-by: Yicong Yang FWIW Reviewed-by: Jonathan Cameron I've left the perf tool and iommu patches without tags from me as I don't have the background to do a t

Re: [PATCH v5 4/8] hisi_ptt: Add support for dynamically updating the filter list

2022-03-08 Thread Jonathan Cameron via iommu
On Tue, 8 Mar 2022 16:49:26 +0800 Yicong Yang wrote: > The PCIe devices supported by the PTT trace can be removed/rescanned by > hotplug or through sysfs. Add support for dynamically updating the > available filter list by registering a PCI bus notifier block. Then user > can always get latest i

Re: [PATCH v5 3/8] hisi_ptt: Register PMU device for PTT trace

2022-03-08 Thread Jonathan Cameron via iommu
On Tue, 8 Mar 2022 16:49:25 +0800 Yicong Yang wrote: > Register PMU device of PTT trace, then users can use trace through perf > command. The driver makes use of perf AUX trace and support following > events to configure the trace: > > - filter: select Root port or Endpoint to trace > - type: se

[GIT PULL] iommu/arm-smmu: Updates for 5.18

2022-03-08 Thread Will Deacon
Hi Joerg, Please pull this handful of Arm SMMU updates for 5.18. Summary in the tag. Cheers, Will --->8 The following changes since commit 26291c54e111ff6ba87a164d85d4a4e134b7315c: Linux 5.17-rc2 (2022-01-30 15:37:07 +0200) are available in the Git repository at: git://git.kernel.org/pu

Re: [BUG] crypto: ccree: driver does not handle case where cryptlen = authsize =0

2022-03-08 Thread Corentin Labbe
Le Mon, Mar 07, 2022 at 02:56:21PM +0100, Corentin Labbe a écrit : > Le Mon, Mar 07, 2022 at 03:53:02PM +0200, Gilad Ben-Yossef a écrit : > > On Mon, Mar 7, 2022 at 3:45 PM Corentin Labbe > > wrote: > > > > > > Le Mon, Mar 07, 2022 at 11:14:16AM +, Robin Murphy a écrit : > > > > On 2022-03-07

[PATCH v2] dma-mapping: benchmark: Extract a common header file for map_benchmark definition

2022-03-08 Thread Tian Tao via iommu
kernel/dma/map_benchmark.c and selftests/dma/dma_map_benchmark.c have duplicate map_benchmark definitions, which tends to lead to inconsistent changes to map_benchmark on both sides, extract a common header file to avoid this problem. Signed-off-by: Tian Tao Acked-by: Barry Song Reviewed-by: Shu

[PATCH v5 2/8] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device

2022-03-08 Thread Yicong Yang via iommu
HiSilicon PCIe tune and trace device(PTT) is a PCIe Root Complex integrated Endpoint(RCiEP) device, providing the capability to dynamically monitor and tune the PCIe traffic, and trace the TLP headers. Add the driver for the device to enable the trace function. This patch adds basic function of tr

[PATCH v5 4/8] hisi_ptt: Add support for dynamically updating the filter list

2022-03-08 Thread Yicong Yang via iommu
The PCIe devices supported by the PTT trace can be removed/rescanned by hotplug or through sysfs. Add support for dynamically updating the available filter list by registering a PCI bus notifier block. Then user can always get latest information about available tracing filters and driver can block

[PATCH v5 3/8] hisi_ptt: Register PMU device for PTT trace

2022-03-08 Thread Yicong Yang via iommu
Register PMU device of PTT trace, then users can use trace through perf command. The driver makes use of perf AUX trace and support following events to configure the trace: - filter: select Root port or Endpoint to trace - type: select the type of traced TLP headers - direction: select the directi

[PATCH v5 6/8] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver

2022-03-08 Thread Yicong Yang via iommu
From: Qi Liu 'perf record' and 'perf report --dump-raw-trace' supported in this patch. Example usage: Output will contain raw PTT data and its textual representation, such as: 0 0 0x5810 [0x30]: PERF_RECORD_AUXTRACE size: 0x40 offset: 0 ref: 0xa5d50c725 idx: 0 tid: -1 cpu: 0 . . ... HI

[PATCH v5 5/8] hisi_ptt: Add tune function support for HiSilicon PCIe Tune and Trace device

2022-03-08 Thread Yicong Yang via iommu
Add tune function for the HiSilicon Tune and Trace device. The interface of tune is exposed through sysfs attributes of PTT PMU device. Reviewed-by: Jonathan Cameron Signed-off-by: Yicong Yang --- drivers/hwtracing/ptt/hisi_ptt.c | 154 +++ drivers/hwtracing/ptt/hisi

[PATCH v5 7/8] docs: Add HiSilicon PTT device driver documentation

2022-03-08 Thread Yicong Yang via iommu
Document the introduction and usage of HiSilicon PTT device driver. Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron --- Documentation/trace/hisi-ptt.rst | 303 +++ 1 file changed, 303 insertions(+) create mode 100644 Documentation/trace/hisi-ptt.rst diff -

[PATCH v5 0/8] Add support for HiSilicon PCIe Tune and Trace device

2022-03-08 Thread Yicong Yang via iommu
HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex integrated Endpoint (RCiEP) device, providing the capability to dynamically monitor and tune the PCIe traffic (tune), and trace the TLP headers (trace). PTT tune is designed for monitoring and adjusting PCIe link parameters. We prov

[PATCH v5 8/8] MAINTAINERS: Add maintainer for HiSilicon PTT driver

2022-03-08 Thread Yicong Yang via iommu
Add maintainer for driver and documentation of HiSilicon PTT device. Signed-off-by: Yicong Yang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ea3e6c914384..237c618a74d5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8689,6 +8689,13 @@

[PATCH v5 1/8] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity

2022-03-08 Thread Yicong Yang via iommu
The DMA of HiSilicon PTT device can only work with identical mapping. So add a quirk for the device to force the domain passthrough. Signed-off-by: Yicong Yang --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/iommu/arm/