[PATCH] iommu: Fallback to default setting when def_domain_type() callback returns 0

2021-07-05 Thread Kai-Heng Feng
Commit 28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device into core") not only moved the check for untrusted device to IOMMU core, it also introduced a behavioral change by returning def_domain_type() directly without checking its return value. That makes many devices no longer u

Re: [PATCH] iommu: qcom: Revert "iommu/arm: Cleanup resources in case of probe error path"

2021-07-05 Thread Marek Szyprowski
On 05.07.2021 16:30, Amey Narkhede wrote: > On 21/07/05 08:56AM, Marek Szyprowski wrote: >> QCOM IOMMU driver calls bus_set_iommu() for every IOMMU device controller, >> what fails for the second and latter IOMMU devices. This is intended and >> must be not fatal to the driver registration process.

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-05 Thread Christoph Hellwig
On Mon, Jul 05, 2021 at 08:03:52PM +0100, Will Deacon wrote: > So at this point, the AMD IOMMU driver does: > > swiotlb= (iommu_default_passthrough() || sme_me_mask) ? 1 : 0; > > where 'swiotlb' is a global variable indicating whether or not swiotlb > is in use. It's picked up a bit

Re: [PATCH v8 10/10] Documentation: Add documentation for VDUSE

2021-07-05 Thread Yongji Xie
On Mon, Jul 5, 2021 at 8:50 PM Stefan Hajnoczi wrote: > > On Mon, Jul 05, 2021 at 11:36:15AM +0800, Jason Wang wrote: > > > > 在 2021/7/4 下午5:49, Yongji Xie 写道: > > > > > OK, I get you now. Since the VIRTIO specification says "Device > > > > > configuration space is generally used for rarely-changi

Re: [PATCH v8 10/10] Documentation: Add documentation for VDUSE

2021-07-05 Thread Jason Wang
在 2021/7/5 下午8:49, Stefan Hajnoczi 写道: On Mon, Jul 05, 2021 at 11:36:15AM +0800, Jason Wang wrote: 在 2021/7/4 下午5:49, Yongji Xie 写道: OK, I get you now. Since the VIRTIO specification says "Device configuration space is generally used for rarely-changing or initialization-time parameters". I as

[RFC PATCH 1/1] dma-debug: fix check_for_illegal_area() in debug_dma_map_sg()

2021-07-05 Thread Gerald Schaefer
The following warning occurred sporadically on s390: DMA-API: nvme 0006:00:00.0: device driver maps memory from kernel text or rodata [addr=48cc5e2f] [len=131072] WARNING: CPU: 4 PID: 825 at kernel/dma/debug.c:1083 check_for_illegal_area+0xa8/0x138 It is a false-positive warning, due to

[RFC PATCH 0/1] dma-debug: fix check_for_illegal_area() in debug_dma_map_sg()

2021-07-05 Thread Gerald Schaefer
The following warning occurred sporadically on s390: DMA-API: nvme 0006:00:00.0: device driver maps memory from kernel text or rodata [addr=48cc5e2f] [len=131072] WARNING: CPU: 4 PID: 825 at kernel/dma/debug.c:1083 check_for_illegal_area+0xa8/0x138 It is a false-positive warning, due to

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-05 Thread Will Deacon
Hi Nathan, I may have just spotted something in these logs... On Fri, Jul 02, 2021 at 10:55:17PM -0700, Nathan Chancellor wrote: > [2.340956] pci :0c:00.1: Adding to iommu group 4 > [2.340996] pci :0c:00.2: Adding to iommu group 4 > [2.341038] pci :0c:00.3: Adding to iommu

Re: [bug report] IB/usnic: Add Cisco VIC low-level hardware driver

2021-07-05 Thread Dan Carpenter
On Mon, Jul 05, 2021 at 12:21:38PM -0300, Jason Gunthorpe wrote: > On Mon, Jul 05, 2021 at 02:47:36PM +0100, Robin Murphy wrote: > > On 2021-07-05 11:23, Dan Carpenter wrote: > > > [ Ancient code, but the bug seems real enough still. -dan ] > > > > > > Hello Upinder Malhi, > > > > > > The patch

Re: [bug report] IB/usnic: Add Cisco VIC low-level hardware driver

2021-07-05 Thread Robin Murphy
On 2021-07-05 16:21, Jason Gunthorpe wrote: On Mon, Jul 05, 2021 at 02:47:36PM +0100, Robin Murphy wrote: On 2021-07-05 11:23, Dan Carpenter wrote: [ Ancient code, but the bug seems real enough still. -dan ] Hello Upinder Malhi, The patch e3cf00d0a87f: "IB/usnic: Add Cisco VIC low-level hard

Re: [bug report] IB/usnic: Add Cisco VIC low-level hardware driver

2021-07-05 Thread Jason Gunthorpe
On Mon, Jul 05, 2021 at 02:47:36PM +0100, Robin Murphy wrote: > On 2021-07-05 11:23, Dan Carpenter wrote: > > [ Ancient code, but the bug seems real enough still. -dan ] > > > > Hello Upinder Malhi, > > > > The patch e3cf00d0a87f: "IB/usnic: Add Cisco VIC low-level hardware > > driver" from Sep

Re: [PATCH] iommu: qcom: Revert "iommu/arm: Cleanup resources in case of probe error path"

2021-07-05 Thread Amey Narkhede
On 21/07/05 08:56AM, Marek Szyprowski wrote: > QCOM IOMMU driver calls bus_set_iommu() for every IOMMU device controller, > what fails for the second and latter IOMMU devices. This is intended and > must be not fatal to the driver registration process. Also the cleanup > path should take care of th

Re: [bug report] IB/usnic: Add Cisco VIC low-level hardware driver

2021-07-05 Thread Robin Murphy
On 2021-07-05 11:23, Dan Carpenter wrote: [ Ancient code, but the bug seems real enough still. -dan ] Hello Upinder Malhi, The patch e3cf00d0a87f: "IB/usnic: Add Cisco VIC low-level hardware driver" from Sep 10, 2013, leads to the following static checker warning: drivers/iommu/iommu.

Re: [PATCH v8 10/10] Documentation: Add documentation for VDUSE

2021-07-05 Thread Stefan Hajnoczi
On Mon, Jul 05, 2021 at 11:36:15AM +0800, Jason Wang wrote: > > 在 2021/7/4 下午5:49, Yongji Xie 写道: > > > > OK, I get you now. Since the VIRTIO specification says "Device > > > > configuration space is generally used for rarely-changing or > > > > initialization-time parameters". I assume the VDUSE_

Re: [PATCH v2] iommu: rockchip: Fix physical address decoding

2021-07-05 Thread Benjamin Gaignard
Le 18/06/2021 à 15:00, Benjamin Gaignard a écrit : Restore bits 39 to 32 at correct position. It reverses the operation done in rk_dma_addr_dte_v2(). Fixes: c55356c534aa ("iommu: rockchip: Add support for iommu v2") Reported-by: Dan Carpenter Signed-off-by: Benjamin Gaignard Gentle ping on

[bug report] IB/usnic: Add Cisco VIC low-level hardware driver

2021-07-05 Thread Dan Carpenter
[ Ancient code, but the bug seems real enough still. -dan ] Hello Upinder Malhi, The patch e3cf00d0a87f: "IB/usnic: Add Cisco VIC low-level hardware driver" from Sep 10, 2013, leads to the following static checker warning: drivers/iommu/iommu.c:2482 iommu_map() warn: sleeping in

RE: [PATCH v5 3/8] ACPI/IORT: Add a helper to retrieve RMR memory regions

2021-07-05 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Jon Nettleton [mailto:j...@solid-run.com] > Sent: 04 July 2021 08:39 > To: Shameerali Kolothum Thodi > Cc: Robin Murphy ; > linux-arm-ker...@lists.infradead.org; linux-a...@vger.kernel.org; > iommu@lists.linux-foundation.org; Linuxarm ; > steven.pr...@arm.co

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-05 Thread Claire Chang
On Sat, Jul 3, 2021 at 1:55 PM Nathan Chancellor wrote: > > Hi Will and Robin, > > On Fri, Jul 02, 2021 at 04:13:50PM +0100, Robin Murphy wrote: > > On 2021-07-02 14:58, Will Deacon wrote: > > > Hi Nathan, > > > > > > On Thu, Jul 01, 2021 at 12:52:20AM -0700, Nathan Chancellor wrote: > > > > On 7/