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

From: Samiullah Khawaja

Date: Wed Dec 02 2026 - 16:51:33 EST


On Mon, Nov 30, 2026 at 09:06:10AM -0800, Dongli Zhang wrote:


On Sun, Nov 22, 2026 8:49:35PM -0800, 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

Can I ask a basic design question?

Would you mind helping me confirm that the plan is not to reuse the preserved
DMA tables long term after kexec?

So the DMA tables are preserved and used during kexec and until the new DMA
tables are available?

Yes this is correct.

Based on the LPC 2025 talk, can I assume the plan is not to reuse the old DMA
tables long term, but to put more effort into replacing them quickly?

https://lpc.events/event/19/contributions/2046/

Taking a VM as an example, that means the below?

1. Preserve the old tables.
2. Run kexec.
3. Use the old tables until the new VM is set up.
4. Build the new tables.
5. Quickly switch to the new tables.

Yes the steps you mentioned are correct. I sent out an RFC for replacing
these tables in a hitless way:
https://lore.kernel.org/all/20260925011308.3381953-1-skhawaja@xxxxxxxxxx/

Thanks,
Sami