[PATCH] iommu/vt-d fix adding non-PCI devices to Intel IOMMU

2019-12-26 Thread Patrick Steinhardt
Starting with commit fa212a97f3a3 ("iommu/vt-d: Probe DMA-capable ACPI name space devices"), we now probe DMA-capable ACPI name space devices. On Dell XPS 13 9343, which has an Intel LPSS platform device INTL9C60 enumerated via ACPI, this change leads to the following warning: [

[PATCH 2/3] iommu/arm-smmu: Expose s2cr and smr structs to impl

2019-12-26 Thread Bjorn Andersson
Move the arm_smmu_s2cr and arm_smmu_smr structs to the internal header file, in order to expose them to the platform specific arm-smmu implementations. Signed-off-by: Bjorn Andersson --- Changes since RFC: - New patch drivers/iommu/arm-smmu.c | 14 -- drivers/iommu/arm-smmu.h | 14

[PATCH 0/3] iommu/arm-smmu: Qualcomm bootsplash/efifb

2019-12-26 Thread Bjorn Andersson
These patches implements the stream mapping inheritance that's necessary in order to not hit a security violation as the display hardware looses its stream mapping during initialization of arm-smmu in various Qualcomm platforms. This was previously posted as an RFC [1], changes since then

[PATCH 3/3] iommu/arm-smmu: Allow inherting stream mapping from bootloader

2019-12-26 Thread Bjorn Andersson
The Qualcomm bootloaders leaves the IOMMU with stream mapping for the display hardware to be able to read the framebuffer memory in DDR, to continuously display a boot splash or to implement EFI framebuffer. This patch implements support for implementations to pin stream mappings and adds the

[PATCH 1/3] iommu/arm-smmu: Don't blindly use first SMR to calculate mask

2019-12-26 Thread Bjorn Andersson
With the SMRs inherited from the bootloader the first SMR might actually be valid and in use. As such probing the SMR mask using the first SMR might break a stream in use. Search for an unused stream and use this to probe the SMR mask. Signed-off-by: Bjorn Andersson --- Changes since RFC: -

[PATCH] iommu/arm-smmu-v3: fix resource_size check

2019-12-26 Thread Masahiro Yamada
This is an off-by-one mistake. resource_size() returns res->end - res->start + 1. Signed-off-by: Masahiro Yamada --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index

[PATCH 1/2] iommu/arm-smmu-v3: constify arm_smmu_options[]

2019-12-26 Thread Masahiro Yamada
This is a read-only array. Signed-off-by: Masahiro Yamada --- drivers/iommu/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index b463599559d2..ed9933960370 100644 --- a/drivers/iommu/arm-smmu-v3.c +++

[PATCH 2/2] iommu/arm-smmu-v3: simplify parse_driver_options()

2019-12-26 Thread Masahiro Yamada
Using ARRAY_SIZE() instead of the sentinel is slightly simpler, IMHO. Signed-off-by: Masahiro Yamada --- drivers/iommu/arm-smmu-v3.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index