on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
tools/testing/selftests/iommu/iommufd_utils.h | 86 +--
tools/testing/selftests/iommu/iommufd.c | 22 +
.../selftests/iommu
dware.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 64
2 files changed, 72 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/io
ill
differ from those that are not iopf-capable.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/iommufd/iommufd_private.h | 9 ++
include/uapi/linux/iommufd.h| 8 ++
drivers/iommu/iommufd/fault.c | 17 +++
drivers/iommu/iommufd/hw_pagetabl
pable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/iommufd/iommufd_private.h
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
---
includ
pending message.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
include/uapi/linux/iommufd.h | 83
1 file changed, 83 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..4d89ed97b533 100644
--- a
they
could support the attach handle and export them for use in IOMMUFD.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/iommu-priv.h | 8 +++
drivers/iommu/iommu.c | 103 +
2 files changed, 111 insertions(+)
diff --git a/drivers
ttach handle found for the iopf PASID, roll back to RID domain when
the IOMMU driver supports this capability.
iommu_get_domain_for_dev_pasid() is no longer used and can be removed.
Signed-off-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
---
include/linux/iommu.h
The struct sva_iommu represents an association between an SVA domain and
a PASID of a device. It's stored in the iommu group's pasid array and also
tracked by a list in the per-mm data structure. Removes duplicate tracking
of sva_iommu by eliminating the list.
Signed-off-by: Lu Baolu
R
igned-off-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
---
include/linux/iommu.h | 18 +++---
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/iommu-sva.c | 13 -
drivers/iommu/iommu.c | 26 --
4 files changed, 40 inser
an improve performance using io_uring.
https://lore.kernel.org/linux-iommu/zjwjd1ajeem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (10):
iommu: Introduce domain attachment handle
iommu: Remove sva handle list
iommu:
on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
---
tools/testing/selftests/iommu/iommufd_utils.h | 80 +--
tools/testing/selftests/iommu/iommufd.c | 18 +
.../selftests/iommu/iommufd_fail_nth.c| 2
dware.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 64
2 files changed, 72 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/iommufd/iommufd_test.h
index e854d3f
ill
differ from those that are not iopf-capable.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/iommufd/iommufd_private.h | 9 ++
include/uapi/linux/iommufd.h| 8 +
drivers/iommu/iommufd/fault.c | 17 ++
drivers/iommu/iommufd/hw_pagetabl
pable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 41 +
drivers/
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 4 +
driver
pending message.
Signed-off-by: Lu Baolu
---
include/uapi/linux/iommufd.h | 83
1 file changed, 83 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..4d89ed97b533 100644
--- a/include/uapi/linux
they
could support the attach handle and export them for use in IOMMUFD.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu-priv.h | 8 +++
drivers/iommu/iommu.c | 102 +
2 files changed, 110 insertions(+)
diff --git a/drivers/iommu/iommu-priv.h b/drivers
iopf deliver path, if no attach handle found for the iopf PASID, roll
back to RID domain when the IOMMU driver supports this capability.
iommu_get_domain_for_dev_pasid() is no longer used and can be removed.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 17 ---
drivers/iom
The struct sva_iommu represents an association between an SVA domain and
a PASID of a device. It's stored in the iommu group's pasid array and also
tracked by a list in the per-mm data structure. Removes duplicate tracking
of sva_iommu by eliminating the list.
Signed-off-by
igned-off-by: Lu Baolu
---
include/linux/iommu.h | 18 +++---
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/iommu-sva.c | 13 -
drivers/iommu/iommu.c | 26 --
4 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/include/linux/io
.org/linux-iommu/zjwjd1ajeem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (10):
iommu: Introduce domain attachment handle
iommu: Remove sva handle list
iommu: Add attach handle to struct iopf_group
iommu: Extend domain at
on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
---
tools/testing/selftests/iommu/iommufd_utils.h | 84 +--
tools/testing/selftests/iommu/iommufd.c | 18
.../selftests/iommu/iommufd_fail_nth.c| 2
dware.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 64
2 files changed, 72 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/iommufd/iommufd_test.h
index e854d3f
ill
differ from those that are not iopf-capable.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 9 ++
include/uapi/linux/iommufd.h| 8 +
drivers/iommu/iommufd/fault.c | 17 ++
drivers/iommu/iommufd/hw_pagetable.c|
pable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 12 ++
drivers/iommu/io
pending message.
Signed-off-by: Lu Baolu
---
include/uapi/linux/iommufd.h | 96
1 file changed, 96 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..2f34d66436fb 100644
--- a/include/uapi/linux
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 4 +
driver
they
could support the attach handle and export them for use in IOMMUFD.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu-priv.h | 8 +++
drivers/iommu/iommu.c | 99 ++
2 files changed, 107 insertions(+)
diff --git a/drivers/iommu/iommu-priv.h b/drivers
iopf deliver path, if no attach handle found for the iopf PASID, roll
back to RID domain when the IOMMU driver supports this capability.
iommu_get_domain_for_dev_pasid() is no longer used and can be removed.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 18 +---
drivers/iom
The struct sva_iommu represents an association between an SVA domain and
a PASID of a device. It's stored in the iommu group's pasid array and also
tracked by a list in the per-mm data structure. Removes duplicate tracking
of sva_iommu by eliminating the list.
Signed-off-by
g io_uring.
https://lore.kernel.org/linux-iommu/zjwjd1ajeem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (10):
iommu: Introduce domain attachment handle
iommu: Remove sva handle list
iommu: Add attach handle to struct iopf_gro
igned-off-by: Lu Baolu
---
include/linux/iommu.h | 18 +++---
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/iommu-sva.c | 13 -
drivers/iommu/iommu.c | 23 +--
4 files changed, 37 insertions(+), 19 deletions(-)
diff --git a/include/linux/iomm
differ from those that are not iopf-capable.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 9 +++
include/uapi/linux/iommufd.h| 8 ++
drivers/iommu/iommufd/fault.c | 17
drivers/iommu/iommufd/hw_pagetable.c| 35
on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
---
tools/testing/selftests/iommu/iommufd_utils.h | 84 +--
tools/testing/selftests/iommu/iommufd.c | 18
.../selftests/iommu/iommufd_fail_nth.c| 2
dware.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 63
2 files changed, 71 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/iommufd/iommufd_test.h
index e854d3f
pable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 10 ++
drivers/iommu/io
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 3 +
drivers/iom
pending message.
Signed-off-by: Lu Baolu
---
include/uapi/linux/iommufd.h | 96
1 file changed, 96 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..83b45dce94a4 100644
--- a/include/uapi/linux
ce is wholly managed by user space, there is no domain attached to
the PASID of the device. Improve this code to try fetching the attachment
handle on a PASID if possible, otherwise try it on the RID.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 1 +
drivers/iommu/io-pgfault.c
The struct sva_iommu represents a bond of an SVA domain and a device.
It is functionally equivalent to the iommu_attach_handle. To avoid
code duplication, replace sva_iommu with the iommu_attach_handle and
remove the code that manages sva_iommu.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h
ional
information beyond a domain pointer, depending on its specific use case.
Co-developed-by: Jason Gunthorpe
Signed-off-by: Jason Gunthorpe
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu-priv.h | 6 ++
drivers/iommu/iommu.c | 156 -
2 files changed
eem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (9):
iommu: Introduce domain attachment handle
iommu: Replace sva_iommu with iommu_attach_handle
iommu: Add attachment handle to struct iopf_group
iommufd: Add faul
on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
---
tools/testing/selftests/iommu/iommufd_utils.h | 84 +--
tools/testing/selftests/iommu/iommufd.c | 18
.../selftests/iommu/iommufd_fail_nth.c| 2
dware.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 63
2 files changed, 71 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/iommufd/iommufd_test.h
index e854d3f
differ from those that are not iopf-capable.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 10 +++
include/uapi/linux/iommufd.h| 8 ++
drivers/iommu/iommufd/fault.c | 20 ++
drivers/iommu/iommufd/hw_pagetable.c| 36
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 3 +
driver
pending message.
Signed-off-by: Lu Baolu
---
include/uapi/linux/iommufd.h | 96
1 file changed, 96 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..83b45dce94a4 100644
--- a/include/uapi/linux
pable and
non-iopf-capable hw page tables. This matches the nested translation use
case, where a parent domain is attached by default and can then be
replaced with a nested user domain with iopf support.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 9 ++
drivers/iommu/io
ce is wholly managed by user space, there is no domain attached to
the PASID of the device. Improve this code to try fetching the attachment
handle on a PASID if possible, otherwise try it on the RID.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 2 +-
drivers/iommu/io-pgfault.c
The struct sva_iommu represents a bond of an SVA domain and a device.
It is functionally equivalent to the iommu_attach_handle. To avoid
code duplication, replace sva_iommu with the iommu_attach_handle and
remove the code that manages sva_iommu.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h
ional
information beyond a domain pointer, depending on its specific use case.
Co-developed-by: Jason Gunthorpe
Signed-off-by: Jason Gunthorpe
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu-priv.h | 9 +++
drivers/iommu/iommu.c | 158 +
2 files ch
ng to I/O page requests, so that user space
applications can improve performance using io_uring.
https://lore.kernel.org/linux-iommu/zjwjd1ajeem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (9):
iommu: Introduce d
on the mock device.
- Retrieving and responding to the IOPF through the file interface.
Signed-off-by: Lu Baolu
---
tools/testing/selftests/iommu/iommufd_utils.h | 83 +--
tools/testing/selftests/iommu/iommufd.c | 17
.../selftests/iommu/iommufd_fail_nth.c| 2
dware.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_test.h | 8
drivers/iommu/iommufd/selftest.c | 63
2 files changed, 71 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd_test.h
b/drivers/iommu/iommufd/iommufd_test.h
index 482d405
iopf support.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 7 ++
drivers/iommu/iommufd/device.c | 15 ++-
drivers/iommu/iommufd/fault.c | 122
3 files changed, 141 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/io
differ from those that are not iopf-capable. The implementation of these
will be introduced in the next patch.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommufd/iommufd_private.h | 11
include/uapi/linux/iommufd.h| 6 +
drivers/iommu/iommufd/fault.c | 14
sses of an iommufd_hw_pgtable are routed
through the fault object to user space. Similarly, user space's responses
to these page faults are routed back to the iommu device driver through
the same fault object.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 2 +
driver
check.
Signed-off-by: Lu Baolu
---
include/uapi/linux/iommufd.h | 67
1 file changed, 67 insertions(+)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index 1dfeaa2e649e..d59e839ae49e 100644
--- a/include/uapi/linux/iommufd.h
+++ b
of the domain. This ensures that the page fault is forwarded
only if an iopf-capable domain is attached, and the domain will only
be released after all outstanding faults are handled.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 2 +-
drivers/iommu/io-pgfault.c | 59
rious uses. For example, the IOMMUFD
could use it to store the iommufd_device pointer, so that it could easily
retrieve the dev_id of the device that triggered the fault.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 36 +
drivers/iommu/io-pgfault.c
g and responding to I/O page requests, so that user space
applications can improve performance using io_uring.
https://lore.kernel.org/linux-iommu/zjwjd1ajeem6p...@ziepe.ca/
v1:
https://lore.kernel.org/linux-iommu/20230530053724.232765-1-baolu...@linux.intel.com/
Lu Baolu (8):
iommu: Add
62 matches
Mail list logo