ice outstanding PRQ number patch. Need more test and
will repost later.
Best regards,
baolu
Lu Baolu (2):
iommu/vt-d: Clear PRQ overflow only when PRQ is empty
iommu/vt-d: Use INVALID response code instead of FAILURE
drivers/iommu/intel/svm.c | 18 --
1 file changed, 12 inserti
Hi Kevin,
On 2021/1/25 16:16, Tian, Kevin wrote:
From: Lu Baolu
Sent: Monday, January 25, 2021 2:29 PM
Hi Kevin,
On 2021/1/22 14:38, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, January 21, 2021 9:45 AM
So that the uses could get chances to know what happened.
Suggested-by: Ashok
Hi Kevin,
On 2021/1/22 14:38, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, January 21, 2021 9:45 AM
So that the uses could get chances to know what happened.
Suggested-by: Ashok Raj
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 10 --
1 file changed, 8 insertions
.
Let's use RESPONSE_INVALID instead for now, so that the device state
machine doesn't enter HALT state.
Suggested-by: Ashok Raj
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel
This includes some misc tweaks in the VT-d SVA implementation. I will
plan them for v5.12 if no objections.
Best regards,
baolu
Lu Baolu (3):
iommu/vt-d: Add rate limited information when PRQ overflows
iommu/vt-d: Allow devices to have more than 32 outstanding PRQ
iommu/vt-d: Use INVALID
So that the uses could get chances to know what happened.
Suggested-by: Ashok Raj
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 033b25886e57
IOMMU PRQ queue, but far from optimal for customized use cases.
Signed-off-by: Jacob Pan
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 3 ++-
drivers/iommu/intel/svm.c | 4
include/linux/intel-svm.h | 5 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git
+++--
drivers/iommu/iommu.c | 12
include/linux/iommu.h | 2 ++
3 files changed, 25 insertions(+), 18 deletions(-)
Good fix and improvement. For the patches in this series:
Reviewed-by: Lu Baolu
Best regards,
baolu
iommu/vt-d: Handle non-page aligned address")
Reported-and-tested-by: Guo Kaijie
Signed-off-by: Lu Baolu
Cc: Liu Yi L
---
drivers/iommu/intel/dmar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index 00
+/*
+ * cap_audit.c - audit iommu capabilities for boot time and hot plug
+ *
+ * Copyright (C) 2020 Intel Corporation
Update to 2021. The same to other places.
+ *
+ * Author: Kyung Min Park
+ * Lu Baolu
+ */
+
+#define pr_fmt(fmt)"DMAR: " fmt
+
+#include
+#include "cap_audit.h
Hi Leon,
On 2021/1/16 16:39, Leon Romanovsky wrote:
On Sat, Jan 16, 2021 at 09:20:16AM +0800, Lu Baolu wrote:
Hi,
On 2021/1/15 14:31, Leon Romanovsky wrote:
On Fri, Jan 15, 2021 at 07:49:47AM +0800, Lu Baolu wrote:
Hi Leon,
On 1/14/21 9:26 PM, Leon Romanovsky wrote:
On Thu, Jan 14, 2021
Hi,
On 2021/1/15 14:31, Leon Romanovsky wrote:
On Fri, Jan 15, 2021 at 07:49:47AM +0800, Lu Baolu wrote:
Hi Leon,
On 1/14/21 9:26 PM, Leon Romanovsky wrote:
On Thu, Jan 14, 2021 at 09:30:02AM +0800, Lu Baolu wrote:
Some vendor IOMMU drivers are able to declare that it is running in a VM
to update the certain bits, it's better to set them up at the
beginning.
Suggested-by: Ashok Raj
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 14 --
include/linux/intel-iommu.h | 2 ++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b
Hi Leon,
On 1/14/21 9:26 PM, Leon Romanovsky wrote:
On Thu, Jan 14, 2021 at 09:30:02AM +0800, Lu Baolu wrote:
Some vendor IOMMU drivers are able to declare that it is running in a VM
context. This is very valuable for the features that only want to be
supported on bare metal. Add a capability
: 0x13 0x7001 0x0 0x0
| qi_submit: iotlb_inv dmar2: 0x800f2 0xf9a5 0x0 0x0
This will be helpful for queued invalidation related debugging.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/dmar.c | 3 +++
include/trace/events/intel_iommu.h | 37
The pasid based IOTLB and devTLB invalidation code is duplicate in
several places. Consolidate them by using the common helpers.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/pasid.c | 18 ++--
drivers/iommu/intel/svm.c | 55 ++---
2 files changed, 11
@nanos.tec.linutronix.de/
Link: https://lore.kernel.org/linux-pci/877dqrnzr3@nanos.tec.linutronix.de/
Link: https://lore.kernel.org/linux-pci/877dqqmc2h@nanos.tec.linutronix.de/
Signed-off-by: Lu Baolu
---
arch/x86/pci/common.c | 71 +
drivers/base/platform-msi.c | 8
false in on_bare_metal(). This won't
introduce any regression. The only impact is that the coming new
platform msi feature won't be supported until the vendor specific code
is provided.
Best regards,
baolu
Lu Baolu (2):
iommu: Add capability IOMMU_CAP_VIOMMU
platform-msi: Add platform
Some vendor IOMMU drivers are able to declare that it is running in a VM
context. This is very valuable for the features that only want to be
supported on bare metal. Add a capability bit so that it could be used.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 20
Hi,
On 1/7/21 3:16 PM, Leon Romanovsky wrote:
On Thu, Jan 07, 2021 at 06:55:16AM +, Tian, Kevin wrote:
From: Leon Romanovsky
Sent: Thursday, January 7, 2021 2:09 PM
On Thu, Jan 07, 2021 at 02:04:29AM +, Tian, Kevin wrote:
From: Leon Romanovsky
Sent: Thursday, January 7, 2021 12:02
Hi Will,
On 2021/1/8 22:09, Will Deacon wrote:
Hi Lu,
On Fri, Jan 08, 2021 at 07:52:47AM +0800, Lu Baolu wrote:
On 2021/1/6 9:09, Lu Baolu wrote:
On 2021/1/6 3:03, Will Deacon wrote:
On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote:
@@ -170,6 +172,22 @@ static void
Hi Will,
On 2021/1/7 22:40, Will Deacon wrote:
On Wed, Jan 06, 2021 at 09:14:22AM +0800, Lu Baolu wrote:
On 2021/1/6 3:04, Will Deacon wrote:
On Thu, Dec 31, 2020 at 08:53:21AM +0800, Lu Baolu wrote:
With commit c588072bba6b5 ("iommu/vt-d: Convert intel iommu driver to
the iomm
Hi Will,
On 2021/1/6 9:09, Lu Baolu wrote:
Hi Will,
Happy New Year!
On 2021/1/6 3:03, Will Deacon wrote:
On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote:
The VT-d hardware will ignore those Addr bits which have been masked by
the AM field in the PASID-based-IOTLB invalidation
Hi Will,
On 2021/1/7 21:49, Will Deacon wrote:
On Thu, Jan 07, 2021 at 12:03:56AM +0800, Liu Yi L wrote:
In the existing code, loop all devices attached to a domain does not
include sub-devices attached via iommu_aux_attach_device().
This was found by when I'm working on the below patch,
On 1/7/21 12:01 AM, Leon Romanovsky wrote:
On Wed, Jan 06, 2021 at 11:23:39AM -0400, Jason Gunthorpe wrote:
On Wed, Jan 06, 2021 at 12:40:17PM +0200, Leon Romanovsky wrote:
I asked what will you do when QEMU will gain needed functionality?
Will you remove QEMU from this list? If yes, how such
On 1/6/21 9:35 PM, John Garry wrote:
Function iommu_dev_has_feature() has never been referenced in the tree,
and there does not appear to be anything coming soon to use it, so delete
it.
It will be used by the device driver which want to support the aux-
domain capability, for example, below
Hi Leon,
On 2021/1/6 14:06, Leon Romanovsky wrote:
On Wed, Jan 06, 2021 at 10:27:49AM +0800, Lu Baolu wrote:
The pci_subdevice_msi_create_irq_domain() should fail if the underlying
platform is not able to support IMS (Interrupt Message Storage). Otherwise,
the isolation of interrupt
@nanos.tec.linutronix.de/
Link: https://lore.kernel.org/linux-pci/877dqqmc2h@nanos.tec.linutronix.de/
Signed-off-by: Lu Baolu
---
arch/x86/pci/common.c | 47 +
drivers/base/platform-msi.c | 8 +++
include/linux/msi.h | 1 +
3 files
Hi Will,
On 2021/1/6 3:04, Will Deacon wrote:
On Thu, Dec 31, 2020 at 08:53:21AM +0800, Lu Baolu wrote:
With commit c588072bba6b5 ("iommu/vt-d: Convert intel iommu driver to
the iommu ops"), the trace events for dma map/unmap have no users any
more. Remove them so that they don't sho
Hi Will,
Happy New Year!
On 2021/1/6 3:03, Will Deacon wrote:
On Thu, Dec 31, 2020 at 08:53:20AM +0800, Lu Baolu wrote:
The VT-d hardware will ignore those Addr bits which have been masked by
the AM field in the PASID-based-IOTLB invalidation descriptor. As the
result, if the starting address
mains")
Signed-off-by: Dinghao Liu
Acked-by: Lu Baolu
Best regards,
baolu
---
Changelog:
v2: - Add a check against i instead of setting data to NULL.
---
drivers/iommu/intel/irq_remapping.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/intel/irq_remapping.c
b/dri
On 1/3/21 2:22 PM, dinghao@zju.edu.cn wrote:
On 2021/1/3 12:08, dinghao@zju.edu.cn wrote:
Hi,
On 2021/1/2 17:50, Dinghao Liu wrote:
When irq_domain_get_irq_data() or irqd_cfg() fails
meanwhile i == 0, data allocated by kzalloc() has not
been freed before returning, which leads to
On 2021/1/3 12:08, dinghao@zju.edu.cn wrote:
Hi,
On 2021/1/2 17:50, Dinghao Liu wrote:
When irq_domain_get_irq_data() or irqd_cfg() fails
meanwhile i == 0, data allocated by kzalloc() has not
been freed before returning, which leads to memleak.
Fixes: b106ee63abccb ("irq_remapping/vt-d:
Hi,
On 2021/1/2 17:50, Dinghao Liu wrote:
When irq_domain_get_irq_data() or irqd_cfg() fails
meanwhile i == 0, data allocated by kzalloc() has not
been freed before returning, which leads to memleak.
Fixes: b106ee63abccb ("irq_remapping/vt-d: Enhance Intel IR driver to support
hierarchical
temporary
workaround.
Cc: Tvrtko Ursulin
Cc: Tom Murphy
Cc: Logan Gunthorpe
Signed-off-by: Lu Baolu
---
drivers/iommu/dma-iommu.c | 27 ---
1 file changed, 27 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index f0305e6aac1b.
lock(device_domain_lock);
*** DEADLOCK ***
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index b16a4791acfb..18a9f05df407 100644
--- a/drivers/iommu
is clear
Fix this by using aligned address for PASID-based-IOTLB invalidation.
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode")
Reported-and-tested-by: Guo Kaijie
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 22 --
1 file c
Use IS_ALIGNED() instead. Otherwise, an unaligned address will be ignored.
Fixes: 33cd6e642d6a7 ("iommu/vt-d: Flush PASID-based iotlb for iova over first
level")
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/dmar.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
es defined in the iommu core from now on.
Fixes: c588072bba6b5 ("iommu/vt-d: Convert intel iommu driver to the iommu ops")
Signed-off-by: Lu Baolu
---
include/trace/events/intel_iommu.h | 119 -
1 file changed, 119 deletions(-)
diff --git a/include/trace/events/inte
;pdev),
+ addr, mask);
}
Nit:
list_for_each_entry(sinfo, >subdevices, link_domain) {
info = get_domain_info(sinfo->pdev);
__iommu_flush_dev_iotlb(info, addr, mask);
}
Others look good to me.
Acked-by: Lu Baolu
Best regards,
baolu
spin_unlock_irqrestore(_domain_lock, flags);
}
ook good to me.
Fixes: 67b8e02b5e761 ("iommu/vt-d: Aux-domain specific domain
attach/detach")
Acked-by: Lu Baolu
Best regards,
baolu
---
drivers/iommu/intel/iommu.c | 95 +++--
include/linux/intel-iommu.h | 16 +--
2 files changed, 82 inse
of intel_svm_dev struct.
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode")
Cc: Lu Baolu
Cc: Jacob Pan
Cc: Raj Ashok
Cc: David Woodhouse
Reported-by: Guo Kaijie
Reported-by: Xin Zeng
Signed-off-by: Guo Kaijie
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
This
Hi Yi,
On 2020/12/23 14:27, Liu Yi L wrote:
iommu_flush_dev_iotlb() is called to invalidate caches on device. It only
loops the devices which are full-attached to the domain. For sub-devices,
this is ineffective. This results in invalid caching entries left on the
device. Fix it by adding loop
Hi Bjorn,
On 12/11/20 2:57 AM, Bjorn Helgaas wrote:
On Thu, Dec 10, 2020 at 08:46:24AM +0800, Lu Baolu wrote:
The pci_subdevice_msi_create_irq_domain() should fail if the underlying
platform is not able to support IMS (Interrupt Message Storage). Otherwise,
the isolation of interrupt
Hi David,
On 12/10/20 4:22 PM, David Woodhouse wrote:
On Thu, 2020-12-10 at 08:46 +0800, Lu Baolu wrote:
+/*
+ * We want to figure out which context we are running in. But the hardware
+ * does not introduce a reliable way (instruction, CPUID leaf, MSR, whatever)
+ * which can be manipulated
@nanos.tec.linutronix.de/
Link: https://lore.kernel.org/linux-pci/877dqqmc2h@nanos.tec.linutronix.de/
Signed-off-by: Lu Baolu
---
arch/x86/pci/common.c | 43 +
drivers/base/platform-msi.c | 8 +++
include/linux/msi.h | 1 +
3 files
-EFAULT;
}
pasid = iommu_aux_get_pasid(iommu_domain, iommu_device);
if (pasid < 0) {
vfio_group_put_external_user(vfio_group);
return -EFAULT;
}
/* Program device context with pasid value. */
...
Signed-off-by: Lu Ba
Hi Jerry,
On 12/1/20 1:50 AM, Jerry Snitselaar wrote:
Lu Baolu @ 2020-11-26 19:12 MST:
Hi Jerry,
On 11/27/20 5:35 AM, Jerry Snitselaar wrote:
Lu Baolu @ 2020-11-26 04:01 MST:
Hi Jerry,
On 2020/11/26 4:27, Jerry Snitselaar wrote:
Is there a reason we check the requested guest address
;
}
pasid = iommu_aux_get_pasid(iommu_domain, iommu_device);
if (pasid < 0) {
vfio_group_put_external_user(vfio_group);
return -EFAULT;
}
/* Program device context with pasid value. */
...
Signed-off-by: Lu Ba
Hi Alex,
Thanks a lot for your review comments.
On 12/1/20 4:57 AM, Alex Williamson wrote:
On Thu, 26 Nov 2020 09:27:26 +0800
Lu Baolu wrote:
Add the API for getting the domain from a vfio group. This could be used
by the physical device drivers which rely on the vfio/mdev framework
Hi Jerry,
On 11/27/20 5:35 AM, Jerry Snitselaar wrote:
Lu Baolu @ 2020-11-26 04:01 MST:
Hi Jerry,
On 2020/11/26 4:27, Jerry Snitselaar wrote:
Is there a reason we check the requested guest address width against
the
iommu's mgaw, instead of the agaw that we already know for the iommu?
I've
: 2a2b8eaa5b256 ("iommu: Handle freelists when using deferred flushing in
iommu drivers")
Reported-by: kernel test robot
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/i
Hi Jerry,
On 2020/11/26 4:27, Jerry Snitselaar wrote:
Is there a reason we check the requested guest address width against the
iommu's mgaw, instead of the agaw that we already know for the iommu?
I've run into a case with a new system where the mgaw reported is 57,
but if they set PAE to 46
: 63a816749d86 ("iommu: Document usage of
"/sys/kernel/iommu_groups//type" file")
Reported-by: Stephen Rothwell
Link:
https://lore.kernel.org/linux-next/20201126174851.200e0...@canb.auug.org.au/
Signed-off-by: Lu Baolu
---
.../ABI/testing/sysfs-kernel-iommu_groups | 33 ++
Hi Yi,
On 2020/11/26 15:21, Liu, Yi L wrote:
On Thurs, Nov 26, 2020, at 9:27 AM, Lu Baolu wrote:
Add the API for getting the domain from a vfio group. This could be used
by the physical device drivers which rely on the vfio/mdev framework for
mediated device user level access. The typical use
Hi Stephen,
On 2020/11/26 14:48, Stephen Rothwell wrote:
Hi all,
After merging the arm64 tree, today's linux-next build (htmldocs)
produced these warnings:
Documentation/ABI/testing/sysfs-kernel-iommu_groups:38: WARNING: Unexpected
indentation.
-EFAULT;
}
pasid = iommu_aux_get_pasid(iommu_domain, iommu_device);
if (pasid < 0) {
vfio_group_put_external_user(vfio_group);
return -EFAULT;
}
/* Program device context with pasid value. */
...
Signed-off-by: Lu Ba
won't work
if "iommu=pt" kernel parameter is used.
Fixes: 327d5b2fee91c ("iommu/vt-d: Allow 32bit devices to uses DMA domain")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210237
Reported-and-tested-by: Adrian Huang
Signed-off-by: Lu Baolu
---
arch/x86/kernel/tboot.
for more
information.
Cc: Christoph Hellwig
Cc: Joerg Roedel
Cc: Ashok Raj
Cc: Will Deacon
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 230 +-
1 file changed,
n't see stale
values or iommu_group_show_type() doesn't try to derefernce stale pointers.
Cc: Christoph Hellwig
Cc: Joerg Roedel
Cc: Ashok Raj
Cc: Will Deacon
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 2 ++
1 file c
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
.../ABI/testing/sysfs-kernel-iommu_groups | 29 +++
1 file changed, 29 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups
b/Documen
So that the vendor iommu drivers are no more required to provide the
def_domain_type callback to always isolate the untrusted devices.
Link:
https://lore.kernel.org/linux-iommu/243ce89c33fe4b9da4c56ba35aceb...@huawei.com/
Cc: Shameerali Kolothum Thodi
Signed-off-by: Lu Baolu
---
drivers/iommu
iommu_get_mandatory_def_domain_type()
Best regards,
baolu
Lu Baolu (1):
iommu: Move def_domain type check for untrusted device into core
Sai Praneeth Prakhya (3):
iommu: Add support to change default domain of an iommu group
iommu: Take lock before reading iommu group default domain type
The iommu-dma constrains IOVA allocation based on the domain geometry
that the driver reports. Update domain geometry everytime a domain is
attached to or detached from a device.
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/intel/iommu.c | 16 ++--
1 file
Some cleanups after converting the driver to use dma-iommu ops.
- Remove nobounce option;
- Cleanup and simplify the path in domain mapping.
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
.../admin-guide/kernel-parameters.txt | 5 --
drivers/iommu/intel/iommu.c
From: Tom Murphy
Convert the intel iommu driver to the dma-iommu api. Remove the iova
handling and reserve region code from the intel iommu driver.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/intel/Kconfig | 1 +
drivers/iommu/intel
depends on the previous behaviour of the Intel iommu driver
which would return the same number of elements in the output list as in
the input list.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 27 +++
1 file
table pages can be freed. This way we can still batch
ioTLB free operations and handle the freelists.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 29 +--
drivers/iommu/intel/iommu.c | 55
From: Tom Murphy
Add a iommu_dma_free_cpu_cached_iovas function to allow drivers which
use the dma-iommu ops to free cached cpu iovas.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 9 +
include/linux/dma-iommu.h | 8
From: Tom Murphy
Allow the dma-iommu api to use bounce buffers for untrusted devices.
This is a copy of the intel bounce buffer code.
Signed-off-by: Tom Murphy
Co-developed-by: Lu Baolu
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 162
/
Please review and consider it for iommu/next.
Best regards,
baolu
Lu Baolu (3):
iommu: Add quirk for Intel graphic devices in map_sg
iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev
iommu/vt-d: Cleanup after converting to dma-iommu ops
Tom Murphy (4):
iommu: Handle
Hi Will,
On 2020/11/23 21:03, Will Deacon wrote:
Hi Baolu,
On Mon, Nov 23, 2020 at 08:55:17PM +0800, Lu Baolu wrote:
On 2020/11/23 20:04, Will Deacon wrote:
On Sat, Nov 21, 2020 at 09:56:17PM +0800, Lu Baolu wrote:
@@ -1645,13 +1655,10 @@ struct __group_domain_type {
static int
Hi Will,
On 2020/11/23 20:04, Will Deacon wrote:
On Sat, Nov 21, 2020 at 09:56:17PM +0800, Lu Baolu wrote:
So that the vendor iommu drivers are no more required to provide the
def_domain_type callback to always isolate the untrusted devices.
Link:
https://lore.kernel.org/linux-iommu
Hi Will,
On 2020/11/23 19:47, Will Deacon wrote:
On Mon, Nov 23, 2020 at 07:40:57PM +0800, Lu Baolu wrote:
On 2020/11/23 18:08, Christoph Hellwig wrote:
+ /*
+* If both the physical buffer start address and size are
+* page aligned, we don't need to use a bounce page
Hi Christoph,
On 2020/11/23 18:08, Christoph Hellwig wrote:
+ /*
+* If both the physical buffer start address and size are
+* page aligned, we don't need to use a bounce page.
+*/
+ if (IS_ENABLED(CONFIG_SWIOTLB) && dev_is_untrusted(dev) &&
+
So that the vendor iommu drivers are no more required to provide the
def_domain_type callback to always isolate the untrusted devices.
Link:
https://lore.kernel.org/linux-iommu/243ce89c33fe4b9da4c56ba35aceb...@huawei.com/
Cc: Shameerali Kolothum Thodi
Signed-off-by: Lu Baolu
---
drivers/iommu
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
.../ABI/testing/sysfs-kernel-iommu_groups | 29 +++
1 file changed, 29 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups
b/Documen
for more
information.
Cc: Christoph Hellwig
Cc: Joerg Roedel
Cc: Ashok Raj
Cc: Will Deacon
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 232 +-
1 file changed,
Lu Baolu (1):
iommu: Move def_domain type check for untrusted device into core
Sai Praneeth Prakhya (3):
iommu: Add support to change default domain of an iommu group
iommu: Take lock before reading iommu group default domain type
iommu: Document usage of "/sys/kernel/iommu_groups/
n't see stale
values or iommu_group_show_type() doesn't try to derefernce stale pointers.
Cc: Christoph Hellwig
Cc: Joerg Roedel
Cc: Ashok Raj
Cc: Will Deacon
Cc: Sohil Mehta
Cc: Robin Murphy
Cc: Jacob Pan
Signed-off-by: Sai Praneeth Prakhya
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 2 ++
1 file c
Hi Chris,
On 2020/11/20 20:24, Chris Wilson wrote:
Quoting Lu Baolu (2020-11-20 10:17:12)
Lu Baolu (3):
iommu: Add quirk for Intel graphic devices in map_sg
iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev
iommu/vt-d: Cleanup after converting to dma-iommu ops
Tom Murphy
Some cleanups after converting the driver to use dma-iommu ops.
- Remove nobounce option;
- Cleanup and simplify the path in domain mapping.
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
.../admin-guide/kernel-parameters.txt | 5 --
drivers/iommu/intel/iommu.c
From: Tom Murphy
Convert the intel iommu driver to the dma-iommu api. Remove the iova
handling and reserve region code from the intel iommu driver.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/intel/Kconfig | 1 +
drivers/iommu/intel
From: Tom Murphy
Allow the dma-iommu api to use bounce buffers for untrusted devices.
This is a copy of the intel bounce buffer code.
Signed-off-by: Tom Murphy
Co-developed-by: Lu Baolu
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 163
The iommu-dma constrains IOVA allocation based on the domain geometry
that the driver reports. Update domain geometry everytime a domain is
attached to or detached from a device.
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/intel/iommu.c | 16 ++--
1 file
depends on the previous behaviour of the Intel iommu driver
which would return the same number of elements in the output list as in
the input list.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 27 +++
1 file
From: Tom Murphy
Add a iommu_dma_free_cpu_cached_iovas function to allow drivers which
use the dma-iommu ops to free cached cpu iovas.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 9 +
include/linux/dma-iommu.h | 8
,
baolu
Lu Baolu (3):
iommu: Add quirk for Intel graphic devices in map_sg
iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev
iommu/vt-d: Cleanup after converting to dma-iommu ops
Tom Murphy (4):
iommu: Handle freelists when using deferred flushing in iommu drivers
iommu: Add
table pages can be freed. This way we can still batch
ioTLB free operations and handle the freelists.
Signed-off-by: Tom Murphy
Signed-off-by: Lu Baolu
Tested-by: Logan Gunthorpe
---
drivers/iommu/dma-iommu.c | 29 +--
drivers/iommu/intel/iommu.c | 55
On 2020/11/3 18:54, Joerg Roedel wrote:
Hi,
On Tue, Nov 03, 2020 at 11:58:26AM +0200, Joonas Lahtinen wrote:
Would that work for you? We intend to send the feature pull requests
to DRM for 5.11 in the upcoming weeks.
For the IOMMU side it is best to include the workaround for now. When
the
"iommu/vt-d: Cure VF irqdomain hickup")
Cc: Thomas Gleixner
Reported-by: Geert Uytterhoeven
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/dmar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c
index b2e8044
+Will
Please consider this patch for v5.10.
Best regards,
baolu
On 2020/11/10 15:19, Zhenzhong Duan wrote:
"intel_iommu=off" command line is used to disable iommu but iommu is force
enabled in a tboot system for security reason.
However for better performance on high speed network device, a
Hi Alex,
On 2020/11/17 3:56, Alex Williamson wrote:
On Thu, 12 Nov 2020 10:24:07 +0800
Lu Baolu wrote:
Add API for getting the ioasid of a subdevice (vfio/mdev). This calls
into the backend IOMMU module to get the actual value or error number
if ioasid for subdevice is not supported
Hi Yingliang,
On 2020/11/17 10:52, Yang Yingliang wrote:
If iommu_group_get() failed, it need return error code
in iommu_probe_device().
Fixes: cf193888bfbd ("iommu: Move new probe_device path...")
Reported-by: Hulk Robot
Signed-off-by: Yang Yingliang
---
drivers/iommu/iommu.c | 4 +++-
1
On 2020/11/16 17:47, Geert Uytterhoeven wrote:
Hi Thomas,
On Thu, Nov 12, 2020 at 8:16 PM Thomas Gleixner wrote:
The recent changes to store the MSI irqdomain pointer in struct device
missed that Intel DMAR does not register virtual function devices. Due to
that a VF device gets the plain
unction")
Acked-by: Lu Baolu
Best regards,
baolu
---
applies cleanly on current master and next-20201113
Liu Yi L, Jakob Pan, Lu Baolu, please ack.
Joerg, please pick this minor non-urgent clean-up patch.
drivers/iommu/intel/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 del
f_inherit_msi_domain(pdev);
return NOTIFY_DONE;
+ }
+
if (action != BUS_NOTIFY_ADD_DEVICE &&
action != BUS_NOTIFY_REMOVED_DEVICE)
return NOTIFY_DONE;
We also encountered this problem in internal testing. This patch can
solve the problem.
lue. */
Signed-off-by: Lu Baolu
---
drivers/vfio/vfio.c | 34
drivers/vfio/vfio_iommu_type1.c | 57 +
include/linux/vfio.h| 4 +++
3 files changed, 95 insertions(+)
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfi
Hi Alex,
On 11/3/20 1:22 PM, Lu Baolu wrote:
Hi Alex,
On 10/31/20 5:06 AM, Alex Williamson wrote:
On Fri, 30 Oct 2020 06:16:28 +
"Tian, Kevin" wrote:
From: Lu Baolu
Sent: Friday, October 30, 2020 12:58 PM
With the IOMMU driver registering iommu_ops for the mdev_bus,
mmu code.
Fixes: 7304e8f28bb2 ("iommu/vt-d: Correctly disable Intel IOMMU force on")
Signed-off-by: Zhenzhong Duan
Thanks for the patch.
Acked-by: Lu Baolu
Best regards,
baolu
---
v2: move ckeck of intel_iommu_tboot_noforce into iommu code per Baolu.
arch/x86/kernel/tboot.c |
101 - 200 of 1892 matches
Mail list logo