Hi Will,
Sorry for the late response.
On Fri, Jul 11, 2025 at 05:14:27PM +0100, Will Deacon wrote:
> > /* MMIO registers */
> > #define ARM_SMMU_IDR0 0x0
> > @@ -720,6 +721,10 @@ struct arm_smmu_impl_ops {
> > int (*init_structures)(struct arm_smmu_device *smmu);
> >
Add a new vEVENTQ type for VINTFs that are assigned to the user space.
Simply report the two 64-bit LVCMDQ_ERR_MAPs register values.
Reviewed-by: Alok Tiwari
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h
. Release all LVCMDQ SW resources
Drop tegra241_vintf_remove_lvcmdq(), and move tegra241_vintf_free_lvcmdq()
as the new step 2.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 13
S.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +
include/uapi/linux/iommufd.h | 58 +++
.../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 6 +-
.../iommu/arm/arm-smmu-v3/t
light that with a note to the top
of either of them.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
.../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c| 37 +--
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/ar
With the introduction of the new object and its infrastructure, update the
doc to reflect that.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 12
1 file changed, 12 insertions
This will be used by Tegra241 CMDQV implementation to report a non-default
HW info data.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +++
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3
A vEVENT can be reported only from a threaded IRQ context. Change to using
request_threaded_irq to support that.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 5 +++--
1 file
them in arm_smmu_get_viommu_size() and arm_vsmmu_init().
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 5 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 8
Test both IOMMU_HW_INFO_TYPE_DEFAULT and IOMMU_HW_INFO_TYPE_SELFTEST, and
add a negative test for an unsupported type.
Also drop the unused mask in test_cmd_get_hw_capabilities() as checkpatch
is complaining.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 33
its only (or firstly) supported type
- Update the kdoc accordingly
- Roll out the type validation in the existing drivers
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h
UT_TYPE to switch between the
old output-only field and the new bidirectional field.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 20 +++-
drivers/iom
Extend the loopback test to a new mmap page.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 4 +++
tools/testing/selftests/iommu/iommufd_utils.h | 4 +++
drivers/iommu/iommufd/selftest.c | 33 ++-
tools/testing/selftests/iommu
Some simple tests for IOMMUFD_CMD_HW_QUEUE_ALLOC infrastructure covering
the new iommufd_hw_queue_depend/undepend() helpers.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 3 +
tools/testing/selftests/iommu/iommufd_utils.h | 31 ++
drivers/iommu/iommufd
27;s HW will need an hw_queue_init op that is mutually exclusive with the
hw_queue_init_phys op, and their case will bypass the access part, i.e. no
iommufd_hw_queue_alloc_phys() call.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
can destroy its owner object.
To allow an IOMMU driver to add and delete mmappable regions onto/from the
maple tree, add iommufd_viommu_alloc/destroy_mmap helpers.
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin
jects only.
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h| 44 ++
drivers/iommu/iommufd/driver.c | 28 ++
2 files changed, 72 insertions(+)
di
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h | 42
include/uapi/linux/iommufd.h | 9
2 files changed, 51 insertions(+)
diff --git a/include/linux/iommufd.h b/include/linux/
case for a type dependent vDEVICE, so
a static vdevice_size is probably enough for the near term instead of a
get_vdevice_size function op.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Reviewed-by: Vasant Hegde
Signed-off-b
n Gunthorpe
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/io_pagetable.h | 5 +++--
drivers/iommu/iommufd/device.c | 18 --
drivers/iommu/iommuf
add an inline helper.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 23 ++
drivers/iommu/iommufd/device.c | 59 +
2 files changed, 73 insertions(+), 9 deletions(-)
diff -
Extend the existing test_cmd/err_viommu_alloc helpers to accept optional
user data. And add a TEST_F for a loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 21 -
tools/testing
-by: Vasant Hegde
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 6 ++
drivers/iommu/iommufd/viommu.c | 8 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index
: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Vasant Hegde
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 ++-
include/linux/iommu.h | 3 ++-
drivers/iommu/arm
Add a simple user_data for an input-to-output loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 13 +
drivers/iommu/iommufd/selftest.c | 15 +++
2 files changed, 28
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 40
1 file changed, 40 insertions(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index b87c2841e6bc..fd7319706684 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
Replace u32 to make it clear. No functional changes.
Also simplify the kdoc since the type itself is clear enough.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3
The "id" is too general to get its meaning easily. Rename it explicitly to
"virt_id" and update the kdocs for readability. No functional changes.
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Vasant Hegde
Signed-
The userspace-api iommufd.rst has described it correctly but the uAPI doc
was remained uncorrected. Thus, fix it.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux
Do not change @min_last in mock_viommu_alloc()
* [iommufd] Generalize TEGRA241_VCMDQ data in core structure
* [iommufd] Add selftest coverage for IOMMUFD_CMD_VCMDQ_ALLOC
* [iommufd] Add iopt_pin_pages() to prevent queue memory from unmapping
v1
https://lore.kernel.org/all/cover.1744353300.git.n
pe
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/io_pagetable.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/iommufd/io_pagetable.c
b/drivers/iommu/iommufd/io_pagetable.c
index 13d010f19ed1..22fc3a12109f 100644
--- a/drivers/iommu/iommufd/io_p
On Wed, Jul 09, 2025 at 11:55:20AM -0700, Nicolin Chen wrote:
> On Wed, Jul 09, 2025 at 02:09:04PM -0300, Jason Gunthorpe wrote:
> > On Fri, Jul 04, 2025 at 06:13:30PM -0700, Nicolin Chen wrote:
> > > +static struct iommufd_access *
> > > +iommufd_hw_queue_alloc_phys(
On Fri, Jul 04, 2025 at 06:13:20PM -0700, Nicolin Chen wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
> b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c
> index 9f59c95a254c..69bbe39e28de 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommu
On Mon, Jul 07, 2025 at 01:11:00PM +0530, Vasant Hegde wrote:
> Hi ,
>
>
> On 7/5/2025 6:43 AM, Nicolin Chen wrote:
> > Introduce a new IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl for user space to allocate
> > a HW QUEUE object for a vIOMMU specific HW-accelerated queue, e.g.:
On Wed, Jul 09, 2025 at 02:09:04PM -0300, Jason Gunthorpe wrote:
> On Fri, Jul 04, 2025 at 06:13:30PM -0700, Nicolin Chen wrote:
> > +static struct iommufd_access *
> > +iommufd_hw_queue_alloc_phys(struct iommu_hw_queue_alloc *cmd,
> > + struct i
light that with a note to the top
of either of them.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
.../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c| 37 +--
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/ar
S.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +
include/uapi/linux/iommufd.h | 58 +++
.../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 6 +-
.../iommu/arm/arm-smmu-v3/t
Add a new vEVENTQ type for VINTFs that are assigned to the user space.
Simply report the two 64-bit LVCMDQ_ERR_MAPs register values.
Reviewed-by: Alok Tiwari
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h
. Release all LVCMDQ SW resources
Drop tegra241_vintf_remove_lvcmdq(), and move tegra241_vintf_free_lvcmdq()
as the new step 2.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 13
This will be used by Tegra241 CMDQV implementation to report a non-default
HW info data.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +++
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3
A vEVENT can be reported only from a threaded IRQ context. Change to using
request_threaded_irq to support that.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 5 +++--
1 file
UT_TYPE to switch between the
old output-only field and the new bidirectional field.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 20 +++-
drivers/iom
Test both IOMMU_HW_INFO_TYPE_DEFAULT and IOMMU_HW_INFO_TYPE_SELFTEST, and
add a negative test for an unsupported type.
Also drop the unused mask in test_cmd_get_hw_capabilities() as checkpatch
is complaining.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 33
them in arm_smmu_get_viommu_size() and arm_vsmmu_init().
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 5 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 8
can destroy its owner object.
To allow an IOMMU driver to add and delete mmappable regions onto/from the
maple tree, add iommufd_viommu_alloc/destroy_mmap helpers.
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin
Extend the loopback test to a new mmap page.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 4 +++
tools/testing/selftests/iommu/iommufd_utils.h | 4 +++
drivers/iommu/iommufd/selftest.c | 33 ++-
tools/testing/selftests/iommu
With the introduction of the new object and its infrastructure, update the
doc to reflect that.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 12
1 file changed, 12 insertions
Some simple tests for IOMMUFD_CMD_HW_QUEUE_ALLOC infrastructure covering
the new iommufd_hw_queue_depend/undepend() helpers.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 3 +
tools/testing/selftests/iommu/iommufd_utils.h | 31 ++
drivers/iommu/iommufd
its only (or firstly) supported type
- Update the kdoc accordingly
- Roll out the type validation in the existing drivers
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h | 42
include/uapi/linux/iommufd.h | 9
2 files changed, 51 insertions(+)
diff --git a/include/linux/iommufd.h b/include/linux/
n Gunthorpe
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/io_pagetable.h | 5 +++--
drivers/iommu/iommufd/device.c | 18 --
drivers/iommu/iommuf
27;s HW will need an hw_queue_init op that is mutually exclusive with the
hw_queue_init_phys op, and their case will bypass the access part, i.e. no
iommufd_hw_queue_alloc_phys() call.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
case for a type dependent vDEVICE, so
a static vdevice_size is probably enough for the near term instead of a
get_vdevice_size function op.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
driver
jects only.
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h| 44 ++
drivers/iommu/iommufd/driver.c | 28 ++
2 files changed, 72 insertions(+)
di
-by: Vasant Hegde
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 6 ++
drivers/iommu/iommufd/viommu.c | 8 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index
add an inline helper.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 23 ++
drivers/iommu/iommufd/device.c | 59 +
2 files changed, 73 insertions(+), 9 deletions(-)
diff -
Add a simple user_data for an input-to-output loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 13 +
drivers/iommu/iommufd/selftest.c | 15 +++
2 files changed, 28
: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 ++-
include/linux/iommu.h | 3 ++-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3
Extend the existing test_cmd/err_viommu_alloc helpers to accept optional
user data. And add a TEST_F for a loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 21 -
tools/testing
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 40
1 file changed, 40 insertions(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index b87c2841e6bc..fd7319706684 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
The "id" is too genernal to get its meaning easily. Rename it explicitly to
"virt_id" and update the kdocs for readability. No functional changes.
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
d
Replace u32 to make it clear. No functional changes.
Also simplify the kdoc since the type itself is clear enough.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 6 +++---
drivers/iommu/arm/arm
[iommufd] Fix bug in iommu_copy_struct_to_user()
* [iommufd] Drop is_io from iommufd_ctx_alloc_mmap()
* [iommufd] Test the queue memory for its contiguity
* [iommufd] Return -ENXIO if address or length fails
* [iommufd] Do not change @min_last in mock_viommu_alloc()
* [iommufd] Generalize TEGRA24
The userspace-api iommufd.rst has described it correctly but the uAPI doc
was remained uncorrected. Thus, fix it.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux
pe
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/io_pagetable.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/iommufd/io_pagetable.c
b/drivers/iommu/iommufd/io_pagetable.c
index 13d010f19ed1..22fc3a12109f 100644
--- a/drivers/iommu/iommufd/io_p
On Thu, Jul 03, 2025 at 04:57:34AM +, Tian, Kevin wrote:
> I meant something like below:
>
> iopt_unmap_iova_range()
> {
> bool internal_access = false;
>
> down_read(&iopt->domains_rwsem);
> down_write(&iopt->iova_rwsem);
> /* Bypass any unmap if there is an internal
On Wed, Jul 02, 2025 at 09:45:26AM +, Tian, Kevin wrote:
> > From: Nicolin Chen
> > Sent: Friday, June 27, 2025 3:35 AM
> >
> > +int iommufd_access_notify_unmap(struct io_pagetable *iopt, unsigned long
> > iova,
> > + unsigne
On Wed, Jul 02, 2025 at 09:40:50AM +, Tian, Kevin wrote:
> > From: Nicolin Chen
> > Sent: Friday, June 27, 2025 3:35 AM
> > +
> > + /*
> > +* Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3,
> > vDeviceID of
> > +* AMD IOMMU, and vRID
On Wed, Jul 02, 2025 at 12:14:28AM +, Pranjal Shrivastava wrote:
> Thus, coming back to the two initial points:
>
> 1) Issuing "non-invalidation" commands through .cache_invalidate could
>be confusing, I'm not asking to change the op name here, but if we
>plan to label it, let's label
On Tue, Jul 01, 2025 at 10:51:20PM +, Pranjal Shrivastava wrote:
> On Tue, Jul 01, 2025 at 03:07:57PM -0700, Nicolin Chen wrote:
> > On Tue, Jul 01, 2025 at 08:43:30PM +, Pranjal Shrivastava wrote:
> > > On Tue, Jul 01, 2025 at 01:23:17PM -0700, Nicolin Chen wrote:
On Tue, Jul 01, 2025 at 08:43:30PM +, Pranjal Shrivastava wrote:
> On Tue, Jul 01, 2025 at 01:23:17PM -0700, Nicolin Chen wrote:
> > Or perhaps calling them "non-accelerated commands" would be nicer.
>
> Uhh okay, so there'll be a separate driver in the VM i
On Tue, Jul 01, 2025 at 08:03:35PM +, Pranjal Shrivastava wrote:
> On Tue, Jul 01, 2025 at 12:42:32PM -0700, Nicolin Chen wrote:
> > On Tue, Jul 01, 2025 at 04:02:35PM +, Pranjal Shrivastava wrote:
> > > On Thu, Jun 26, 2025 at 12:34:58PM -0700,
On Tue, Jul 01, 2025 at 04:02:35PM +, Pranjal Shrivastava wrote:
> On Thu, Jun 26, 2025 at 12:34:58PM -0700, Nicolin Chen wrote:
> > /**
> > * enum iommu_hw_info_type - IOMMU Hardware Info Types
> > * @IOMMU_HW_INFO_TYPE_NONE: Output by the drivers that do not
Some simple tests for IOMMUFD_CMD_HW_QUEUE_ALLOC infrastructure covering
the new iommufd_hw_queue_depend/undepend() helpers.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 3 +
tools/testing/selftests/iommu/iommufd_utils.h | 31 ++
drivers/iommu/iommufd
can destroy its owner object.
To allow an IOMMU driver to add and delete mmappable regions onto/from the
maple tree, add iommufd_viommu_alloc/destroy_mmap helpers.
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin
Add a new vEVENTQ type for VINTFs that are assigned to the user space.
Simply report the two 64-bit LVCMDQ_ERR_MAPs register values.
Reviewed-by: Alok Tiwari
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h
Test both IOMMU_HW_INFO_TYPE_DEFAULT and IOMMU_HW_INFO_TYPE_SELFTEST, and
add a negative test for an unsupported type.
Also drop the unused mask in test_cmd_get_hw_capabilities() as checkpatch
is complaining.
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 33
S.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +
include/uapi/linux/iommufd.h | 58 +++
.../arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 6 +-
.../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c| 407
light that with a note to the top
of either of them.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
.../iommu/arm/arm-smmu-v3/tegra241-cmdqv.c| 37 +--
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/ar
them in arm_smmu_get_viommu_size() and arm_vsmmu_init().
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 5 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 8
A vEVENT can be reported only from a threaded IRQ context. Change to using
request_threaded_irq to support that.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 5 +++--
1 file
This will be used by Tegra241 CMDQV implementation to report a non-default
HW info data.
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 7 +++
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 8 ++--
2 files
. Release all LVCMDQ SW resources
Drop tegra241_vintf_remove_lvcmdq(), and move tegra241_vintf_free_lvcmdq()
as the new step 2.
Acked-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 13
With the introduction of the new object and its infrastructure, update the
doc to reflect that.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
Documentation/userspace-api/iommufd.rst | 12
1 file changed, 12 insertions
Extend the loopback test to a new mmap page.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 4 +++
tools/testing/selftests/iommu/iommufd_utils.h | 4 +++
drivers/iommu/iommufd/selftest.c | 33 ++-
tools/testing/selftests/iommu
its only (or firstly) supported type
- Update the kdoc accordingly
- Roll out the type validation in the existing drivers
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 3
UT_TYPE to switch between the
old output-only field and the new bidirectional field.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 20 +++-
drivers/iommu/iommufd/device.c | 9 ++--
jects only.
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h| 44 ++
drivers/iommu/iommufd/driver.c | 28 ++
2 files changed, 72 insertions(+)
di
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
include/linux/iommufd.h | 42
include/uapi/linux/iommufd.h | 9
2 files changed, 51 insertions(+)
diff --git a/include/linux/iommufd.h b/include/linux/
27;s HW will need an hw_queue_init op that is mutually exclusive with the
hw_queue_init_phys op, and their case will bypass the access part, i.e. no
iommufd_hw_queue_alloc_phys() call.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
case for a type dependent vDEVICE, so
a static vdevice_size is probably enough for the near term instead of a
get_vdevice_size function op.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
driver
add an inline helper.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 23 ++
drivers/iommu/iommufd/device.c | 59 +
2 files changed, 73 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/iommufd/iommufd_private.h
b/d
Add a simple user_data for an input-to-output loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_test.h | 13 +
drivers/iommu/iommufd/selftest.c | 15 +++
2 files changed, 28
ase in iommufd_access_notify_unmap() to reject an unmap
operation and propagatethe errno upwards.
Suggested-by: Jason Gunthorpe
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Jason Gunthorpe
Reviewed-by: Lu Baolu
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 4 ++--
d
-by: Vasant Hegde
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
include/uapi/linux/iommufd.h | 6 ++
drivers/iommu/iommufd/viommu.c | 8 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h
index
Extend the existing test_cmd/err_viommu_alloc helpers to accept optional
user data. And add a TEST_F for a loopback test.
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd_utils.h | 21 -
tools/testing
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 40
1 file changed, 40 insertions(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index b87c2841e6bc..fd7319706684 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
: Jason Gunthorpe
Reviewed-by: Lu Baolu
Reviewed-by: Pranjal Shrivastava
Reviewed-by: Kevin Tian
Signed-off-by: Nicolin Chen
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 ++-
include/linux/iommu.h | 3 ++-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3
Replace u32 to make it clear. No functional changes.
Also simplify the kdoc since the type itself is clear enough.
Signed-off-by: Nicolin Chen
---
include/linux/iommu.h | 6 +++---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 3 ++-
drivers/iommu/intel
The "id" is too genernal to get its meaning easily. Rename it explicitly to
"virt_id" and update the kdocs for readability. No functional changes.
Signed-off-by: Nicolin Chen
---
drivers/iommu/iommufd/iommufd_private.h | 7 ++-
drivers/iommu/iommufd/driver.c |
1 - 100 of 702 matches
Mail list logo