Hi Jerry,
On 6/1/20 9:17 PM, Jerry Snitselaar wrote:
On Mon Jun 01 20, Jerry Snitselaar wrote:
On Fri May 29 20, Jerry Snitselaar wrote:
On Tue Apr 14 20, Joerg Roedel wrote:
Hi,
here is the second version of this patch-set. The first version with
some more introductory text can be found
Hi Jerry,
On 6/1/20 6:42 PM, Jerry Snitselaar wrote:
Hi Joerg,
With this patchset, I have an epyc system where if I boot with
iommu=nopt and force a dump I will see some io page faults for a nic
on the system. The vmcore is harvested and the system reboots. I
haven't reproduced it on other
disable 32bit support for now and claim support only when all the
missing pieces are ready in the future.
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode")
Suggested-by: Joerg Roedel
Signed-off-by: Lu Baolu
---
drivers/iommu/Kconfig | 2 +-
1 file changed, 1
-level translation.
Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level")
Reported-by: Xin Zeng
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 5 ++---
include/linux/intel-iommu.h | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel
Hi Joerg,
This encloses two fixes for v5.8.
- Make Intel SVM code 64-bit only
- Set U/S bit to make IOVA over first level compatible with 2nd level
translations.
Best regards,
baolu
Lu Baolu (2):
iommu/vt-d: Make Intel SVM code 64-bit only
iommu/vt-d: Set U/S bit in first level page table
On 5/29/20 2:03 AM, Jacob Pan wrote:
Make intel_svm_unbind_mm() a static function.
Fixes: 064a57d7ddfc ("iommu/vt-d: Replace intel SVM APIs with generic
SVA APIs")
Reported-by: kbuild test robot
Signed-off-by: Jacob Pan
Acked-by: Lu Baolu
Best regards,
baolu
---
drivers/i
static int
^
Signed-off-by: Qian Cai
Fixes: 6ee1b77ba3ac0 ("iommu/vt-d: Add svm/sva invalidate function")
Acked-by: Lu Baolu
Best regards,
baolu
---
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers
flushing more translation cache types
iommu/vt-d: Add svm/sva invalidate function
iommu/vt-d: Add custom allocator for IOASID
Lu Baolu (1):
iommu/vt-d: Enlightened PASID allocation
drivers/iommu/dmar.c| 40 ++
drivers/iommu/intel
Hi Jacob,
On 2020/5/14 23:57, Jacob Pan wrote:
Hi Christoph,
Thanks a lot for the reviews, comments below.
Jacob
On Wed, 13 May 2020 22:59:30 -0700
Christoph Hellwig wrote:
+ if (dev_is_pci(dev)) {
+ /* VT-d supports devices with full 20 bit PASIDs
only */
+
Hi Joerg,
On 2020/5/15 17:45, Joerg Roedel wrote:
From: Joerg Roedel
The IOMMU core code has support for deferring the attachment of a domain
to a device. This is needed in kdump kernels where the new domain must
not be attached to a device before the device driver takes it over.
But this
Hi Jacob,
On 5/14/20 11:57 PM, Jacob Pan wrote:
+ /*
+* PASID table is per device for better security.
Therefore, for
+* each bind of a new device even with an existing PASID,
we need to
+* call the nested mode setup function here.
+*/
+
the Page-request Drain (PD) bit in the wait descriptor.
Signed-off-by: Jacob Pan
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/dmar.c| 63 +
drivers/iommu/intel-pasid.c | 4 +-
drivers/iommu/intel-svm.c | 6
8 0014
9 000200250001672be824
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/intel-iommu-debugfs.c | 62 +
1
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
Reviewed-by: Kevin Tian
---
drivers/iommu/intel-svm.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff
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
in the mm notifier and will clear it when the pasid is unbound.
Signed-off-by: Lu Baolu
Reviewed-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 4 ++--
drivers/iommu/intel-pasid.c | 26 +-
drivers/iommu/intel-pasid.h | 4 +++-
drivers/iommu/intel-svm.c | 9 ++---
4
erialized, no need to consider reentrance;
- Ensure no new-coming prq before drain prq in queue;
- Handle page request overflow case.
v1->v2:
- Fix race between multiple prq handling threads.
Lu Baolu (5):
iommu/vt-d: Multiple descriptors per qi_submit_sync()
iommu/vt-d: debugfs:
Hi Joerg,
On 5/6/20 9:59 AM, Lu Baolu wrote:
Some devices are required to use a specific type (identity or dma) of
default domain when they are used with a vendor iommu. When the system
level default domain type is different from it, the vendor iommu driver
has to request a new default domain
Hi Uwe,
Have you tried commenting out intel_disable_iommus() in
intel_iommu_shutdowan()?
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 0182cff2c7ac..532e62600f95 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4928,8 +4928,10 @@ void
On 5/8/20 10:12 AM, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, May 7, 2020 9:23 PM
Hi Kevin,
On 2020/5/7 13:45, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, May 7, 2020 8:56 AM
When a PASID is used for SVA by the device, it's possible that the PASID
entry is cleared before
Hi Kevin,
On 5/7/20 2:35 PM, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, May 7, 2020 8:56 AM
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
On 5/8/20 12:55 AM, Jacob Pan wrote:
On Thu, 7 May 2020 08:55:32 +0800
Lu Baolu wrote:
When a PASID is used for SVA by the device, it's possible that the
PASID entry is cleared before the device flushes all ongoing DMA
requests. The IOMMU should ignore the non-recoverable faults caused
Hi Jacob,
On 5/8/20 12:47 AM, Jacob Pan wrote:
Hi Baolu,
Very helpful feature, thanks for doing this. Just a small suggestion.
Thanks a lot for reviewing my patch.
On Thu, 7 May 2020 08:55:31 +0800
Lu Baolu wrote:
Export invalidation queue internals of each iommu device through
Hi Kevin,
On 2020/5/7 13:45, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, May 7, 2020 8:56 AM
When a PASID is used for SVA by the device, it's possible that the PASID
entry is cleared before the device flushes all ongoing DMA requests. The
IOMMU should ignore the non-recoverable faults
Hi Kevin,
Thanks a lot for reviewing.
On 2020/5/7 14:38, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, May 7, 2020 8:55 AM
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
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 | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/intel
8 0014
9 000200250001672be824
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu-debugfs.c | 62 +
1 file changed, 62
.
This sets FPD bit when PASID entry is cleared in the mm notifier and
clear it when the pasid is unbound.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 4 ++--
drivers/iommu/intel-pasid.c | 26 +-
drivers/iommu/intel-pasid.h | 3 ++-
drivers/iommu/intel-svm.c
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
alized, no need to consider reentrance;
- Ensure no new-coming prq before drain prq in queue;
- Handle page request overflow case.
v1->v2:
- Fix race between multiple prq handling threads.
Lu Baolu (5):
iommu/vt-d: Multiple descriptors per qi_submit_sync()
iommu/vt-d: debugfs: Ad
the Page-request Drain (PD) bit in the wait descriptor.
Signed-off-by: Jacob Pan
Signed-off-by: Lu Baolu
---
drivers/iommu/dmar.c| 63 +
drivers/iommu/intel-pasid.c | 4 +-
drivers/iommu/intel-svm.c | 6 +--
drivers/iommu
, the
compiler will complain that some functions are defined but not used.
Cc: Daniel Drake
Cc: Derrick Jonathan
Cc: Jerry Snitselaar
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 291 +---
1 file changed, 1 insertion(+), 290 deletions(-)
diff --git
DMA domain at the beginning because all PCI devices behind
the bridge use the same source-id in their transactions and the
domain couldn't be changed at run-time.
Intel IOMMU driver is now aligned with the default domain framework,
there's no need to keep this requirement anymore.
Signed-off-by: Lu Baolu
--
.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 82 -
1 file changed, 26 insertions(+), 56 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index af309e8fa6f5..29d3940847d3 100644
--- a/drivers/iommu/intel-iommu.c
series
will be deprecated due to a race concern between domain switching
and device driver probing.
v1->v2:
- Rename the iommu ops callback to def_domain_type
Lu Baolu (3):
iommu/vt-d: Allow 32bit devices to uses DMA domain
iommu/vt-d: Allow PCI sub-hierarchy to use DMA domain
iommu/vt
On 2020/4/29 21:36, Joerg Roedel wrote:
From: Joerg Roedel
Convert the Intel IOMMU driver to use the probe_device() and
release_device() call-backs of iommu_ops, so that the iommu core code
does the group and sysfs setup.
Signed-off-by: Joerg Roedel
Reviewed-by: Lu Baolu
Best regards
On 2020/4/29 21:36, Joerg Roedel wrote:
From: Joerg Roedel
The Intel VT-d driver already has a matching function to determine the
default domain type for a device. Wire it up in intel_iommu_ops.
Signed-off-by: Joerg Roedel
Reviewed-by: Lu Baolu
Best regards,
baolu
---
drivers/iommu
On 2020/4/29 14:50, Michael S. Tsirkin wrote:
On Wed, Apr 29, 2020 at 01:42:13PM +0800, Lu Baolu wrote:
On 2020/4/29 12:57, Michael S. Tsirkin wrote:
On Wed, Apr 29, 2020 at 10:22:32AM +0800, Lu Baolu wrote:
On 2020/4/29 4:41, Michael S. Tsirkin wrote:
On Tue, Apr 28, 2020 at 11:19:52PM
Hi Jacob,
On 2020/4/29 11:36, Jacob Pan wrote:
On Wed, 22 Apr 2020 16:06:10 +0800
Lu Baolu wrote:
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
On 2020/4/29 12:57, Michael S. Tsirkin wrote:
On Wed, Apr 29, 2020 at 10:22:32AM +0800, Lu Baolu wrote:
On 2020/4/29 4:41, Michael S. Tsirkin wrote:
On Tue, Apr 28, 2020 at 11:19:52PM +0530, Srivatsa Vaddagiri wrote:
* Michael S. Tsirkin [2020-04-28 12:17:57]:
Okay, but how is all
On 2020/4/29 4:41, Michael S. Tsirkin wrote:
On Tue, Apr 28, 2020 at 11:19:52PM +0530, Srivatsa Vaddagiri wrote:
* Michael S. Tsirkin [2020-04-28 12:17:57]:
Okay, but how is all this virtio specific? For example, why not allow
separate swiotlbs for any type of device?
For example, this
By the way, Joerg Roedel is the IOMMU subsystem
maintainer. If you have a v2, please add his email in the "To" list.
You can always use scripts/get_maintainer.pl to check who should the
patch be sent to. :-)
Best regards,
Baolu
On 10/21/19 3:27 PM, Lu Baolu wrote:
Hi John,
On 10/1
46c784ecfe ("iommu/vt-d: Implement is_attach_deferred iommu
ops entry")
Cc: sta...@vger.kernel.org # v5.3+
With above:
Reviewed-by: Lu Baolu
Best regards,
Baolu
Signed-off-by: John Donnelly
---
drivers/iommu/intel-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --gi
Hi Janusz,
On 9/3/19 3:41 PM, Janusz Krzysztofik wrote:
Hi Baolu,
On Tuesday, September 3, 2019 3:29:40 AM CEST Lu Baolu wrote:
Hi Janusz,
On 9/2/19 4:37 PM, Janusz Krzysztofik wrote:
I am not saying that keeping data is not acceptable. I just want to
check whether there are any other
s patch looks good to me.
Reviewed-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 3f974919d3bd..79e35b3180ac 100644
--- a/drivers/iommu/intel-iommu.c
Hi Christoph,
On 10/9/19 2:51 PM, Christoph Hellwig wrote:
On Wed, Oct 09, 2019 at 10:45:15AM +0800, Lu Baolu wrote:
Do you mind explaining why we always return 32 bit here?
See the comment in dma_get_required_mask().
Got it. Thank you.
Best regards,
Baolu
Hi,
On 10/8/19 10:33 PM, Arvind Sankar wrote:
We must return a mask covering the full physical RAM when bypassing the
IOMMU mapping. Also, in iommu_need_mapping, we need to check using
dma_direct_get_required_mask to ensure that the device's dma_mask can
cover physical RAM before deciding to
Hi Peter,
Thanks for reviewing my code.
On 9/25/19 1:21 PM, Peter Xu wrote:
On Mon, Sep 23, 2019 at 08:24:52PM +0800, Lu Baolu wrote:
This adds functions to manipulate first level page tables
which could be used by a scalale mode capable IOMMU unit.
intel_mmmap_range(domain, addr, end
The bounce page implementation depends on swiotlb. Hence, don't
switch off swiotlb if the system has untrusted devices or could
potentially be hot-added with any untrusted devices.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
drivers
-by: Lu Baolu
Tested-by: Xu Pengfei
Tested-by: Mika Westerberg
---
Documentation/admin-guide/kernel-parameters.txt | 5 +
drivers/iommu/intel-iommu.c | 7 +++
2 files changed, 12 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation
This splits the size parameter to swiotlb_tbl_map_single() and
swiotlb_tbl_unmap_single() into an alloc_size and a mapping_size
parameter, where the latter one is rounded up to the iommu page
size.
Suggested-by: Christoph Hellwig
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
This adds trace support for the Intel IOMMU driver. It
also declares some events which could be used to trace
the events when an IOVA is being mapped or unmapped in
a domain.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Mika Westerberg
Signed-off-by: Lu Baolu
Reviewed-by: Steven
avoid code dumplication, but
we found the swiotlb implementations are not ready for the
use of bounce page pool.
https://lkml.org/lkml/2019/3/19/259
- This patch series has been rebased to v5.1-rc2.
Lu Baolu (5):
swiotlb: Split size parameter to map/unmap APIs
iommu/vt-d: Check whether
. To address this, the
Intel IOMMU driver will use bounce pages for those
buffers which don't fill whole IOMMU pages.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
Tested-by: Xu Pengfei
Tested-by: Mika Westerberg
---
drivers/iommu/intel-iommu.c | 258
-by: Lu Baolu
Tested-by: Xu Pengfei
Tested-by: Mika Westerberg
---
Documentation/admin-guide/kernel-parameters.txt | 5 +
drivers/iommu/intel-iommu.c | 6 ++
2 files changed, 11 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation
This adds trace support for the Intel IOMMU driver. It
also declares some events which could be used to trace
the events when an IOVA is being mapped or unmapped in
a domain.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Mika Westerberg
Signed-off-by: Lu Baolu
Reviewed-by: Steven
-by: Lu Baolu
Tested-by: Xu Pengfei
Tested-by: Mika Westerberg
---
Documentation/admin-guide/kernel-parameters.txt | 5 +
drivers/iommu/intel-iommu.c | 6 ++
2 files changed, 11 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt
b/Documentation
. To address this, the
Intel IOMMU driver will use bounce pages for those
buffers which don't fill whole IOMMU pages.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
Tested-by: Xu Pengfei
Tested-by: Mika Westerberg
---
drivers/iommu/intel-iommu.c | 256
This is necessary to avoid exposing valid kernel data to any
malicious device.
Suggested-by: Christoph Hellwig
Signed-off-by: Lu Baolu
---
kernel/dma/swiotlb.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index
The direct dma implementation depends on swiotlb. Hence, don't
switch off swiotlb since direct dma interfaces are used in this
driver.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
drivers/iommu/Kconfig | 1 +
drivers/iommu/intel
This splits the size parameter to swiotlb_tbl_map_single() and
swiotlb_tbl_unmap_single() into an alloc_size and a mapping_size
parameter, where the latter one is rounded up to the iommu page
size.
Suggested-by: Christoph Hellwig
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
There are several places in the kernel where it is necessary to
check whether a device is a pci untrusted device. Add a helper
to simplify the callers.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
include/linux/pci.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include
ussed the possibility
of reusing swiotlb code to avoid code dumplication, but
we found the swiotlb implementations are not ready for the
use of bounce page pool.
https://lkml.org/lkml/2019/3/19/259
- This patch series has been rebased to v5.1-rc2.
Lu Baolu (7):
iommu/vt-d: Don't s
There are several places in the kernel where it is necessary to
check whether a device is a pci untrusted device. Add a helper
to simplify the callers.
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
---
include/linux/pci.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include
This splits the size parameter to swiotlb_tbl_map_single() and
swiotlb_tbl_unmap_single() into an alloc_size and a mapping_size
parameter, where the latter one is rounded up to the iommu page
size.
Suggested-by: Christoph Hellwig
Signed-off-by: Lu Baolu
Reviewed-by: Christoph Hellwig
Hi,
On 7/25/19 8:26 PM, Steven Rostedt wrote:
On Thu, 25 Jul 2019 11:17:16 +0800
Lu Baolu wrote:
This adds trace support for the Intel IOMMU driver. It
also declares some events which could be used to trace
the events when an IOVA is being mapped or unmapped in
a domain.
Cc: Ashok Raj
Cc
Hi,
On 7/25/19 7:43 PM, Christoph Hellwig wrote:
On Thu, Jul 25, 2019 at 03:18:03PM +0800, Lu Baolu wrote:
Don't we need to keep this bit so that we still allow the IOMMU
to act if the device has a too small DMA mask to address all memory in
the system, even if if it should otherwise
Hi,
This is supposed to be fixed by this patch
https://lkml.org/lkml/2019/6/3/115
which is part of several RMRR related fixes and enhancements.
Best regards,
Baolu
On 6/12/19 12:55 AM, Qian Cai wrote:
On Sun, 2019-06-09 at 10:37 +0800, Lu Baolu wrote:
Hi Joerg,
This series includes
Hi,
On 5/28/19 7:50 PM, Eric Auger wrote:
Several call sites are about to check whether a device belongs
to the PCI sub-hierarchy of a candidate PCI-PCI bridge.
Introduce an helper to perform that check.
This looks good to me.
Reviewed-by: Lu Baolu
Best regards,
Baolu
Signed-off
. But domain type saved in iommu_domain is consumed in iommu.c
and exposed to user through sysfs. It's not clean if the iommu driver
silently replace the default domain.
Best regards,
Lu Baolu
Robin.
On Mon, Apr 29, 2019 at 3:16 AM Lu Baolu
wrote:
This adds an optional ops entry to query
_mask(dev)) {
Agreed and will add this in the next version.
Best regards,
Lu Baolu
reasonable to me. Let's listen to more opinions.
Best regards,
Lu Baolu
Hi,
On 3/9/19 7:49 PM, James Sewart wrote:
Hey Lu,
On 9 Mar 2019, at 01:53, Lu Baolu wrote:
Hi James,
On 3/9/19 12:57 AM, James Sewart wrote:
Hey Lu,
On 8 Mar 2019, at 03:09, Lu Baolu wrote:
Do you mind if I work on top of your patches for further cleanups and
sign off a v2 together
Hi James,
On 3/9/19 12:57 AM, James Sewart wrote:
Hey Lu,
On 8 Mar 2019, at 03:09, Lu Baolu wrote:
Do you mind if I work on top of your patches for further cleanups and
sign off a v2 together with you?
Sure, sounds good. I’ll fixup patch 3 and have a go at integrating
iommu_prepare_isa
Hi James,
On 3/7/19 6:21 PM, James Sewart wrote:
Hey Lu,
On 7 Mar 2019, at 06:31, Lu Baolu wrote:
Hi James,
On 3/7/19 2:08 AM, James Sewart wrote:
- /*
-* For each rmrr
-* for each dev attached to rmrr
-* do
-* locate drhd for dev, alloc
Hi,
On 3/7/19 6:21 PM, James Sewart wrote:
Hey Lu,
On 7 Mar 2019, at 06:31, Lu Baolu wrote:
Hi James,
On 3/7/19 2:08 AM, James Sewart wrote:
- /*
-* For each rmrr
-* for each dev attached to rmrr
-* do
-* locate drhd for dev, alloc domain
look great to me. But I do think
we need further cleanups. The rmrr code is one example, and the identity
domain (si_domain) is another.
Do you mind if I work on top of your patches for further cleanups and
sign off a v2 together with you?
Best regards,
Lu Baolu
Hi,
On 3/5/19 7:46 PM, James Sewart wrote:
Hey Lu,
On 5 Mar 2019, at 06:59, Lu Baolu wrote:
Hi,
It's hard for me to understand why do we remove the rmrr related
code in this patch.
The RMRR code removed here requires the lazy allocation of domains to
exist, as it is run before iommu.c
o know whether multiple
domains per group due to lack of ACS consideration will cause any issues
that we need to fix in the stable kernels.
Best regards,
Lu Baolu
Cheers,
James
On 5 Mar 2019, at 06:05, Lu Baolu wrote:
Hi James,
Very glad to see this. Thank you!
On 3/4/19 11:41 PM, James
urn -EINVAL;
+ return -ENOMEM;
This is not related to this patch. Let's do it in a separated patch.
spin_lock_irqsave(_domain_lock, flags);
spin_lock(>lock);
Best regards,
Lu Baolu
ing, right? If so,
why do we need to have a special DOMAIN_FLAG_INITIALISED flag for DMA
domains?
+
/* check if this iommu agaw is sufficient for max mapped address */
addr_width = agaw_to_width(iommu->agaw);
if (addr_width > cap_mgaw(iommu->cap))
Best regards,
Lu Baolu
by pci_device_group.
Is this a bug fix or an improvement? What's the real issue will it cause
if we go without this patch set?
Best regards,
Lu Baolu
Patch 3 permits domain type IOMMU_DOMAIN_DMA to be allocated via the
iommu_ops api, allowing the default_domain of an iommu group to be set in
iommu.c
Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support")
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index abdd165a829c..c9
: Jacob Pan
Reported-by: Dave Jiang
Fixes: 2f26e0a9c9860 ("iommu/vt-d: Add basic SVM PASID support")
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c
index c7
("iommu/vt-d: Add second level page table interface")
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-pasid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel-pasid.c
index 53fe5248d8f1..03b12d2ee213 100644
--- a/dri
Hi Joerg,
This includes several small fixes. All are stable kernel irrelated.
Please consider it for 5.1-rc1.
Best regards,
Lu Baolu
Lu Baolu (4):
iommu/vt-d: Disable ATS support on untrusted devices
iommu/vt-d: Set context field after value initialized
iommu/vt-d: Fix NULL pointer
Cc: Jacob Pan
Cc: Mika Westerberg
Suggested-by: Kevin Tian
Suggested-by: Ashok Raj
Fixes: fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices")
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a
identity mapped domain was replaced with a
normal domain.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Fenghua Yu
Cc: sta...@vger.kernel.org
Reported-by: Jis Ben
Signed-off-by: Lu Baolu
Tested-by: James Dong
---
drivers/iommu/intel-iommu.c | 21 -
1 file changed, 12 insertions(+), 9 de
scribed in the commit message.
Best regards,
Lu Baolu
>From d942e60557fc7ea6fee535fb9a0a7d334d65b636 Mon Sep 17 00:00:00 2001
From: Lu Baolu
Date: Sun, 24 Feb 2019 10:01:03 +0800
Subject: [PATCH 1/1] iommu/vt-d: Check identity map for hot-added devices
The Intel IOMMU driver will put devices into
James
Best regards,
Lu Baolu
Hi
On 2/22/19 1:06 PM, Lu Baolu wrote:
Do you mind checking this?
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 6ecdcf8fc8c0..f62f30bc1339 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2632,6 +2632,9 @@ static struct dmar_domain
ate and initialize new domain for the device */
domain = alloc_domain(0);
if (!domain)
Best regards,
Lu Baolu
Cc: Kevin Tian
Signed-off-by: Sanjay Kumar
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
Reviewed-by: Jean-Philippe Brucker
---
drivers/vfio/vfio_iommu_type1.c | 48 -
1 file changed, 41 insertions(+), 7 deletions(-)
diff --git a/drivers/vfio
This part of code could be used by both normal and aux
domain specific attach entries. Hence move them into a
common function to avoid duplication.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 60 ++---
1
scope)
instead. The added helper supports attaching domain to
groups for both pci and mdev devices.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Sanjay Kumar
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
Reviewed-by: Jean-Philippe Brucker
---
drivers/vfio/vfio_iommu_type1.c
cture-specification
[2]
https://software.intel.com/en-us/download/intel-scalable-io-virtualization-technical-specification
[3] https://schd.ws/hosted_files/lc32018/00/LC3-SIOV-final.pdf
Best regards,
Lu Baolu
Change log:
v6->v7:
- Update PATCH 1/9 and the cover letter with Jean's comments
This moves intel_iommu_enable_pasid() out of the scope of
CONFIG_INTEL_IOMMU_SVM with more and more features requiring
pasid function.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 22 +++---
drivers/iommu/intel-svm.c
This adds the iommu ops entries for aux-domain per-device
feature query and enable/disable.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Sanjay Kumar
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 159
don't need to set the
iommu device if it uses vendor defined isolation.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Cc: Liu Yi L
Suggested-by: Kevin Tian
Suggested-by: Alex Williamson
Signed-off-by: Lu Baolu
Reviewed-by: Jean-Philippe Brucker
---
drivers/vfio/mdev/mdev_core.c
: Kevin Tian
Signed-off-by: Sanjay Kumar
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-iommu.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 8ecf09db6047..b79c72cc5931 100644
--- a/drivers
401 - 500 of 1892 matches
Mail list logo