[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250928190624.3735830-2-skhawaja@google.com>
Date: Sun, 28 Sep 2025 19:06:09 +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 01/15] iommu/vt-d: Register with Live Update Orchestrator
Register Intel IOMMU driver with live update orchestrator as subsystem.
Add stub implementation of the prepare, cancel and finish callbacks.
Signed-off-by: Samiullah Khawaja <skhawaja@...gle.com>
---
MAINTAINERS | 2 ++
drivers/iommu/intel/Makefile | 1 +
drivers/iommu/intel/liveupdate.c | 45 ++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+)
create mode 100644 drivers/iommu/intel/liveupdate.c
diff --git a/MAINTAINERS b/MAINTAINERS
index baeda8a526aa..e038cdd6aa41 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14228,6 +14228,7 @@ F: tools/testing/selftests/livepatch/
LIVE UPDATE
M: Pasha Tatashin <pasha.tatashin@...een.com>
R: Pratyush Yadav <pratyush@...nel.org>
+R: Samiullah Khawaja <skhawaja@...gle.com>
L: linux-kernel@...r.kernel.org
S: Maintained
F: Documentation/ABI/testing/sysfs-kernel-liveupdate
@@ -14235,6 +14236,7 @@ F: Documentation/admin-guide/liveupdate.rst
F: Documentation/core-api/liveupdate.rst
F: Documentation/mm/memfd_preservation.rst
F: Documentation/userspace-api/liveupdate.rst
+F: drivers/iommu/intel/liveupdate.c
F: include/linux/liveupdate.h
F: include/uapi/linux/liveupdate.h
F: kernel/liveupdate/
diff --git a/drivers/iommu/intel/Makefile b/drivers/iommu/intel/Makefile
index ada651c4a01b..58922d580c79 100644
--- a/drivers/iommu/intel/Makefile
+++ b/drivers/iommu/intel/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += debugfs.o
obj-$(CONFIG_INTEL_IOMMU_SVM) += svm.o
obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o
obj-$(CONFIG_INTEL_IOMMU_PERF_EVENTS) += perfmon.o
+obj-$(CONFIG_LIVEUPDATE) += liveupdate.o
diff --git a/drivers/iommu/intel/liveupdate.c b/drivers/iommu/intel/liveupdate.c
new file mode 100644
index 000000000000..d73d780d7e19
--- /dev/null
+++ b/drivers/iommu/intel/liveupdate.c
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2025, Google LLC
+ * Author: Samiullah Khawaja <skhawaja@...gle.com>
+ */
+
+#define pr_fmt(fmt) "iommu: liveupdate: " fmt
+
+#include <linux/liveupdate.h>
+#include <linux/module.h>
+
+static int intel_liveupdate_prepare(struct liveupdate_subsystem *handle, u64 *data)
+{
+ pr_warn("Not implemented\n");
+ return 0;
+}
+
+static void intel_liveupdate_cancel(struct liveupdate_subsystem *handle, u64 data)
+{
+ pr_warn("Not implemented\n");
+}
+
+static void intel_liveupdate_finish(struct liveupdate_subsystem *handle, u64 data)
+{
+ pr_warn("Not implemented\n");
+}
+
+static struct liveupdate_subsystem_ops intel_liveupdate_subsystem_ops = {
+ .prepare = intel_liveupdate_prepare,
+ .finish = intel_liveupdate_finish,
+ .cancel = intel_liveupdate_cancel,
+};
+
+static struct liveupdate_subsystem intel_liveupdate_subsystem = {
+ .name = "intel-iommu",
+ .ops = &intel_liveupdate_subsystem_ops,
+};
+
+static int __init intel_liveupdate_init(void)
+{
+ WARN_ON_ONCE(liveupdate_register_subsystem(&intel_liveupdate_subsystem));
+ return 0;
+}
+
+late_initcall(intel_liveupdate_init);
--
2.51.0.536.g15c5d4f767-goog
Powered by blists - more mailing lists