Re: Device specific pass through in host systems - discuss user interface

2019-06-08 Thread h...@lst.de
Just curious, what exactly is the use case? Explaining how someone would wan to use this should drive the way we design an interface for it. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: Device specific pass through in host systems - discuss user interface

2019-06-08 Thread Sai Praneeth Prakhya
On Sat, 2019-06-08 at 09:27 +0200, h...@lst.de wrote: > Just curious, what exactly is the use case? Explaining how someone > would wan to use this should drive the way we design an interface for it. Makes sense. Some example use cases: 1. Assume an SR-IOV device and if the admin decides to use s

[PATCH 5/6] iommu/vt-d: Cleanup after delegating DMA domain to generic iommu

2019-06-08 Thread Lu Baolu
From: Sai Praneeth Prakhya [No functional changes] 1. Starting with commit df4f3c603aeb ("iommu/vt-d: Remove static identity map code") there are no callers for iommu_prepare_rmrr_dev() but the implementation of the function still exists, so remove it. Also, as a ripple effect remove get_domain_

[PATCH 2/6] iommu/vt-d: Set domain type for a private domain

2019-06-08 Thread Lu Baolu
Otherwise, domain_get_iommu() will be broken. Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu

[PATCH 0/6] iommu/vt-d: Fixes and cleanups for linux-next

2019-06-08 Thread Lu Baolu
Hi Joerg, This series includes several fixes and cleanups after delegating DMA domain to generic iommu. Please review and consider them for linux-next. Best regards, Baolu Lu Baolu (5): iommu/vt-d: Don't return error when device gets right domain iommu/vt-d: Set domain type for a private dom

[PATCH 1/6] iommu/vt-d: Don't return error when device gets right domain

2019-06-08 Thread Lu Baolu
If a device gets a right domain in add_device ops, it shouldn't return error. Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/iommu/intel-

[PATCH 6/6] iommu/vt-d: Consolidate domain_init() to avoid duplication

2019-06-08 Thread Lu Baolu
The domain_init() and md_domain_init() do almost the same job. Consolidate them to avoid duplication. Signed-off-by: Lu Baolu --- drivers/iommu/intel-iommu.c | 123 +++- 1 file changed, 36 insertions(+), 87 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/

[PATCH 3/6] iommu/vt-d: Don't enable iommu's which have been ignored

2019-06-08 Thread Lu Baolu
The iommu driver will ignore some iommu units if there's no device under its scope or those devices have been explicitly set to bypass the DMA translation. Don't enable those iommu units, otherwise the devices under its scope won't work. Fixes: d8190dc638866 ("iommu/vt-d: Enable DMA remapping afte

[PATCH 4/6] iommu/vt-d: Fix suspicious RCU usage in probe_acpi_namespace_devices()

2019-06-08 Thread Lu Baolu
The drhd and device scope list should be iterated with the iommu global lock held. Otherwise, a suspicious RCU usage message will be displayed. [3.695886] = [3.695917] WARNING: suspicious RCU usage [3.695950] 5.2.0-rc2+ #2467 Not tainted [3.695981] -

Re: "iommu/vt-d: Delegate DMA domain to generic iommu" series breaks megaraid_sas

2019-06-08 Thread Lu Baolu
Hi Qian, I just posted some fix patches. I cc'ed them in your email inbox as well. Can you please check whether they happen to fix your issue? If not, do you mind posting more debug messages? Best regards, Baolu On 6/8/19 5:08 AM, Qian Cai wrote: The linux-next series "iommu/vt-d: Delegate DM