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
.
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 e854d3f67205
SID will
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|
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/iommufd
the 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
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 +
drivers/iommu/iommufd
that 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
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/iommu/io
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
.
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_group
iommu
-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/iommu.h b
will
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
.
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 e854d3f67205
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/iommufd
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/iommu/iommu-priv.h
the 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
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 | 34
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
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, 142
...@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 fault
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
.
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 e854d3f67205
will
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
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/iommu/iommufd
the 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
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/iommufd
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 | 37
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
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 changed
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 domain
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
.
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 482d4059f5db
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/iommufd
will
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
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 +
drivers/iommu/iommufd
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
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 | 158
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 iopf
40 matches
Mail list logo