Re: [PATCH v2 5/5] vfio/iommu_type1: Simplify group attachment

2022-06-17 Thread Nicolin Chen via iommu
On Fri, Jun 17, 2022 at 02:53:13AM +, Tian, Kevin wrote: > > > ... > > > > - if (resv_msi) { > > > > + if (resv_msi && !domain->msi_cookie) { > > > > ret = iommu_get_msi_cookie(domain->domain, > > > > resv_msi_base); > > > > if (ret && ret != -ENODEV) > > >

Aw: Re: helping with remapping vmem for dma

2022-06-17 Thread Frank Wunderlich
> Gesendet: Freitag, 17. Juni 2022 um 19:22 Uhr > Von: "Robin Murphy" > An: "Frank Wunderlich" , "Christoph Hellwig" > > Cc: linux-ker...@vger.kernel.org, iommu@lists.linux-foundation.org, "Marek > Szyprowski" > Betreff: Re: helping with remapping vmem for dma > > On 2022-06-17 17:17, Frank

Re: helping with remapping vmem for dma

2022-06-17 Thread Robin Murphy
On 2022-06-17 17:17, Frank Wunderlich wrote: Am 15. Juni 2022 15:17:00 MESZ schrieb Christoph Hellwig : On Wed, Jun 15, 2022 at 02:15:33PM +0100, Robin Murphy wrote: Put simply, if you want to call dma_map_single() on a buffer, then that buffer needs to be allocated with kmalloc() (or

Re: helping with remapping vmem for dma

2022-06-17 Thread Frank Wunderlich
Am 15. Juni 2022 15:17:00 MESZ schrieb Christoph Hellwig : >On Wed, Jun 15, 2022 at 02:15:33PM +0100, Robin Murphy wrote: >> Put simply, if you want to call dma_map_single() on a buffer, then that >> buffer needs to be allocated with kmalloc() (or technically alloc_pages(), >> but then

[RFC PATCH V4 1/1] swiotlb: Split up single swiotlb lock

2022-06-17 Thread Tianyu Lan
From: Tianyu Lan Traditionally swiotlb was not performance critical because it was only used for slow devices. But in some setups, like TDX/SEV confidential guests, all IO has to go through swiotlb. Currently swiotlb only has a single lock. Under high IO load with multiple CPUs this can lead to

Re: [PATCH V2 2/6] iommu: iova: properly handle 0 as a valid IOVA address

2022-06-17 Thread Marek Szyprowski
Hi Robin, On 06.06.2022 14:38, Robin Murphy wrote: > On 2022-06-02 16:58, Marek Szyprowski wrote: >> On 23.05.2022 19:30, Robin Murphy wrote: >>> On 2022-05-11 13:15, Ajay Kumar wrote: From: Marek Szyprowski Zero is a valid DMA and IOVA address on many architectures, so adjust

Re: [PATCH] uacce: fix concurrency of fops_open and uacce_remove

2022-06-17 Thread Zhangfei Gao
On 2022/6/17 下午4:20, Zhangfei Gao wrote: On 2022/6/17 下午2:05, Zhangfei Gao wrote: On 2022/6/16 下午4:14, Jean-Philippe Brucker wrote: On Thu, Jun 16, 2022 at 12:10:18PM +0800, Zhangfei Gao wrote: diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index

Re: [PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-17 Thread Robin Murphy
On 2022-06-17 13:57, Arnd Bergmann wrote: From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit

[PATCH v2 3/3] arch/*/: remove CONFIG_VIRT_TO_BUS

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann All architecture-independent users of virt_to_bus() and bus_to_virt() have been fixed to use the dma mapping interfaces or have been removed now. This means the definitions on most architectures, and the CONFIG_VIRT_TO_BUS symbol are now obsolete and can be removed. The

[PATCH v2 2/3] scsi: BusLogic remove bus_to_virt

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The BusLogic driver is the last remaining driver that relies on the deprecated bus_to_virt() function, which in turn only works on a few architectures, and is incompatible with both swiotlb and iommu support. Before commit 391e2f25601e ("[SCSI] BusLogic: Port driver to

[PATCH v2 0/3] phase out CONFIG_VIRT_TO_BUS

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The virt_to_bus/bus_to_virt interface has been deprecated for decades. After Jakub Kicinski put a lot of work into cleaning out the network drivers using them, there are only a couple of other drivers left, which can all be removed or otherwise cleaned up, to remove the old

[PATCH v2 1/3] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency

2022-06-17 Thread Arnd Bergmann
From: Arnd Bergmann The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008, but it still has a stale reference in an error handling code path that could never work. Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency. The alternative to this would be to just

Re: [PATCH v13 0/9] ACPI/IORT: Support for IORT RMR node

2022-06-17 Thread Steven Price
On 15/06/2022 11:10, Shameer Kolothum wrote: > Hi > > v12 --> v13 > -No changes. Rebased to 5.19-rc1. > -Picked up tags received from Laurentiu, Hanjun and Will. Thanks!. You've already got my Tested-by tags, but just to confirm I gave this a spin and it works fine. Thanks, Steve > >

Re: [PATCH v3 6/6] iommu: mtk_iommu: Lookup phandle to retrieve syscon to pericfg

2022-06-17 Thread Matthias Brugger
On 15/06/2022 14:28, AngeloGioacchino Del Regno wrote: Il 15/06/22 14:09, Matthias Brugger ha scritto: On 09/06/2022 12:08, AngeloGioacchino Del Regno wrote: On some SoCs (of which only MT8195 is supported at the time of writing), the "R" and "W" (I/O) enable bits for the IOMMUs are in the

[CFP LPC 2022] VFIO/IOMMU/PCI Microconference

2022-06-17 Thread Jörg Rödel
Hello everyone! We are pleased to announce that there will be another VFIO/IOMMU/PCI Microconference at this year's Linux Plumbers Conference (LPC), from 12th to the 14th of September in Dublin, Ireland. LPC is a hybrid event this year; attendance can be in person or remote. In this

Re: [PATCH] uacce: fix concurrency of fops_open and uacce_remove

2022-06-17 Thread Zhangfei Gao
On 2022/6/17 下午2:05, Zhangfei Gao wrote: On 2022/6/16 下午4:14, Jean-Philippe Brucker wrote: On Thu, Jun 16, 2022 at 12:10:18PM +0800, Zhangfei Gao wrote: diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 281c54003edc..b6219c6bfb48 100644 ---

RE: [PATCH v8 05/11] iommu/vt-d: Add SVA domain support

2022-06-17 Thread Tian, Kevin
> From: Lu Baolu > Sent: Tuesday, June 7, 2022 9:50 AM > > + > +static const struct iommu_domain_ops intel_svm_domain_ops = { > + .set_dev_pasid = intel_svm_attach_dev_pasid, > + .block_dev_pasid= intel_svm_detach_dev_pasid, > + .free =

RE: [PATCH v8 04/11] iommu: Add sva iommu_domain support

2022-06-17 Thread Tian, Kevin
> From: Baolu Lu > Sent: Friday, June 10, 2022 3:16 PM > > > >> +#define __IOMMU_DOMAIN_HOST_VA(1U << 5) /* Host CPU virtual > address */ > > > > Do you mean general CPU VA? or Host CPU VA, I'm reading the latter as > 2nd > > stage? > > Host CPU VA. In the near future, we will add another

Re: [PATCH] iommu/ipmmu-vmsa: Fix compatible for rcar-gen4

2022-06-17 Thread Geert Uytterhoeven
On Fri, Jun 17, 2022 at 3:16 AM Yoshihiro Shimoda wrote: > Fix compatible string for R-Car Gen4. > > Fixes: ae684caf465b ("iommu/ipmmu-vmsa: Add support for R-Car Gen4") > Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert --

Re: [PATCH] uacce: fix concurrency of fops_open and uacce_remove

2022-06-17 Thread Zhangfei Gao
On 2022/6/16 下午4:14, Jean-Philippe Brucker wrote: On Thu, Jun 16, 2022 at 12:10:18PM +0800, Zhangfei Gao wrote: diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c index 281c54003edc..b6219c6bfb48 100644 --- a/drivers/misc/uacce/uacce.c +++ b/drivers/misc/uacce/uacce.c @@