Re: [PATCH 10/14] iommufd-lu: Implement ioctl to let userspace mark an HWPT to be preserved
From: Samiullah Khawaja
Date: Thu Mar 19 2026 - 20:40:58 EST
On Thu, Mar 19, 2026 at 04:35:32PM -0700, Vipin Sharma wrote:
On Tue, Feb 03, 2026 at 10:09:44PM +0000, Samiullah Khawaja wrote:
From: YiFei Zhu <zhuyifei@xxxxxxxxxx>
@@ -374,6 +374,10 @@ struct iommufd_hwpt_paging {
bool auto_domain : 1;
bool enforce_cache_coherency : 1;
bool nest_parent : 1;
+#ifdef CONFIG_IOMMU_LIVEUPDATE
+ bool lu_preserve : 1;
+ u32 lu_token;
Should we use full name i.e. liveupdate here and other places in this
series?
I think using full name liveupdate would be too long in other places in
this series. And also there are other examples of "luo" being used as a
short form. Please see:
https://lore.kernel.org/all/20251125165850.3389713-15-pasha.tatashin@xxxxxxxxxx/
diff --git a/drivers/iommu/iommufd/main.c b/drivers/iommu/iommufd/main.c
index 5cc4b08c25f5..e1a9b3051f65 100644
--- a/drivers/iommu/iommufd/main.c
+++ b/drivers/iommu/iommufd/main.c
@@ -493,6 +493,8 @@ static const struct iommufd_ioctl_op iommufd_ioctl_ops[] = {
__reserved),
IOCTL_OP(IOMMU_VIOMMU_ALLOC, iommufd_viommu_alloc_ioctl,
struct iommu_viommu_alloc, out_viommu_id),
+ IOCTL_OP(IOMMU_HWPT_LU_SET_PRESERVE, iommufd_hwpt_lu_set_preserve,
+ struct iommu_hwpt_lu_set_preserve, hwpt_token),
Shouldn't struct iommu_hwpt_lu_set_preserve{} be added to union ucmd_buffer{}
above in this file?
Agreed. Will update.