Re: [PATCH v6 03/18] iommupt: Implement preserve/unpreserve/restore callbacks

From: Baolu Lu

Date: Thu Oct 29 2026 - 23:07:35 EST


On 10/25/2026 10:19 AM, Samiullah Khawaja wrote:
Add iommupt ops for presevation, unpresevation and restoration of iommu

... preservation, unpreservation ...

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>
---
drivers/iommu/generic_pt/iommu_pt.h | 155 ++++++++++++++++++++++
drivers/iommu/generic_pt/kunit_iommu_pt.h | 30 +++++
include/linux/generic_pt/iommu.h | 30 +++++
3 files changed, 215 insertions(+)

This patch looks good to me,

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>