[PATCH v3 9/9] iommu/vt-d: Remove the obsolete per iommu pasid tables

2018-06-18 Thread Lu Baolu
The obsolete per iommu pasid tables are no longer used. Hence, clean up them. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Liu Yi L --- drivers/iommu/intel-iommu.c | 6 +++--- drivers/iommu/intel-svm.c | 17 ++--- include/linux/

[PATCH v3 8/9] iommu/vt-d: Apply per pci device pasid table in SVA

2018-06-18 Thread Lu Baolu
This patch applies the per pci device pasid table in the Shared Virtual Address (SVA) implementation. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Liu Yi L --- drivers/iommu/intel-iommu.c | 29 + drivers/iommu/intel

[PATCH v3 7/9] iommu/vt-d: Allocate and free pasid table

2018-06-18 Thread Lu Baolu
This patch allocates a PASID table for a PCI device at the time when the dmar dev_info is attached to dev->archdata.iommu, and free it in the opposite case. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Liu Yi L --- drivers/iommu/intel-iommu.c

[PATCH v3 6/9] iommu/vt-d: Per PCI device pasid table interfaces

2018-06-18 Thread Lu Baolu
This patch adds the interfaces for per PCI device pasid table management. Currently we allocate one pasid table for all PCI devices under the scope of an IOMMU. It's insecure in some cases where multiple devices under one single IOMMU unit support PASID features. With per PCI device pasid table, we

[PATCH v3 5/9] iommu/vt-d: Add for_each_device_domain() helper

2018-06-18 Thread Lu Baolu
This adds a helper named for_each_device_domain() to iterate over the elements in device_domain_list and invoke a callback against each element. This allows to search the device_domain list in other source files. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu

[PATCH v3 4/9] iommu/vt-d: Move device_domain_info to header

2018-06-18 Thread Lu Baolu
This allows the per device iommu data and some helpers to be used in other files. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Liu Yi L --- drivers/iommu/intel-iommu.c | 62 +++-- include/linux/intel-iommu.h

[PATCH v3 3/9] iommu/vt-d: Apply global PASID in SVA

2018-06-18 Thread Lu Baolu
This patch applies the global pasid name space in the shared virtual address (SVA) implementation. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Reviewed-by: Liu Yi L --- drivers/iommu/intel-svm.c | 22 +++--- incl

[PATCH v3 2/9] iommu/vt-d: Avoid using idr_for_each_entry()

2018-06-18 Thread Lu Baolu
idr_for_each_entry() is used to iteratte over idr elements of a given type. It isn't suitable for the globle pasid idr since the pasid idr consumer could specify different types of pointers to bind with a pasid. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Lu Baolu R

[PATCH v3 1/9] iommu/vt-d: Global PASID name space

2018-06-18 Thread Lu Baolu
This adds the system wide PASID name space for the PASID allocation. Currently we are using per IOMMU PASID name spaces which are not suitable for some use cases. For an example, one application (associated with a PASID) might talk to two physical devices simultaneously while the two devices could

[PATCH v3 0/9] iommu/vt-d: Improve PASID id and table management

2018-06-18 Thread Lu Baolu
Hi, This patch set improves the PASID id and PASID table management for Intel IOMMU driver. PATCH 1~3 replace per IOMMU idr name space with a global one. Current per IOMMU idr doesn't work in some cases where one application (associated with a PASID) might talk to two physical devices simultaneou

[GIT PULL] dma-mapping file renames for Linux 4.18

2018-06-18 Thread Christoph Hellwig
Hi Linus, below is a rename of the assorted dma-mapping files to that they live under kernel/dma and lose their dma-* prefixes. If there is any time to do this it is right after -rc1, so let me know if this is something you'd take. The following changes since commit be779f03d563981c65cc7417cc5e

Re: [PATCH 4/4 V3] Help to dump the old memory encrypted into vmcore file

2018-06-18 Thread Dave Young
On 06/16/18 at 04:27pm, Lianbo Jiang wrote: > In kdump mode, we need to dump the old memory into vmcore file, > if SME is enabled in the first kernel, we must remap the old > memory in encrypted manner, which will be automatically decrypted > when we read from DRAM. It helps to parse the vmcore for

[PATCH 1/1] iommu/vt-d: Remove unnecessary WARN_ON()

2018-06-18 Thread Lu Baolu
When drivers call intel_svm_available() to check whether the Shared Virtual Memory(SVM) is supported by the IOMMU driver, they will get a warning in the kernel message if the SVM is not supported by the hardware. [3.790876] WARNING: CPU: 0 PID: 267 at drivers/iommu/intel-svm.c:334 intel_svm_b

[PATCH] iommu/io-pgtable-arm: Fix pgtable allocation in selftest

2018-06-18 Thread Jean-Philippe Brucker
Commit 4b123757eeaa ("iommu/io-pgtable-arm: Make allocations NUMA-aware") added a NUMA hint to page table allocation, but the pgtable selftest doesn't provide an SMMU device parameter. Since dev_to_node doesn't accept a NULL argument, add a special case for selftest. Signed-off-by: Jean-Philippe B