Re: [PATCH v2] iommu: amd: Fix IO_PAGE_FAULT due to __unmap_single() size overflow

2020-07-30 Thread Greg KH
On Wed, Jun 24, 2020 at 01:58:27PM +0200, Joerg Roedel wrote: > Hi Greg, > > On Wed, Jun 24, 2020 at 11:09:06AM +0200, Greg KH wrote: > > So what exact stable kernel version(s) do you want to see this patch > > applied to? > > It is needed in kernels <= v5.4. Linux v5.5 has replaced the code with

RE: [PATCH v3 4/4] vfio/type1: Use iommu_aux_at(de)tach_group() APIs

2020-07-30 Thread Liu, Yi L
> From: Lu Baolu > Sent: Tuesday, July 14, 2020 1:57 PM > > Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group(). > It also saves the IOMMU_DEV_FEAT_AUX-capable physcail device in the vfio_group > data structure so that it could be reused in other places. > > Signed-off-by: Lu

Re: [PATCH 04/15] arm64: numa: simplify dummy_numa_init()

2020-07-30 Thread Catalin Marinas
On Tue, Jul 28, 2020 at 08:11:42AM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > dummy_numa_init() loops over memblock.memory and passes nid=0 to > numa_add_memblk() which essentially wraps memblock_set_node(). However, > memblock_set_node() can cope with entire memory span itself, so the

Re: [PATCH 06/15] powerpc: fadamp: simplify fadump_reserve_crash_area()

2020-07-30 Thread Michael Ellerman
Mike Rapoport writes: > From: Mike Rapoport > > fadump_reserve_crash_area() reserves memory from a specified base address > till the end of the RAM. > > Replace iteration through the memblock.memory with a single call to > memblock_reserve() with appropriate that will take care of proper memory

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Jim Quinlan via iommu
On Wed, Jul 29, 2020 at 10:28 AM Rob Herring wrote: > > On Wed, Jul 29, 2020 at 12:19 AM Christoph Hellwig wrote: > > > > On Tue, Jul 28, 2020 at 02:24:51PM -0400, Jim Quinlan wrote: > > > I started using devm_kcalloc() but at least two reviewers convinced me > > > to just use kcalloc(). In addi

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Nicolas Saenz Julienne
On Thu, 2020-07-30 at 12:44 -0400, Jim Quinlan wrote: > On Wed, Jul 29, 2020 at 10:28 AM Rob Herring wrote: > > On Wed, Jul 29, 2020 at 12:19 AM Christoph Hellwig wrote: > > > On Tue, Jul 28, 2020 at 02:24:51PM -0400, Jim Quinlan wrote: > > > > I started using devm_kcalloc() but at least two revi

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Nicolas Saenz Julienne
Hi Jim, On Fri, 2020-07-24 at 16:33 -0400, Jim Quinlan wrote: > static void __init of_unittest_pci_dma_ranges(void) > diff --git a/drivers/pci/controller/pcie-brcmstb.c > b/drivers/pci/controller/pcie-brcmstb.c > index bfc2542d54a8..8dacb9d3b7b6 100644 > --- a/drivers/pci/controller/pcie-brcmstb

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Jim Quinlan via iommu
On Thu, Jul 30, 2020 at 1:05 PM Nicolas Saenz Julienne wrote: > > Hi Jim, > > On Fri, 2020-07-24 at 16:33 -0400, Jim Quinlan wrote: > > static void __init of_unittest_pci_dma_ranges(void) > > diff --git a/drivers/pci/controller/pcie-brcmstb.c > > b/drivers/pci/controller/pcie-brcmstb.c > > index

Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-30 Thread Nicolas Saenz Julienne
On Thu, 2020-07-30 at 13:25 -0400, Jim Quinlan wrote: > On Thu, Jul 30, 2020 at 1:05 PM Nicolas Saenz Julienne > wrote: > > Hi Jim, > > > > On Fri, 2020-07-24 at 16:33 -0400, Jim Quinlan wrote: > > > static void __init of_unittest_pci_dma_ranges(void) > > > diff --git a/drivers/pci/controller/pc

Re: [PATCH v3 2/4] iommu: Add iommu_aux_at(de)tach_group()

2020-07-30 Thread Alex Williamson
On Wed, 29 Jul 2020 23:34:40 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, July 30, 2020 4:04 AM > > > > On Thu, 16 Jul 2020 09:07:46 +0800 > > Lu Baolu wrote: > > > > > Hi Jacob, > > > > > > On 7/16/20 12:01 AM, Jacob Pan wrote: > > > > On Wed, 15 Jul 2020 08:4

Re: [PATCH v3 3/4] iommu: Add iommu_aux_get_domain_for_dev()

2020-07-30 Thread Alex Williamson
On Wed, 29 Jul 2020 23:49:20 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, July 30, 2020 4:25 AM > > > > On Tue, 14 Jul 2020 13:57:02 +0800 > > Lu Baolu wrote: > > > > > The device driver needs an API to get its aux-domain. A typical usage > > > scenario is: > > >

Re: [PATCH v3 4/4] vfio/type1: Use iommu_aux_at(de)tach_group() APIs

2020-07-30 Thread Alex Williamson
On Thu, 30 Jul 2020 10:41:32 +0800 Lu Baolu wrote: > Hi Alex, > > On 7/30/20 4:32 AM, Alex Williamson wrote: > > On Tue, 14 Jul 2020 13:57:03 +0800 > > Lu Baolu wrote: > > > >> Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group(). > >> It also saves the IOMMU_DEV_FEAT_AUX-

RE: [PATCH v3 3/4] iommu: Add iommu_aux_get_domain_for_dev()

2020-07-30 Thread Tian, Kevin
> From: Alex Williamson > Sent: Friday, July 31, 2020 4:17 AM > > On Wed, 29 Jul 2020 23:49:20 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson > > > Sent: Thursday, July 30, 2020 4:25 AM > > > > > > On Tue, 14 Jul 2020 13:57:02 +0800 > > > Lu Baolu wrote: > > > > > > > The device d

Re: [PATCH] dma-pool: Do not allocate pool memory from CMA

2020-07-30 Thread Nathan Chancellor
On Tue, Jul 28, 2020 at 12:09:18PM +0200, Christoph Hellwig wrote: > Ok, I found a slight bug that wasn't intended. I wanted to make sure > we can always fall back to a lower pool, but got that wrong. Should be > fixed in the next version. Hi Christoph and Nicolas, Did a version of that series

Re: [PATCH v3 4/4] vfio/type1: Use iommu_aux_at(de)tach_group() APIs

2020-07-30 Thread Lu Baolu
Hi Alex, On 7/31/20 5:17 AM, Alex Williamson wrote: On Thu, 30 Jul 2020 10:41:32 +0800 Lu Baolu wrote: Hi Alex, On 7/30/20 4:32 AM, Alex Williamson wrote: On Tue, 14 Jul 2020 13:57:03 +0800 Lu Baolu wrote: Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group(). It als

Re: [PATCH v3 4/4] vfio/type1: Use iommu_aux_at(de)tach_group() APIs

2020-07-30 Thread Lu Baolu
Hi Yi, On 7/30/20 5:36 PM, Liu, Yi L wrote: From: Lu Baolu Sent: Tuesday, July 14, 2020 1:57 PM Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group(). It also saves the IOMMU_DEV_FEAT_AUX-capable physcail device in the vfio_group data structure so that it could be reused in ot

RE: [PATCH v3 3/4] iommu: Add iommu_aux_get_domain_for_dev()

2020-07-30 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Friday, July 31, 2020 8:26 AM > > > From: Alex Williamson > > Sent: Friday, July 31, 2020 4:17 AM > > > > On Wed, 29 Jul 2020 23:49:20 + > > "Tian, Kevin" wrote: > > > > > > From: Alex Williamson > > > > Sent: Thursday, July 30, 2020 4:25 AM > > > > > > > > On Tu

Re: [PATCH v3 2/4] iommu: Add iommu_aux_at(de)tach_group()

2020-07-30 Thread Lu Baolu
Hi Alex, On 2020/7/31 3:46, Alex Williamson wrote: On Wed, 29 Jul 2020 23:34:40 + "Tian, Kevin" wrote: From: Alex Williamson Sent: Thursday, July 30, 2020 4:04 AM On Thu, 16 Jul 2020 09:07:46 +0800 Lu Baolu wrote: Hi Jacob, On 7/16/20 12:01 AM, Jacob Pan wrote: On Wed, 15 Jul 20

Re: [PATCH 1/1] iommu/arm-smmu: Implement qcom,skip-init

2020-07-30 Thread Bjorn Andersson
On Wed 22 Jul 13:11 PDT 2020, Konrad Dybcio wrote: > >Is the problem on SDM630 that when you write to SMR/S2CR the device > >reboots? Or that when you start writing out the context bank > >configuration that trips the display and the device reboots? > > I added some debug prints and the phone han

Re: [PATCH v3 3/4] iommu: Add iommu_aux_get_domain_for_dev()

2020-07-30 Thread Lu Baolu
Hi Alex, On 2020/7/30 4:25, Alex Williamson wrote: On Tue, 14 Jul 2020 13:57:02 +0800 Lu Baolu wrote: The device driver needs an API to get its aux-domain. A typical usage scenario is: unsigned long pasid; struct iommu_domain *domain; struct device *dev = mdev_dev(