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

From: Samiullah Khawaja

Date: Fri Oct 30 2026 - 15:42:55 EST


On Fri, Oct 30, 2026 at 11:07:20AM +0800, Baolu Lu wrote:
On 10/25/2026 10:19 AM, Samiullah Khawaja wrote:
Add iommupt ops for presevation, unpresevation and restoration of iommu

... preservation, unpreservation ...

Will fix.

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>

Thanks for the review,
Sami