[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250928190624.3735830-10-skhawaja@google.com>
Date: Sun, 28 Sep 2025 19:06:17 +0000
From: Samiullah Khawaja <skhawaja@...gle.com>
To: David Woodhouse <dwmw2@...radead.org>, Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Pasha Tatashin <pasha.tatashin@...een.com>, Jason Gunthorpe <jgg@...pe.ca>, iommu@...ts.linux.dev
Cc: Samiullah Khawaja <skhawaja@...gle.com>, Robin Murphy <robin.murphy@....com>,
Pratyush Yadav <pratyush@...nel.org>, Kevin Tian <kevin.tian@...el.com>, linux-kernel@...r.kernel.org,
Saeed Mahameed <saeedm@...dia.com>, Adithya Jayachandran <ajayachandra@...dia.com>,
Parav Pandit <parav@...dia.com>, Leon Romanovsky <leonro@...dia.com>, William Tu <witu@...dia.com>,
Vipin Sharma <vipinsh@...gle.com>, dmatlack@...gle.com, zhuyifei@...gle.com,
Chris Li <chrisl@...nel.org>, praan@...gle.com
Subject: [RFC PATCH 09/15] iommu/vt-d: Add live update freeze callback
The iommu_ser needs to be updated during freeze to set the physical
address of the iommu_units and devices array as the virtual addresses
will not be valid after kexec in the next kernel.
Signed-off-by: Samiullah Khawaja <skhawaja@...gle.com>
---
drivers/iommu/intel/liveupdate.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/iommu/intel/liveupdate.c b/drivers/iommu/intel/liveupdate.c
index fb214736aa3c..a7d9b07aaada 100644
--- a/drivers/iommu/intel/liveupdate.c
+++ b/drivers/iommu/intel/liveupdate.c
@@ -258,10 +258,21 @@ static void intel_liveupdate_finish(struct liveupdate_subsystem *handle, u64 dat
pr_warn("Not implemented\n");
}
+static int intel_liveupdate_freeze(struct liveupdate_subsystem *handle, u64 *data)
+{
+ struct iommu_ser *ser = __va(*data);
+
+ ser->iommu_units_phys = __pa(ser->iommu_units);
+ ser->devices_phys = __pa(ser->devices);
+
+ return 0;
+}
+
static struct liveupdate_subsystem_ops intel_liveupdate_subsystem_ops = {
.prepare = intel_liveupdate_prepare,
.finish = intel_liveupdate_finish,
.cancel = intel_liveupdate_cancel,
+ .freeze = intel_liveupdate_freeze,
};
static struct liveupdate_subsystem intel_liveupdate_subsystem = {
--
2.51.0.536.g15c5d4f767-goog
Powered by blists - more mailing lists