Re: [PATCH v3 13/20] PCI/P2PDMA: remove pci_p2pdma_[un]map_sg()

2021-10-05 Thread Max Gurtovoy via iommu
On 9/17/2021 2:40 AM, Logan Gunthorpe wrote: This interface is superseded by support in dma_map_sg() which now supports heterogeneous scatterlists. There are no longer any users, so remove it. Signed-off-by: Logan Gunthorpe --- drivers/pci/p2pdma.c | 65

Re: [PATCH v3 11/20] RDMA/core: introduce ib_dma_pci_p2p_dma_supported()

2021-10-05 Thread Max Gurtovoy via iommu
Logan, On 9/17/2021 2:40 AM, Logan Gunthorpe wrote: Introduce the helper function ib_dma_pci_p2p_dma_supported() to check if a given ib_device can be used in P2PDMA transfers. This ensures the ib_device is not using virt_dma and also that the underlying dma_device supports P2PDMA. Use the new

Re: [PATCH v3 12/20] RDMA/rw: use dma_map_sgtable()

2021-10-05 Thread Max Gurtovoy via iommu
On 9/28/2021 10:43 PM, Jason Gunthorpe wrote: On Thu, Sep 16, 2021 at 05:40:52PM -0600, Logan Gunthorpe wrote: dma_map_sg() now supports the use of P2PDMA pages so pci_p2pdma_map_sg() is no longer necessary and may be dropped. Switch to the dma_map_sgtable() interface which will allow for

Re: [PATCH v3 10/20] nvme-pci: convert to using dma_map_sgtable()

2021-10-05 Thread Max Gurtovoy via iommu
Logan, On 9/17/2021 2:40 AM, Logan Gunthorpe wrote: The dma_map operations now support P2PDMA pages directly. So remove the calls to pci_p2pdma_[un]map_sg_attrs() and replace them with calls to dma_map_sgtable(). dma_map_sgtable() returns more complete error codes than dma_map_sg() and allows

Fitment/Use of IOMMU in KVM world when using PCI-devices

2021-10-05 Thread Ajay Garg
Hi All. I have been learning about a lot of inter-related things, kindly correct me if I am wrong anywhere. Till now, following have been broad observations : a) If we have IOMMU disabled on the host, things work fine in general on a guest. But we cannot a attach a pci-device (physically

[PATCH] dma-mapping: fix the kerneldoc for dma_map_sgtable()

2021-10-05 Thread Logan Gunthorpe
htmldocs began producing the following warnings: kernel/dma/mapping.c:256: WARNING: Definition list ends without a blank line; unexpected unindent. kernel/dma/mapping.c:257: WARNING: Bullet list ends without a blank line; unexpected unindent. Reformatting the list

[PATCH v2 2/2] iommu/vt-d: avoid duplicated removing in __domain_mapping

2021-10-05 Thread Longpeng(Mike)
__domain_mapping() always removes the pages in the range from 'iov_pfn' to 'end_pfn', but the 'end_pfn' is always the last pfn of the range that the caller wants to map. This would introduce too many duplicated removing and leads the map operation take too long, for example: Map

[PATCH v2 1/2] iommu/vt-d: convert the return type of first_pte_in_page to bool

2021-10-05 Thread Longpeng(Mike)
first_pte_in_page() returns boolean value, so let's convert its return type to bool. Signed-off-by: Longpeng(Mike) --- include/linux/intel-iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 05a65eb..a590b00

[PATCH v2 0/2] iommu/vt-d: boost the mapping process

2021-10-05 Thread Longpeng(Mike)
Hi guys, We found that the __domain_mapping() would take too long when the memory region is too large, we try to make it faster in this patchset. The performance number can be found in PATCH 2, please review when you free, thanks. Changes v1 -> v2: - Fix compile warning on i386 [Baolu]

[PATCH v2 1/3] iommu/io-pgtable-arm: Add way to debug pgtable walk

2021-10-05 Thread Rob Clark
From: Rob Clark Add an io-pgtable method to retrieve the raw PTEs that would be traversed for a given iova access. Signed-off-by: Rob Clark --- drivers/iommu/io-pgtable-arm.c | 40 +++--- include/linux/io-pgtable.h | 9 2 files changed, 41

[PATCH v2 0/3] io-pgtable-arm + drm/msm: Extend iova fault debugging

2021-10-05 Thread Rob Clark
From: Rob Clark This series extends io-pgtable-arm with a method to retrieve the page table entries traversed in the process of address translation, and then beefs up drm/msm gpu devcore dump to include this (and additional info) in the devcore dump. The motivation is tracking down an obscure

Re: [PATCH v7 2/9] ACPI/IORT: Add support for RMR node parsing

2021-10-05 Thread Laurentiu Tudor
On 9/17/2021 2:26 PM, Shameerali Kolothum Thodi wrote: > > >> -Original Message- >> From: Jon Nettleton [mailto:j...@solid-run.com] >> Sent: 16 September 2021 12:17 >> To: Shameerali Kolothum Thodi >> Cc: Robin Murphy ; Lorenzo Pieralisi >> ; Laurentiu Tudor ; >> linux-arm-kernel ;