RE: [PATCH v2 1/4] iommu/vt-d: Check before setting PGSNP bit in pasid table entry

2022-04-23 Thread Tian, Kevin
> From: Lu Baolu > Sent: Sunday, April 24, 2022 12:38 PM > > On 2022/4/24 11:37, Tian, Kevin wrote: > >>> This should be rebased on top of Jason's enforce coherency series > >>> instead of blindly setting it. No matter whether it's legacy mode > >>> where we set SNP in PTE or scalable mode where

Re: [PATCH v2 1/4] iommu/vt-d: Check before setting PGSNP bit in pasid table entry

2022-04-23 Thread Lu Baolu
On 2022/4/24 11:37, Tian, Kevin wrote: This should be rebased on top of Jason's enforce coherency series instead of blindly setting it. No matter whether it's legacy mode where we set SNP in PTE or scalable mode where we set PGSNP in PASID entry for entire page table, the trigger point should be

RE: [PATCH v2 1/4] iommu/vt-d: Check before setting PGSNP bit in pasid table entry

2022-04-23 Thread Tian, Kevin
> From: Lu Baolu > Sent: Friday, April 22, 2022 9:04 PM > > On 2022/4/22 10:47, Tian, Kevin wrote: > >> From: Lu Baolu > >> Sent: Thursday, April 21, 2022 7:36 PM > >> > >> The latest VT-d specification states that the PGSNP field in the pasid > >> table entry should be treated as Reserved(0)

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-23 Thread Zhangfei Gao
On Sat, 23 Apr 2022 at 19:13, zhangfei@foxmail.com wrote: > > Hi, Jean > > On 2022/4/22 下午11:50, Jean-Philippe Brucker wrote: > > On Fri, Apr 22, 2022 at 09:15:01PM +0800, zhangfei@foxmail.com wrote: > >>> I'm trying to piece together what happens from the kernel point of view. > >>> >

Re: [PATCH 0/2] dma-mapping, remoteproc: Fix dma_mem leak after rproc_shutdown

2022-04-23 Thread Christoph Hellwig
Sigh. In theory drivers should never declare coherent memory like this, and there has been some work to fix remoteproc in that regard. But I guess until that is merged we'll need somthing like this fix. ___ iommu mailing list

[PATCH] dma-direct: don't fail on highmem CMA pages in dma_direct_alloc_pages

2022-04-23 Thread Christoph Hellwig
When dma_direct_alloc_pages encounters a highmem page it just gives up currently. But what we really should do is to try memory using the page allocator instead - without this platforms with a global highmem CMA pool will fail all dma_alloc_pages allocations. Fixes: efa70f2fdc84 ("dma-mapping:

[PATCH] swiotlb-xen: fix DMA_ATTR_NO_KERNEL_MAPPING on arm

2022-04-23 Thread Christoph Hellwig
swiotlb-xen uses very different ways to allocate coherent memory on x86 vs arm. On the former it allocates memory from the page allocator, while on the later it reuses the dma-direct allocator the handles the complexities of non-coherent DMA on arm platforms. Unfortunately the complexities of

Re: fully convert arm to use dma-direct

2022-04-23 Thread Christoph Hellwig
On Sat, Apr 23, 2022 at 11:27:13AM +0100, Marc Zyngier wrote: >> I think Marc Z has a Netwinder that he can test this on. Marc? >> I have one too, just not much in my office because of parental leave. > > I'm about to travel for a week. Can this wait until I'm back? > This is one of the few boxes

Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-23 Thread kernel test robot
drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 base: https://git.kernel.org/pub/scm/linux

Re: [PATCH v4 05/11] iommu/sva: Assign a PASID to mm on PASID allocation and free it on mm exit

2022-04-23 Thread zhangfei....@foxmail.com
Hi, Jean On 2022/4/22 下午11:50, Jean-Philippe Brucker wrote: On Fri, Apr 22, 2022 at 09:15:01PM +0800, zhangfei@foxmail.com wrote: I'm trying to piece together what happens from the kernel point of view. * master process with mm A opens a queue fd through uacce, which calls

Re: fully convert arm to use dma-direct

2022-04-23 Thread Marc Zyngier
On 2022-04-22 22:17, Linus Walleij wrote: On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig wrote: arm is the last platform not using the dma-direct code for directly mapped DMA. With the dmaboune removal from Arnd we can easily switch arm to always use dma-direct now (it already does for

Re: [PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-23 Thread kernel test robot
drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Shameer-Kolothum/ACPI-IORT-Support-for-IORT-RMR-node/20220423-003822 base: https://git.kernel.org/pub/scm/linux

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 17:00, Lu Baolu wrote: On 2022/4/23 16:51, Lu Baolu wrote: On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 16:51, Lu Baolu wrote: On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
On 2022/4/23 16:37, Robin Murphy wrote: On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14 20:42, Robin Murphy wrote: @@

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Robin Murphy
On 2022-04-23 09:01, Lu Baolu wrote: Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14 20:42, Robin Murphy wrote: @@ -1883,27 +1900,12 @@ static int

[PATCH 1/1] iommu/vt-d: Drop stop marker messages

2022-04-23 Thread Lu Baolu
The page fault handling framework in the IOMMU core explicitly states that it doesn't handle PCI PASID Stop Marker and the IOMMU drivers must discard them before reporting faults. This handles Stop Marker messages in prq_event_thread() before reporting events to the core. The VT-d driver

[PATCH 0/1] iommu/vt-d: Fixes for v5.18-rc4

2022-04-23 Thread Lu Baolu
Hi Joerg, One fix is queued for v5.18. It aims to fix: - Handle PCI stop marker messages in IOMMU driver to meet the requirement of I/O page fault handling framework. Please consider it for the iommu/fix branch. Best regards, Lu Baolu Lu Baolu (1): iommu/vt-d: Drop stop marker messages

Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration

2022-04-23 Thread Lu Baolu
Hi Robin, On 2022/4/19 15:20, Robin Murphy wrote: On 2022-04-19 00:37, Lu Baolu wrote: On 2022/4/19 6:09, Robin Murphy wrote: On 2022-04-16 01:04, Lu Baolu wrote: On 2022/4/14 20:42, Robin Murphy wrote: @@ -1883,27 +1900,12 @@ static int iommu_bus_init(struct bus_type *bus)    */   int

Re: [PATCH v2 3/4] iommu/vt-d: Drop stop marker messages

2022-04-23 Thread Lu Baolu
On 2022/4/22 11:05, Tian, Kevin wrote: From: Lu Baolu Sent: Thursday, April 21, 2022 7:36 PM The page fault handling framework in the IOMMU core explicitly states that it doesn't handle PCI PASID Stop Marker and the IOMMU drivers must discard them before reporting faults. This handles Stop

Re: [PATCH] iommu/mediatek: fix NULL pointer dereference when printing dev_name

2022-04-23 Thread kernel test robot
' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Miles-Chen/iommu-mediatek-fix-NULL-pointer-dereference-when-printing-dev_name/20220423-070605 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: hexagon

Re: [PATCH v11 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-04-23 Thread Lu Baolu
On 2022/4/23 13:14, Christoph Hellwig wrote: On Sat, Apr 23, 2022 at 10:04:39AM +0800, Lu Baolu wrote: The generic_iommu_put_resv_regions() itself is a callback. Why bothering adding another callback from the same iommu driver in it? Or, you are going to remove the put_resv_regions from the