Re: [PATCH v8 04/18] iommupt: Implement preserve/unpreserve/restore callbacks

From: Pranjal Shrivastava

Date: Wed Dec 02 2026 - 14:08:18 EST


On Mon, Nov 23, 2026 at 04:49:35AM +0000, Samiullah Khawaja wrote:
> Add iommupt ops for preservation, unpreservation and restoration of iommu
> page tables for liveupdate. Use the existing page walker to preserve the
> ioptdesc of the top_table and the lower tables.
>
> Preserve top_level, VASZ and FEAT Sign Extended to restore the domain in
> the next kernel. On restore, the domain has only the preserved features
> enabled and all the other features are zeroed. This is ok since the
> restored domain is made immutable and can only be freed. A kunit test is
> added to verify that the IOMMU domain free can be done with trimmed
> features.
>
> Signed-off-by: Samiullah Khawaja <skhawaja@xxxxxxxxxx>
> Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Reviewed-by: Ankit Soni <Ankit.Soni@xxxxxxx>

Reviewed-by: Pranjal Shrivastava <praan@xxxxxxxxxx>

Thanks,
Praan