outstanding PRs
Best regards,
baolu
Lu Baolu (5):
iommu/vt-d: Refactor Kconfig a bit
iommu/vt-d: Enable Intel IOMMU scalable mode by default
iommu/vt-d: Preset A/D bits for user space DMA usage
iommu/vt-d: Disallow SVA if devices don't support 64-bit address
iommu/vt-d: Allow devices to have
_DOMAIN_BLOCKED ||
unlikely(domain->ops->iova_to_phys == NULL))
return 0;
Anyway,
Reviewed-by: Lu Baolu
Best regards,
baolu
return domain->ops->iova_to_phys(domain, iova);
___
iommu
On 7/14/21 10:24 PM, Georgi Djakov wrote:
On 16.06.21 16:38, Georgi Djakov wrote:
When unmapping a buffer from an IOMMU domain, the IOMMU framework unmaps
the buffer at a granule of the largest page size that is supported by
the IOMMU hardware and fits within the buffer. For every block that
is
On 7/14/21 4:30 AM, Ville Syrjälä wrote:
On Tue, Jul 13, 2021 at 09:34:09AM +0800, Lu Baolu wrote:
On 7/12/21 11:47 PM, Ville Syrjälä wrote:
On Mon, Jul 12, 2021 at 07:23:07AM +0800, Lu Baolu wrote:
On 7/10/21 12:47 AM, Ville Syrjala wrote:
From: Ville Syrjälä
While running "gem_exe
driver accordingly.
Fixes: 24f27d32ab6b7 ("iommu/vt-d: Enlightened PASID allocation")
Cc: Ashok Raj
Cc: Sanjay Kumar
Cc: Kevin Tian
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h | 6 +++---
drivers/iommu/intel/pasid.h | 10 +-
2 files changed, 8 insertions(+), 8
On 7/12/21 11:47 PM, Ville Syrjälä wrote:
On Mon, Jul 12, 2021 at 07:23:07AM +0800, Lu Baolu wrote:
On 7/10/21 12:47 AM, Ville Syrjala wrote:
From: Ville Syrjälä
While running "gem_exec_big --r single" from igt-gpu-tools on
Geminilake as soon as a 2M mapping is made I tend to get a
creases the coverage of scalable
mode.
Suggested-by: Sanjay Kumar
Fixes: 8038bdb855331 ("iommu/vt-d: Only clear real DMA device's context
entries")
Fixes: 2b0140c69637e ("iommu/vt-d: Use pci_real_dma_dev() for mapping")
Cc: sta...@vger.kernel.org # v5.6+
Cc: Jon Derrick
Signed-of
, the
domain ID is in PASID table entry, not context entry.
Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support")
Cc: sta...@vger.kernel.org # v5.0+
Signed-off-by: Sanjay Kumar
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 31 ++--
nes.
Best regards,
baolu
TODO: would be nice to use the macros from include/drm/i915_pciids.h,
but can't do that with DECLARE_PCI_FIXUP_HEADER()
Cc: David Woodhouse
Cc: Lu Baolu
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Ville Syrjälä
---
drivers/iommu/intel/iommu.c | 10 +
On 2021/7/9 19:43, Wei Liu wrote:
When Microsoft Hypervisor runs on Intel platforms it needs to know the
reserved regions to program devices correctly. There is no reason to
duplicate intel_iommu_get_resv_regions. Export it.
Why not using iommu_get_resv_regions()?
Best regards,
baolu
Hi David,
I like this idea. Thanks for proposing this.
On 2021/7/7 15:55, David Stevens wrote:
Add support for per-domain dynamic pools of iommu bounce buffers to the
dma-iommu API. This allows iommu mappings to be reused while still
maintaining strict iommu protection. Allocating buffers
On 2021/6/24 12:03, David Gibson wrote:
On Fri, Jun 18, 2021 at 01:21:47PM +0800, Lu Baolu wrote:
Hi David,
On 6/17/21 1:22 PM, David Gibson wrote:
The iommu_group can guarantee the isolation among different physical
devices (represented by RIDs). But when it comes to sub-devices (ex. mdev
On 2021/6/24 12:26, David Gibson wrote:
On Fri, Jun 18, 2021 at 04:57:40PM +, Tian, Kevin wrote:
From: Jason Gunthorpe
Sent: Friday, June 18, 2021 8:20 AM
On Thu, Jun 17, 2021 at 03:14:52PM -0600, Alex Williamson wrote:
I've referred to this as a limitation of type1, that we can't put
On 6/23/21 6:25 AM, Robin Murphy wrote:
On 2021-06-21 15:32, Lu Baolu wrote:
Hi Robin,
On 2021/6/21 19:59, Robin Murphy wrote:
On 2021-06-21 11:34, John Garry wrote:
On 21/06/2021 11:00, Lu Baolu wrote:
void iommu_set_dma_strict(bool force)
{
if (force == true
On 6/22/21 7:52 AM, Douglas Anderson wrote:
@@ -1519,7 +1542,8 @@ static int iommu_get_def_domain_type(struct device *dev)
static int iommu_group_alloc_default_domain(struct bus_type *bus,
struct iommu_group *group,
-
Hi Robin,
On 2021/6/21 19:59, Robin Murphy wrote:
On 2021-06-21 11:34, John Garry wrote:
On 21/06/2021 11:00, Lu Baolu wrote:
void iommu_set_dma_strict(bool force)
{
if (force == true)
iommu_dma_strict = true;
else if (!(iommu_cmd_line & IOMMU_CMD_LINE_ST
On 2021/6/21 16:12, John Garry wrote:
On 21/06/2021 06:17, Lu Baolu wrote:
On 2021/6/18 19:34, John Garry wrote:
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 60b1ec42e73b..ff221d3ddcbc 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -349,10 +349,9
On 2021/6/18 19:34, John Garry wrote:
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 60b1ec42e73b..ff221d3ddcbc 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -349,10 +349,9 @@ static int __init iommu_dma_setup(char *str)
}
early_param("iommu.strict",
);
int iommu_set_pgtable_quirks(struct iommu_domain *domain,
unsigned long quirks);
-void iommu_set_dma_strict(bool val);
+void iommu_set_dma_strict(void);
bool iommu_get_dma_strict(struct iommu_domain *domain);
extern int repor
- }
+ iommu_set_dma_strict(true);
+ }
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0040,
quirk_calpella_no_shadow_gtt);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044,
quirk_calpella_no_shadow_gtt);
Reviewed-by: Lu Baolu
Best regar
iommu_group_ida);
static unsigned int iommu_def_domain_type __read_mostly;
-static bool iommu_dma_strict __read_mostly = true;
+static bool iommu_dma_strict __read_mostly =
IS_ENABLED(CONFIG_IOMMU_DEFAULT_STRICT);
static u32 iommu_cmd_line __read_mostly;
struct iommu_group {
Revie
t; : "lazy",
+ (iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
+ "(set via kernel command line)" : "");
+
return 0;
}
subsys_initcall(iommu_subsys_init);
Reviewed-by: Lu Baolu
Best regards,
baolu
_
strncmp(str, "strict", 6)) {
+ pr_warn("intel_iommu=strict deprecated; use iommu.strict=1
instead\n");
pr_info("Disable batched IOTLB flush\n");
intel_iommu_strict = 1;
Signed-off-by: Colin Ian King
Addresses-Coverity: ("Dereference before null check")
Link:
https://lore.kernel.org/r/20210611135024.32781-1-colin.k...@canonical.com
Signed-off-by: Lu Baolu
Best regards,
baolu
On 2021/6/18 14:55, Dan Carpenter wrote:
Hello Lu Baolu,
T
Hi David,
On 6/17/21 1:22 PM, David Gibson wrote:
The iommu_group can guarantee the isolation among different physical
devices (represented by RIDs). But when it comes to sub-devices (ex. mdev or
vDPA devices represented by RID + SSID), we have to rely on the
device driver for isolation. The
On 6/17/21 3:41 PM, John Garry wrote:
@@ -349,10 +349,9 @@ static int __init iommu_dma_setup(char *str)
}
early_param("iommu.strict", iommu_dma_setup);
-void iommu_set_dma_strict(bool strict)
+void iommu_set_dma_strict(void)
{
- if (strict || !(iommu_cmd_line & IOMMU_CMD_LINE_STRICT))
Hi Robin,
On 6/18/21 2:56 AM, Robin Murphy wrote:
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 60b1ec42e73b..ff221d3ddcbc 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -349,10 +349,9 @@ static int __init iommu_dma_setup(char *str)
}
Hi John,
On 6/17/21 4:00 PM, John Garry wrote:
On 17/06/2021 08:32, Lu Baolu wrote:
On 6/16/21 7:03 PM, John Garry wrote:
@@ -4382,9 +4380,9 @@ int __init intel_iommu_init(void)
* is likely to be much lower than the overhead of
synchronizing
* the virtual and physical
On 6/16/21 7:03 PM, John Garry wrote:
We only ever now set strict mode enabled in iommu_set_dma_strict(), so
just remove the argument.
Signed-off-by: John Garry
Reviewed-by: Robin Murphy
---
drivers/iommu/amd/init.c| 2 +-
drivers/iommu/intel/iommu.c | 6 +++---
drivers/iommu/iommu.c
On 6/16/21 7:03 PM, John Garry wrote:
@@ -4382,9 +4380,9 @@ int __init intel_iommu_init(void)
* is likely to be much lower than the overhead of synchronizing
* the virtual and physical IOMMU page-tables.
*/
- if
if (ret)
break;
- iova += pgsize;
- paddr += pgsize;
- size -= pgsize;
+ iova += mapped;
+ paddr += mapped;
}
/* unroll mapping in case something went wrong */
Reviewed-by: Lu Baolu
Best r
iotlb_gather);
if (!unmapped_page)
break;
Reviewed-by: Lu Baolu
Best regards,
baolu
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
n, iova, iova, size - unmapped);
unmapped_page = ops->unmap(domain, iova, pgsize, iotlb_gather);
if (!unmapped_page)
break;
Reviewed-by: Lu Baolu
Best regards,
baolu
___
iommu mailing list
iommu
/* Pick the biggest page size remaining */
+ pgsize_idx = __fls(pgsizes);
+ pgsize = BIT(pgsize_idx);
return pgsize;
}
Reviewed-by: Lu Baolu
Best regards,
baolu
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lis
On 2021/6/15 16:25, Robin Murphy wrote:
On 2021-06-15 08:26, Lu Baolu wrote:
Hi John,
On 6/14/21 4:03 PM, John Garry wrote:
On 12/06/2021 03:14, Lu Baolu wrote:
On 2021/6/11 20:20, John Garry wrote:
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 2a71347611d4..4467353f981b
Hi John,
On 6/14/21 4:03 PM, John Garry wrote:
On 12/06/2021 03:14, Lu Baolu wrote:
On 2021/6/11 20:20, John Garry wrote:
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 2a71347611d4..4467353f981b 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -94,6 +94,7
ut a strict
+ mode explicitly specified by either method takes
+ precedence.
iommu.passthrough=
[ARM64, X86] Configure DMA to bypass the IOMMU by
default.
Reviewed-by: Lu Baolu
Best regards,
baolu
__
On 2021/6/11 20:20, John Garry wrote:
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index ccbd5d4c1a50..146cb71c7441 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -350,10 +350,9 @@ static int __init iommu_dma_setup(char *str)
}
early_param("iommu.strict",
On 2021/6/11 20:20, John Garry wrote:
@@ -453,8 +452,7 @@ static int __init intel_iommu_setup(char *str)
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac
instead\n");
iommu_dma_forcedac = true;
} else if (!strncmp(str,
On 2021/6/11 20:20, John Garry wrote:
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 2a71347611d4..4467353f981b 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -94,6 +94,7 @@ choice
prompt "IOMMU default DMA mode"
depends on IOMMU_DMA
+
On 2021/6/11 20:20, John Garry wrote:
+choice
+ prompt "IOMMU default DMA mode"
This is not explicit.
How about
"IOMMU DMA default cache invalidation policy"
?
Best regards,
baolu
+ depends on IOMMU_DMA
+
+ default IOMMU_DEFAULT_STRICT
+ help
+ This option
On 2021/6/11 20:20, John Garry wrote:
+config IOMMU_DEFAULT_LAZY
+ bool "lazy"
+ help
+ Support lazy mode, where for every IOMMU DMA unmap operation, the
+ flush operation of IOTLB and the free operation of IOVA are deferred.
+ They are only guaranteed to be
Hi Isaac,
Any update for this series? The iommu core part looks good to me and I
also have some patches for Intel IOMMU implementation of [un]map_pages.
Just wonder when could iommu core have this optimization.
Best regards,
baolu
On 4/9/21 1:13 AM, Isaac J. Manjarres wrote:
When unmapping a
On 6/9/21 8:39 PM, Jason Gunthorpe wrote:
On Wed, Jun 09, 2021 at 02:24:03PM +0200, Joerg Roedel wrote:
On Mon, Jun 07, 2021 at 02:58:18AM +, Tian, Kevin wrote:
- Device-centric (Jason) vs. group-centric (David) uAPI. David is not fully
convinced yet. Based on discussion v2 will
From: Parav Pandit
Page directory assignment by alloc_pgtable_page() or phys_to_virt()
doesn't need typecasting as both routines return void*. Hence, remove
typecasting from both the calls.
Signed-off-by: Parav Pandit
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r
From: Parav Pandit
Avoid below checkpatch warning.
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
+ unsignediommu_refcnt[DMAR_UNITS_SUPPORTED];
Fixes: 29a27719abaa ("iommu/vt-d: Replace iommu_bmp with a refcount")
Signed-off-by: Parav Pandit
Signed-off-by
From: Parav Pandit
No need for braces for single line statement under if() block.
Signed-off-by: Parav Pandit
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210530075053.264218-1-pa...@nvidia.com
---
drivers/iommu/intel/iommu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
()
by returning void.
Signed-off-by: Parav Pandit
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210530075053.264218-1-pa...@nvidia.com
---
include/linux/intel-iommu.h | 1 -
drivers/iommu/intel/iommu.c | 11 +++
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/include/linux
*/
/* forced alignments: 1 */
/* last cacheline: 48 bytes */
} __attribute__((__aligned__(8)));
Signed-off-by: Parav Pandit
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210530075053.264218-1-pa...@nvidia.com
---
include/linux/intel-iommu.h | 8
drivers
From: YueHaibing
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.
Signed-off-by: YueHaibing
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210528130229.22108-1-yuehaib...@huawei.com
---
drivers/iommu/intel/iommu.c
the length of and , respectively.
This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().
Link: https://github.com/KSPP/linux/issues/109
Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Lu Baolu
L
The execution time for page fault request handling is performance critical
and needs to be monitored. This adds code to sample the execution time of
page fault request handling.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers
Queued invalidation execution time is performance critical and needs
to be monitored. This adds code to sample the execution time of IOTLB/
devTLB/ICE cache invalidation.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers/iommu
Read /sys/kernel/debug/iommu/intel/dmar_perf_latency gives a snapshot
of sampling result of all enabled monitors.
Signed-off-by: Fenghua Yu
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers/iommu/intel/debugfs.c | 111
and
providing a common string format for users.
Signed-off-by: Fenghua Yu
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
include/linux/intel-iommu.h | 1 +
drivers/iommu/intel/perf.h | 73 +++
drivers/iommu/intel/perf.c | 166
--l
pasid=0x2 index=0x1
This will be helpful for I/O page fault related debugging.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
include/linux/intel-iommu.h| 29 +++
include/trace/events/intel_iommu.h
Let the IO page fault requests get handled through the io-pgfault
framework.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers/iommu/intel/iommu.c | 14 ++-
drivers/iommu/intel/svm.c | 84
This allocates and registers the iopf queue infrastructure for devices
which want to support IO page fault for SVA.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
include/linux/intel-iommu.h | 2 ++
drivers/iommu/intel/iommu.c | 66
Refactor prq_event_thread() by moving handling single prq event out of
the main loop.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers/iommu/intel/svm.c | 239 ++
1 file changed, 136
It's common to iterate the svm device list and find a matched device. Add
common helpers to do this and consolidate the code.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
drivers/iommu/intel/svm.c | 68
Align the pasid alloc/free code with the generic helpers defined in the
iommu core. This also refactored the SVA binding code to improve the
readability.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210520031531.712333-1-baolu...@linux.intel.com
---
include/linux/intel-iommu.h
We are about to use iommu_sva_alloc/free_pasid() helpers in iommu core.
That means the pasid life cycle will be managed by iommu core. Use a
local array to save the per pasid private data instead of attaching it
the real pasid.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r
attached to a nested mode iommu_domain should
support nested capabilility.
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210517065701.5078-1-baolu...@linux.intel.com
---
drivers/iommu/intel/iommu.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers
The Intel VT-d implementation supports device TLB management. Select
PCI_ATS explicitly so that the pci_ats helpers are always available.
Signed-off-by: Lu Baolu
Acked-by: Will Deacon
Link:
https://lore.kernel.org/r/20210512065313.3441309-1-baolu...@linux.intel.com
---
drivers/iommu/intel
. '/*', to prevent kernel-doc from parsing it.
Signed-off-by: Aditya Srivastava
Acked-by: Randy Dunlap
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210523143245.19040-1-yashsri...@gmail.com
---
drivers/iommu/intel/pasid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
0x as PASID for DMA requests w/o PASID.
This is confusing. Tweak this by adding "NO_PASID" explicitly.
Reviewed-by: Ashok Raj
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210517065425.4953-1-baolu...@linux.intel.com
---
drivers/iommu/intel/dmar.c | 23 +++--
Signed-off-by: Lu Baolu
Link: https://lore.kernel.org/r/20210416171826.64091-1-colin.k...@canonical.com
---
drivers/iommu/intel/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index be35284a2016..65c2ed760
Aditya Srivastava (1):
iommu/vt-d: Fix kernel-doc syntax in file header
Colin Ian King (1):
iommu/vt-d: Remove redundant assignment to variable agaw
Gustavo A. R. Silva (1):
iommu/vt-d: Fix out-bounds-warning in intel/svm.c
Lu Baolu (14):
iommu/vt-d: Tweak the description of a DMA fault
On 5/27/21 7:35 AM, Kyung Min Park wrote:
When the dmar translation fault happens, the kernel prints a single line
fault reason with corresponding hexadecimal code defined in the Intel VT-d
specification.
Currently, when user wants to debug the translation fault in detail,
debugfs is used for
On 5/30/21 3:50 PM, Parav Pandit wrote:
Hi David, Lu,
This short series contains small cleanup patches for Intel iommu
in DMAR area.
Patch summary:
Patch-1 uses bitfields for few DMAR capabilities
Patch-2 removes unused iommu_count
Patch-3 removed unnecessary braces
Patch-4 define count data
On 5/28/21 9:02 PM, YueHaibing wrote:
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.
Signed-off-by: YueHaibing
Queued for v5.14. Thanks!
Best regards,
baolu
___
iommu mailing list
On 4/15/21 4:14 AM, Gustavo A. R. Silva wrote:
Replace a couple of calls to memcpy() with simple assignments in order
to fix the following out-of-bounds warning:
drivers/iommu/intel/svm.c:1198:4: warning: 'memcpy' offset [25, 32] from the
object at 'desc' is out of the bounds of referenced
On 5/23/21 10:32 PM, Aditya Srivastava wrote:
The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
The header for drivers/iommu/intel/pasid.c follows this syntax, but
the content inside does not comply with kernel-doc.
This line was probably not meant
On 4/17/21 1:18 AM, Colin King wrote:
From: Colin Ian King
The variable agaw is initialized with a value that is never
read and it is being updated later with a new value as a
counter in a for-loop. The initialization is redundant and
can be removed.
Addresses-Coverity: ("Unused value")
Hi David,
On 6/3/21 1:54 PM, David Gibson wrote:
On Tue, Jun 01, 2021 at 07:09:21PM +0800, Lu Baolu wrote:
Hi Jason,
On 2021/5/29 7:36, Jason Gunthorpe wrote:
/*
* Bind an user-managed I/O page table with the IOMMU
*
* Because user page table is untrusted, IOASID nesting must
On 6/3/21 7:23 AM, Jason Gunthorpe wrote:
On Wed, Jun 02, 2021 at 12:01:57PM +0800, Lu Baolu wrote:
On 6/2/21 1:26 AM, Jason Gunthorpe wrote:
On Tue, Jun 01, 2021 at 07:09:21PM +0800, Lu Baolu wrote:
This version only covers 1) and 4). Do you think we need to support 2),
3) and beyond?
Yes
On 6/2/21 3:48 PM, John Garry wrote:
On 02/06/2021 05:37, Lu Baolu wrote:
On 6/1/21 10:29 PM, John Garry wrote:
For streaming DMA mappings involving an IOMMU and whose IOVA len
regularly
exceeds the IOVA rcache upper limit (meaning that they are not cached),
performance can be reduced
On 6/1/21 10:29 PM, John Garry wrote:
For streaming DMA mappings involving an IOMMU and whose IOVA len regularly
exceeds the IOVA rcache upper limit (meaning that they are not cached),
performance can be reduced.
This is much more pronounced from commit 4e89dce72521 ("iommu/iova: Retry
from
On 6/2/21 1:26 AM, Jason Gunthorpe wrote:
On Tue, Jun 01, 2021 at 07:09:21PM +0800, Lu Baolu wrote:
This version only covers 1) and 4). Do you think we need to support 2),
3) and beyond?
Yes aboslutely. The API should be flexable enough to specify the
creation of all future page table
On 2021/6/1 15:15, Shenming Lu wrote:
On 2021/6/1 13:10, Lu Baolu wrote:
Hi Shenming,
On 6/1/21 12:31 PM, Shenming Lu wrote:
On 2021/5/27 15:58, Tian, Kevin wrote:
/dev/ioasid provides an unified interface for managing I/O page tables for
devices assigned to userspace. Device passthrough
Hi Jason,
On 2021/5/29 7:36, Jason Gunthorpe wrote:
/*
* Bind an user-managed I/O page table with the IOMMU
*
* Because user page table is untrusted, IOASID nesting must be enabled
* for this ioasid so the kernel can enforce its DMA isolation policy
* through the parent ioasid.
Hi Jason W,
On 6/1/21 1:08 PM, Jason Wang wrote:
2) If yes, what's the reason for not simply use the fd opened from
/dev/ioas. (This is the question that is not answered) and what happens
if we call GET_INFO for the ioasid_fd?
3) If not, how GET_INFO work?
oh, missed this question in prior
Hi Shenming,
On 6/1/21 12:31 PM, Shenming Lu wrote:
On 2021/5/27 15:58, Tian, Kevin wrote:
/dev/ioasid provides an unified interface for managing I/O page tables for
devices assigned to userspace. Device passthrough frameworks (VFIO, vDPA,
etc.) are expected to use this interface instead of
On 6/1/21 2:09 AM, Jason Gunthorpe wrote:
device bind should fail if the device somehow isn't compatible with
the scheme the user is tring to use.
yeah, I guess you mean to fail the device attach when the IOASID is a
nesting IOASID but the device is behind an iommu without nesting support.
On 5/31/21 7:31 PM, Liu Yi L wrote:
On Fri, 28 May 2021 20:36:49 -0300, Jason Gunthorpe wrote:
On Thu, May 27, 2021 at 07:58:12AM +, Tian, Kevin wrote:
2.1. /dev/ioasid uAPI
+
[---cut for short---]
/*
* Allocate an IOASID.
*
* IOASID is the FD-local software
Hi Shenming and Alex,
On 5/27/21 7:03 PM, Shenming Lu wrote:
I haven't fully read all the references, but who imposes the fact that
there's only one fault handler per device? If type1 could register one
handler and the vfio-pci bus driver another for the other level, would
we need this path
From: Rolf Eike Beer
iommu_device_sysfs_add() is called before, so is has to be cleaned on subsequent
errors.
Fixes: 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device")
Cc: sta...@vger.kernel.org # 4.11.x
Signed-off-by: Rolf Eike Beer
Acked-by: Lu Baolu
L
Hi Joerg,
A small fix is queued for v5.13. It fixes:
- sysfs leak in alloc_iommu.
Please consider it for v5.13.
Best regards,
Lu Baolu
Rolf Eike Beer (1):
iommu/vt-d: Fix sysfs leak in alloc_iommu()
drivers/iommu/intel/dmar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
Hi Jacob,
Thanks for reviewing my patch.
On 5/22/21 5:25 AM, Jacob Pan wrote:
Hi BaoLu,
On Thu, 20 May 2021 11:15:21 +0800, Lu Baolu
wrote:
We are about to use iommu_sva_alloc/free_pasid() helpers in iommu core.
That means the pasid life cycle will be managed by iommu core. Use a
local
Hi Joerg,
On 5/21/21 2:53 PM, Rolf Eike Beer wrote:
Am Donnerstag, 22. April 2021, 07:34:17 CEST schrieb Lu Baolu:
Hi Rolf,
On 4/22/21 1:39 PM, Rolf Eike Beer wrote:
iommu_device_sysfs_add() is called before, so is has to be cleaned on
subsequent errors.
Fixes: 39ab9555c2411 ("iommu
The execution time for page fault request handling is performance critical
and needs to be monitored. This adds code to sample the execution time of
page fault request handling.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 16 +---
1 file changed, 13 insertions(+), 3
Queued invalidation execution time is performance critical and needs
to be monitored. This adds code to sample the execution time of IOTLB/
devTLB/ICE cache invalidation.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/dmar.c | 31 +++
1 file changed, 31 insertions
Read /sys/kernel/debug/iommu/intel/dmar_perf_latency gives a snapshot
of sampling result of all enabled monitors.
Signed-off-by: Fenghua Yu
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/debugfs.c | 111 ++
drivers/iommu/intel/Kconfig | 1 +
2 files changed
and
providing a common string format for users.
Signed-off-by: Fenghua Yu
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h | 1 +
drivers/iommu/intel/perf.h | 73 +++
drivers/iommu/intel/perf.c | 166 +++
drivers/iommu/intel/Kconfig | 3
--l
pasid=0x2 index=0x1
This will be helpful for I/O page fault related debugging.
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h| 29 +++
include/trace/events/intel_iommu.h | 37 ++
drivers/iommu/intel/svm.c | 7
Let the IO page fault requests get handled through the io-pgfault
framework.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 14 ++-
drivers/iommu/intel/svm.c | 84 +++--
2 files changed, 17 insertions(+), 81 deletions(-)
diff --git a/drivers
This allocates and registers the iopf queue infrastructure for devices
which want to support IO page fault for SVA.
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h | 2 ++
drivers/iommu/intel/iommu.c | 66 ++---
drivers/iommu/intel/svm.c | 37
Refactor prq_event_thread() by moving handling single prq event out of
the main loop.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 239 ++
1 file changed, 136 insertions(+), 103 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu
Align the pasid alloc/free code with the generic helpers defined in the
iommu core. This also refactored the SVA binding code to improve the
readability.
Signed-off-by: Lu Baolu
---
include/linux/intel-iommu.h | 1 -
drivers/iommu/intel/iommu.c | 3 +
drivers/iommu/intel/svm.c | 278
It's common to iterate the svm device list and find a matched device. Add
common helpers to do this and consolidate the code.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 68 +++
1 file changed, 40 insertions(+), 28 deletions(-)
diff --git
801 - 900 of 2543 matches
Mail list logo