Re: [PATCH v6 07/18] iommu/vt-d: Clear unpreserved context entries during shutdown
From: Samiullah Khawaja
Date: Wed Oct 28 2026 - 20:34:44 EST
On Wed, Oct 28, 2026 at 11:18:40AM +0800, Baolu Lu wrote:
On 10/25/26 10:19, Samiullah Khawaja wrote:
During normal shutdown the iommu translation is disabled. Since the root
table is preserved during live update, it needs to be cleaned up and the
context entries of the unpreserved devices and root entries for the
unpreserved context tables need to be cleared.
This is required because during kexec reboot and shutdown the devices do
not go through the release flow, so there might be stale entries in the
root table and context tables. Also note that new unpreserved context
tables for unpreserved devices might have been added after preservation,
so the root table entries for unpreserved context tables also need to
removed.
Signed-off-by: Samiullah Khawaja <skhawaja@xxxxxxxxxx>
---
drivers/iommu/intel/iommu.c | 15 +++-
drivers/iommu/intel/iommu.h | 5 ++
drivers/iommu/intel/liveupdate.c | 134 +++++++++++++++++++++++++++++++
3 files changed, 152 insertions(+), 2 deletions(-)
[snip]
+
static void unpreserve_iommu_context_tables(struct intel_iommu *iommu,
struct iommu_hw_ser *ser)
{
This patch looks good to me,
Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Thanks for the review,
Sami