Re: [PATCH v2 06/16] iommupt: Implement preserve/unpreserve/restore callbacks
From: Jason Gunthorpe
Date: Sat May 23 2026 - 09:34:16 EST
On Mon, Apr 27, 2026 at 05:56:23PM +0000, Samiullah Khawaja wrote:
> @@ -266,12 +273,22 @@ struct pt_iommu_cfg {
> }; \
> IOMMU_PROTOTYPES(fmt)
>
> +#ifdef CONFIG_IOMMU_LIVEUPDATE
> +#define IOMMU_PT_LIVEUPDATE_OPS(fmt) \
> + , .preserve = &pt_iommu_##fmt##_preserve, \
> + .unpreserve = &pt_iommu_##fmt##_unpreserve, \
> + .restore = &pt_iommu_##fmt##_restore
> +#else
> +#define IOMMU_PT_LIVEUPDATE_OPS(fmt)
> +#endif
Don't do it like this at all, new iommupt unique ops should be routed
through struct pt_iommu_ops
See how map_range/unmap_range now work
Jason