* [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT
@ 2025-02-04 5:00 Nicolin Chen
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nicolin Chen @ 2025-02-04 5:00 UTC (permalink / raw)
To: jgg, kevin.tian
Cc: eric.auger, baolu.lu, yi.l.liu, patches, joro, will, robin.murphy,
iommu, linux-kernel
An attach_handle is a hwpt->fault specific thing, so the fault.c has been
holding a set of attach/detach/replace helpers for attach_handle and iopf
enabling/disabling.
Now, both the iommufd_msi series [1] and the attach_pasid series [2] want
to reuse the attach_handle for non-fault cases. Rework the attach_handle,
to prepare for either of the series. It should be merged with either that
gets merged first.
[1] https://lore.kernel.org/linux-iommu/cover.1736550979.git.nicolinc@nvidia.com/
[2] https://lore.kernel.org/linux-iommu/20241219132746.16193-1-yi.l.liu@intel.com/
Patches in this series are from [1] with some fixes addressing the review
comments.
Changelog
v1 (since [1])
* Rebase on v6.14-rc1
* Unwrap the fault attach/detach/replace helpers
* Split the attach_handle patch to make it clearer
Thanks
Nicolin
Nicolin Chen (2):
iommufd: Make attach_handle generic than fault specific
iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev()
drivers/iommu/iommufd/iommufd_private.h | 41 +-------
drivers/iommu/iommufd/device.c | 101 +++++++++++++++++++
drivers/iommu/iommufd/fault.c | 128 +-----------------------
3 files changed, 109 insertions(+), 161 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific
2025-02-04 5:00 [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Nicolin Chen
@ 2025-02-04 5:00 ` Nicolin Chen
2025-02-11 6:47 ` Yi Liu
2025-02-11 18:20 ` Jason Gunthorpe
2025-02-04 5:00 ` [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() Nicolin Chen
2025-02-11 18:21 ` [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Jason Gunthorpe
2 siblings, 2 replies; 7+ messages in thread
From: Nicolin Chen @ 2025-02-04 5:00 UTC (permalink / raw)
To: jgg, kevin.tian
Cc: eric.auger, baolu.lu, yi.l.liu, patches, joro, will, robin.murphy,
iommu, linux-kernel
"attach_handle" was added exclusively for the iommufd_fault_iopf_handler()
used by IOPF/PRI use cases. Now, both the MSI and PASID series require to
reuse the attach_handle for non-fault cases.
Add a set of new attach/detach/replace helpers that does the attach_handle
allocation/releasing/replacement in the common path and also handles those
fault specific routines such as iopf enabling/disabling and auto response.
This covers both non-fault and fault cases in a clean way, replacing those
inline helpers in the header. The following patch will clean up those old
helpers in the fault.c file.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/iommufd/iommufd_private.h | 33 +-------
drivers/iommu/iommufd/device.c | 101 ++++++++++++++++++++++++
drivers/iommu/iommufd/fault.c | 8 +-
3 files changed, 109 insertions(+), 33 deletions(-)
diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h
index 0b1bafc7fd99..02fe1ada97cc 100644
--- a/drivers/iommu/iommufd/iommufd_private.h
+++ b/drivers/iommu/iommufd/iommufd_private.h
@@ -504,35 +504,10 @@ int iommufd_fault_domain_replace_dev(struct iommufd_device *idev,
struct iommufd_hw_pagetable *hwpt,
struct iommufd_hw_pagetable *old);
-static inline int iommufd_hwpt_attach_device(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev)
-{
- if (hwpt->fault)
- return iommufd_fault_domain_attach_dev(hwpt, idev);
-
- return iommu_attach_group(hwpt->domain, idev->igroup->group);
-}
-
-static inline void iommufd_hwpt_detach_device(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev)
-{
- if (hwpt->fault) {
- iommufd_fault_domain_detach_dev(hwpt, idev);
- return;
- }
-
- iommu_detach_group(hwpt->domain, idev->igroup->group);
-}
-
-static inline int iommufd_hwpt_replace_device(struct iommufd_device *idev,
- struct iommufd_hw_pagetable *hwpt,
- struct iommufd_hw_pagetable *old)
-{
- if (old->fault || hwpt->fault)
- return iommufd_fault_domain_replace_dev(idev, hwpt, old);
-
- return iommu_group_replace_domain(idev->igroup->group, hwpt->domain);
-}
+int iommufd_fault_iopf_enable(struct iommufd_device *idev);
+void iommufd_fault_iopf_disable(struct iommufd_device *idev);
+void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
+ struct iommufd_attach_handle *handle);
static inline struct iommufd_viommu *
iommufd_get_viommu(struct iommufd_ucmd *ucmd, u32 id)
diff --git a/drivers/iommu/iommufd/device.c b/drivers/iommu/iommufd/device.c
index dfd0898fb6c1..360ba3ed8545 100644
--- a/drivers/iommu/iommufd/device.c
+++ b/drivers/iommu/iommufd/device.c
@@ -352,6 +352,107 @@ iommufd_device_attach_reserved_iova(struct iommufd_device *idev,
return 0;
}
+/* The device attach/detach/replace helpers for attach_handle */
+
+static int iommufd_hwpt_attach_device(struct iommufd_hw_pagetable *hwpt,
+ struct iommufd_device *idev)
+{
+ struct iommufd_attach_handle *handle;
+ int rc;
+
+ handle = kzalloc(sizeof(*handle), GFP_KERNEL);
+ if (!handle)
+ return -ENOMEM;
+
+ if (hwpt->fault) {
+ rc = iommufd_fault_iopf_enable(idev);
+ if (rc)
+ goto out_free_handle;
+ }
+
+ handle->idev = idev;
+ rc = iommu_attach_group_handle(hwpt->domain, idev->igroup->group,
+ &handle->handle);
+ if (rc)
+ goto out_disable_iopf;
+
+ return 0;
+
+out_disable_iopf:
+ if (hwpt->fault)
+ iommufd_fault_iopf_disable(idev);
+out_free_handle:
+ kfree(handle);
+ return rc;
+}
+
+static struct iommufd_attach_handle *
+iommufd_device_get_attach_handle(struct iommufd_device *idev)
+{
+ struct iommu_attach_handle *handle;
+
+ handle =
+ iommu_attach_handle_get(idev->igroup->group, IOMMU_NO_PASID, 0);
+ if (IS_ERR(handle))
+ return NULL;
+ return to_iommufd_handle(handle);
+}
+
+static void iommufd_hwpt_detach_device(struct iommufd_hw_pagetable *hwpt,
+ struct iommufd_device *idev)
+{
+ struct iommufd_attach_handle *handle;
+
+ handle = iommufd_device_get_attach_handle(idev);
+ iommu_detach_group_handle(hwpt->domain, idev->igroup->group);
+ if (hwpt->fault) {
+ iommufd_auto_response_faults(hwpt, handle);
+ iommufd_fault_iopf_disable(idev);
+ }
+ kfree(handle);
+}
+
+static int iommufd_hwpt_replace_device(struct iommufd_device *idev,
+ struct iommufd_hw_pagetable *hwpt,
+ struct iommufd_hw_pagetable *old)
+{
+ struct iommufd_attach_handle *handle, *old_handle =
+ iommufd_device_get_attach_handle(idev);
+ int rc;
+
+ handle = kzalloc(sizeof(*handle), GFP_KERNEL);
+ if (!handle)
+ return -ENOMEM;
+
+ if (hwpt->fault && !old->fault) {
+ rc = iommufd_fault_iopf_enable(idev);
+ if (rc)
+ goto out_free_handle;
+ }
+
+ handle->idev = idev;
+ rc = iommu_replace_group_handle(idev->igroup->group, hwpt->domain,
+ &handle->handle);
+ if (rc)
+ goto out_disable_iopf;
+
+ if (old->fault) {
+ iommufd_auto_response_faults(hwpt, old_handle);
+ if (!hwpt->fault)
+ iommufd_fault_iopf_disable(idev);
+ }
+ kfree(old_handle);
+
+ return 0;
+
+out_disable_iopf:
+ if (hwpt->fault && !old->fault)
+ iommufd_fault_iopf_disable(idev);
+out_free_handle:
+ kfree(handle);
+ return rc;
+}
+
int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt,
struct iommufd_device *idev)
{
diff --git a/drivers/iommu/iommufd/fault.c b/drivers/iommu/iommufd/fault.c
index d9a937450e55..cb844e6799d4 100644
--- a/drivers/iommu/iommufd/fault.c
+++ b/drivers/iommu/iommufd/fault.c
@@ -17,7 +17,7 @@
#include "../iommu-priv.h"
#include "iommufd_private.h"
-static int iommufd_fault_iopf_enable(struct iommufd_device *idev)
+int iommufd_fault_iopf_enable(struct iommufd_device *idev)
{
struct device *dev = idev->dev;
int ret;
@@ -50,7 +50,7 @@ static int iommufd_fault_iopf_enable(struct iommufd_device *idev)
return ret;
}
-static void iommufd_fault_iopf_disable(struct iommufd_device *idev)
+void iommufd_fault_iopf_disable(struct iommufd_device *idev)
{
mutex_lock(&idev->iopf_lock);
if (!WARN_ON(idev->iopf_enabled == 0)) {
@@ -98,8 +98,8 @@ int iommufd_fault_domain_attach_dev(struct iommufd_hw_pagetable *hwpt,
return ret;
}
-static void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_attach_handle *handle)
+void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
+ struct iommufd_attach_handle *handle)
{
struct iommufd_fault *fault = hwpt->fault;
struct iopf_group *group, *next;
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev()
2025-02-04 5:00 [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Nicolin Chen
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
@ 2025-02-04 5:00 ` Nicolin Chen
2025-02-11 6:54 ` Yi Liu
2025-02-11 18:21 ` [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Jason Gunthorpe
2 siblings, 1 reply; 7+ messages in thread
From: Nicolin Chen @ 2025-02-04 5:00 UTC (permalink / raw)
To: jgg, kevin.tian
Cc: eric.auger, baolu.lu, yi.l.liu, patches, joro, will, robin.murphy,
iommu, linux-kernel
There are new attach/detach/replace helpers in device.c taking care of both
the attach_handle and the fault specific routines for iopf_enable/disable()
and auto response.
Clean up these redundant functions in the fault.c file.
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/iommufd/iommufd_private.h | 8 --
drivers/iommu/iommufd/fault.c | 120 ------------------------
2 files changed, 128 deletions(-)
diff --git a/drivers/iommu/iommufd/iommufd_private.h b/drivers/iommu/iommufd/iommufd_private.h
index 02fe1ada97cc..8e0e3ab64747 100644
--- a/drivers/iommu/iommufd/iommufd_private.h
+++ b/drivers/iommu/iommufd/iommufd_private.h
@@ -496,14 +496,6 @@ int iommufd_fault_alloc(struct iommufd_ucmd *ucmd);
void iommufd_fault_destroy(struct iommufd_object *obj);
int iommufd_fault_iopf_handler(struct iopf_group *group);
-int iommufd_fault_domain_attach_dev(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev);
-void iommufd_fault_domain_detach_dev(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev);
-int iommufd_fault_domain_replace_dev(struct iommufd_device *idev,
- struct iommufd_hw_pagetable *hwpt,
- struct iommufd_hw_pagetable *old);
-
int iommufd_fault_iopf_enable(struct iommufd_device *idev);
void iommufd_fault_iopf_disable(struct iommufd_device *idev);
void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
diff --git a/drivers/iommu/iommufd/fault.c b/drivers/iommu/iommufd/fault.c
index cb844e6799d4..931a3fbe6e32 100644
--- a/drivers/iommu/iommufd/fault.c
+++ b/drivers/iommu/iommufd/fault.c
@@ -60,44 +60,6 @@ void iommufd_fault_iopf_disable(struct iommufd_device *idev)
mutex_unlock(&idev->iopf_lock);
}
-static int __fault_domain_attach_dev(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev)
-{
- struct iommufd_attach_handle *handle;
- int ret;
-
- handle = kzalloc(sizeof(*handle), GFP_KERNEL);
- if (!handle)
- return -ENOMEM;
-
- handle->idev = idev;
- ret = iommu_attach_group_handle(hwpt->domain, idev->igroup->group,
- &handle->handle);
- if (ret)
- kfree(handle);
-
- return ret;
-}
-
-int iommufd_fault_domain_attach_dev(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev)
-{
- int ret;
-
- if (!hwpt->fault)
- return -EINVAL;
-
- ret = iommufd_fault_iopf_enable(idev);
- if (ret)
- return ret;
-
- ret = __fault_domain_attach_dev(hwpt, idev);
- if (ret)
- iommufd_fault_iopf_disable(idev);
-
- return ret;
-}
-
void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
struct iommufd_attach_handle *handle)
{
@@ -135,88 +97,6 @@ void iommufd_auto_response_faults(struct iommufd_hw_pagetable *hwpt,
mutex_unlock(&fault->mutex);
}
-static struct iommufd_attach_handle *
-iommufd_device_get_attach_handle(struct iommufd_device *idev)
-{
- struct iommu_attach_handle *handle;
-
- handle = iommu_attach_handle_get(idev->igroup->group, IOMMU_NO_PASID, 0);
- if (IS_ERR(handle))
- return NULL;
-
- return to_iommufd_handle(handle);
-}
-
-void iommufd_fault_domain_detach_dev(struct iommufd_hw_pagetable *hwpt,
- struct iommufd_device *idev)
-{
- struct iommufd_attach_handle *handle;
-
- handle = iommufd_device_get_attach_handle(idev);
- iommu_detach_group_handle(hwpt->domain, idev->igroup->group);
- iommufd_auto_response_faults(hwpt, handle);
- iommufd_fault_iopf_disable(idev);
- kfree(handle);
-}
-
-static int __fault_domain_replace_dev(struct iommufd_device *idev,
- struct iommufd_hw_pagetable *hwpt,
- struct iommufd_hw_pagetable *old)
-{
- struct iommufd_attach_handle *handle, *curr = NULL;
- int ret;
-
- if (old->fault)
- curr = iommufd_device_get_attach_handle(idev);
-
- if (hwpt->fault) {
- handle = kzalloc(sizeof(*handle), GFP_KERNEL);
- if (!handle)
- return -ENOMEM;
-
- handle->idev = idev;
- ret = iommu_replace_group_handle(idev->igroup->group,
- hwpt->domain, &handle->handle);
- } else {
- ret = iommu_replace_group_handle(idev->igroup->group,
- hwpt->domain, NULL);
- }
-
- if (!ret && curr) {
- iommufd_auto_response_faults(old, curr);
- kfree(curr);
- }
-
- return ret;
-}
-
-int iommufd_fault_domain_replace_dev(struct iommufd_device *idev,
- struct iommufd_hw_pagetable *hwpt,
- struct iommufd_hw_pagetable *old)
-{
- bool iopf_off = !hwpt->fault && old->fault;
- bool iopf_on = hwpt->fault && !old->fault;
- int ret;
-
- if (iopf_on) {
- ret = iommufd_fault_iopf_enable(idev);
- if (ret)
- return ret;
- }
-
- ret = __fault_domain_replace_dev(idev, hwpt, old);
- if (ret) {
- if (iopf_on)
- iommufd_fault_iopf_disable(idev);
- return ret;
- }
-
- if (iopf_off)
- iommufd_fault_iopf_disable(idev);
-
- return 0;
-}
-
void iommufd_fault_destroy(struct iommufd_object *obj)
{
struct iommufd_fault *fault = container_of(obj, struct iommufd_fault, obj);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
@ 2025-02-11 6:47 ` Yi Liu
2025-02-11 18:20 ` Jason Gunthorpe
1 sibling, 0 replies; 7+ messages in thread
From: Yi Liu @ 2025-02-11 6:47 UTC (permalink / raw)
To: Nicolin Chen, jgg, kevin.tian
Cc: eric.auger, baolu.lu, patches, joro, will, robin.murphy, iommu,
linux-kernel
On 2025/2/4 13:00, Nicolin Chen wrote:
> "attach_handle" was added exclusively for the iommufd_fault_iopf_handler()
> used by IOPF/PRI use cases. Now, both the MSI and PASID series require to
> reuse the attach_handle for non-fault cases.
>
> Add a set of new attach/detach/replace helpers that does the attach_handle
> allocation/releasing/replacement in the common path and also handles those
> fault specific routines such as iopf enabling/disabling and auto response.
>
> This covers both non-fault and fault cases in a clean way, replacing those
> inline helpers in the header. The following patch will clean up those old
> helpers in the fault.c file.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 33 +-------
> drivers/iommu/iommufd/device.c | 101 ++++++++++++++++++++++++
> drivers/iommu/iommufd/fault.c | 8 +-
> 3 files changed, 109 insertions(+), 33 deletions(-)
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
--
Regards,
Yi Liu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev()
2025-02-04 5:00 ` [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() Nicolin Chen
@ 2025-02-11 6:54 ` Yi Liu
0 siblings, 0 replies; 7+ messages in thread
From: Yi Liu @ 2025-02-11 6:54 UTC (permalink / raw)
To: Nicolin Chen, jgg, kevin.tian
Cc: eric.auger, baolu.lu, patches, joro, will, robin.murphy, iommu,
linux-kernel
On 2025/2/4 13:00, Nicolin Chen wrote:
> There are new attach/detach/replace helpers in device.c taking care of both
> the attach_handle and the fault specific routines for iopf_enable/disable()
> and auto response.
>
> Clean up these redundant functions in the fault.c file.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 8 --
> drivers/iommu/iommufd/fault.c | 120 ------------------------
> 2 files changed, 128 deletions(-)
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
--
Regards,
Yi Liu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
2025-02-11 6:47 ` Yi Liu
@ 2025-02-11 18:20 ` Jason Gunthorpe
1 sibling, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2025-02-11 18:20 UTC (permalink / raw)
To: Nicolin Chen
Cc: kevin.tian, eric.auger, baolu.lu, yi.l.liu, patches, joro, will,
robin.murphy, iommu, linux-kernel
On Mon, Feb 03, 2025 at 09:00:54PM -0800, Nicolin Chen wrote:
> "attach_handle" was added exclusively for the iommufd_fault_iopf_handler()
> used by IOPF/PRI use cases. Now, both the MSI and PASID series require to
> reuse the attach_handle for non-fault cases.
>
> Add a set of new attach/detach/replace helpers that does the attach_handle
> allocation/releasing/replacement in the common path and also handles those
> fault specific routines such as iopf enabling/disabling and auto response.
>
> This covers both non-fault and fault cases in a clean way, replacing those
> inline helpers in the header. The following patch will clean up those old
> helpers in the fault.c file.
>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 33 +-------
> drivers/iommu/iommufd/device.c | 101 ++++++++++++++++++++++++
> drivers/iommu/iommufd/fault.c | 8 +-
> 3 files changed, 109 insertions(+), 33 deletions(-)
I am going to add some lockdeps to this:
diff --git a/drivers/iommu/iommufd/device.c b/drivers/iommu/iommufd/device.c
index 360ba3ed85455e..0786290b4056df 100644
--- a/drivers/iommu/iommufd/device.c
+++ b/drivers/iommu/iommufd/device.c
@@ -360,6 +360,8 @@ static int iommufd_hwpt_attach_device(struct iommufd_hw_pagetable *hwpt,
struct iommufd_attach_handle *handle;
int rc;
+ lockdep_assert_held(&idev->igroup->lock);
+
handle = kzalloc(sizeof(*handle), GFP_KERNEL);
if (!handle)
return -ENOMEM;
@@ -391,6 +393,8 @@ iommufd_device_get_attach_handle(struct iommufd_device *idev)
{
struct iommu_attach_handle *handle;
+ lockdep_assert_held(&idev->igroup->lock);
+
handle =
iommu_attach_handle_get(idev->igroup->group, IOMMU_NO_PASID, 0);
if (IS_ERR(handle))
I think the one in get_attach_handle is important to discourage misuse
of that ..
Thanks,
Jason
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT
2025-02-04 5:00 [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Nicolin Chen
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
2025-02-04 5:00 ` [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() Nicolin Chen
@ 2025-02-11 18:21 ` Jason Gunthorpe
2 siblings, 0 replies; 7+ messages in thread
From: Jason Gunthorpe @ 2025-02-11 18:21 UTC (permalink / raw)
To: Nicolin Chen
Cc: kevin.tian, eric.auger, baolu.lu, yi.l.liu, patches, joro, will,
robin.murphy, iommu, linux-kernel
On Mon, Feb 03, 2025 at 09:00:53PM -0800, Nicolin Chen wrote:
> An attach_handle is a hwpt->fault specific thing, so the fault.c has been
> holding a set of attach/detach/replace helpers for attach_handle and iopf
> enabling/disabling.
>
> Now, both the iommufd_msi series [1] and the attach_pasid series [2] want
> to reuse the attach_handle for non-fault cases. Rework the attach_handle,
> to prepare for either of the series. It should be merged with either that
> gets merged first.
>
> [1] https://lore.kernel.org/linux-iommu/cover.1736550979.git.nicolinc@nvidia.com/
> [2] https://lore.kernel.org/linux-iommu/20241219132746.16193-1-yi.l.liu@intel.com/
>
> Patches in this series are from [1] with some fixes addressing the review
> comments.
Applied, the other patches can rebase on top of this
Thanks,
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-11 18:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 5:00 [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Nicolin Chen
2025-02-04 5:00 ` [PATCH v1 1/2] iommufd: Make attach_handle generic than fault specific Nicolin Chen
2025-02-11 6:47 ` Yi Liu
2025-02-11 18:20 ` Jason Gunthorpe
2025-02-04 5:00 ` [PATCH v1 2/2] iommufd/fault: Remove iommufd_fault_domain_attach/detach/replace_dev() Nicolin Chen
2025-02-11 6:54 ` Yi Liu
2025-02-11 18:21 ` [PATCH v1 0/2] iommufd: Allocate attach_handle for any HWPT Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox