Re: [PATCH 10/14] iommufd-lu: Implement ioctl to let userspace mark an HWPT to be preserved

Vipin Sharma
2026-03-19T23:35:38Z

On Tue, Feb 03, 2026 at 10:09:44PM +0000, Samiullah Khawaja wrote:
> From: YiFei Zhu <zhuyifei@google.com>
> @@ -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?

> 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?