Re: [PATCH v3] of_device: removed #include that caused a recursion in included headers

2020-04-22 Thread kbuild test robot
Hi Hadar, Thank you for the patch! Yet something to improve: [auto build test ERROR on sparc/master] [also build test ERROR on stm32/stm32-next linus/master v5.7-rc2 next-20200422] [cannot apply to sparc-next/master] [if your patch is applied to the wrong git tree, please drop us a note to help

Re: [PATCH 0/7] x86: tag application address space for devices

2020-04-22 Thread Fenghua Yu
On Mon, Mar 30, 2020 at 12:33:01PM -0700, Fenghua Yu wrote: > Typical hardware devices require a driver stack to translate application > buffers to hardware addresses, and a kernel-user transition to notify the > hardware of new work. What if both the translation and transition overhead > could be

Re: [PATCH] iommu/arm-smmu: Demote error messages to debug in shutdown callback

2020-04-22 Thread Doug Anderson
Hi, On Tue, Mar 31, 2020 at 12:53 AM Sai Prakash Ranjan wrote: > > Hi Will, > > On 2020-03-31 13:14, Will Deacon wrote: > > On Tue, Mar 31, 2020 at 01:06:11PM +0530, Sai Prakash Ranjan wrote: > >> On 2020-03-30 23:54, Doug Anderson wrote: > >> > On Sat, Mar 28, 2020 at 12:35 AM Sai Prakash Ranjan

[PATCH] iommu: Free fwspec with the dev_iommu object

2020-04-22 Thread Jean-Philippe Brucker
Kmemleak reports that iommu_fwspec is leaked during device probe deferral. For example: 1. The first device probe allocates a dev_iommu and a fwspec, then returns with -EPROBE_DEFER (because the IOMMU hasn't been probed yet). 2. The IOMMU driver registers the IOMMU on the PCI bus, which cal

[PATCH] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system

2020-04-22 Thread Suravee Suthikulpanit
Currently, system fails to boot because the legacy interrupt remapping mode does not enable 128-bit IRTE (GA), which is required for x2APIC support. Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting with kernel option amd_iommu_intr=legacy instead. The initialization logic will check GAS

Re: [PATCH v3] of_device: removed #include that caused a recursion in included headers

2020-04-22 Thread Liviu Dudau
On Mon, Apr 20, 2020 at 06:04:29PM +0300, Hadar Gat wrote: > Both of_platform.h and of_device.h were included each other. > In of_device.h, removed unneeded #include to of_platform.h > and added include to of_platform.h in the files that needs it. > > Signed-off-by: Hadar Gat > Reported-by: kbuil

[PATCH v3 4/4] iommu/vt-d: Remove redundant IOTLB flush

2020-04-22 Thread Lu Baolu
IOTLB flush already included in the PASID tear down and the page request drain process. There is no need to flush again. Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu --- drivers/iommu/intel-svm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu

[PATCH v3 1/4] iommu/vt-d: Multiple descriptors per qi_submit_sync()

2020-04-22 Thread Lu Baolu
Current qi_submit_sync() only supports single invalidation descriptor per submission and appends wait descriptor after each submission to poll the hardware completion. This extends the qi_submit_sync() helper to support multiple descriptors, and add an option so that the caller could specify the Pa

[PATCH v3 3/4] iommu/vt-d: Add page request draining support

2020-04-22 Thread Lu Baolu
When a PASID is stopped or terminated, there can be pending PRQs (requests that haven't received responses) in remapping hardware. This adds the interface to drain page requests and call it when a PASID is terminated. Signed-off-by: Jacob Pan Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu ---

[PATCH v3 0/4] iommu/vt-d: Add page request draining support

2020-04-22 Thread Lu Baolu
When a PASID is stopped or terminated, there can be pending PRQs (requests that haven't received responses) in the software and remapping hardware. The pending page requests must be drained so that the pasid could be reused. The chapter 7.10 in the VT-d specification specifies the software steps to

[PATCH v3 2/4] iommu/vt-d: debugfs: Add support to show inv queue internals

2020-04-22 Thread Lu Baolu
Export invalidation queue internals of each iommu device through the debugfs. Example of such dump on a Skylake machine: $ sudo cat /sys/kernel/debug/iommu/intel/invalidation_queue Invalidation queue on IOMMU: dmar1 Base: 0x1672c9000 Head: 80Tail: 80 Index qw0