linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jiri@resnulli.us, stefanha@redhat.com,
	multikernel@lists.linux.dev, pasha.tatashin@soleen.com,
	Cong Wang <cwang@multikernel.io>,
	Andrew Morton <akpm@linux-foundation.org>,
	Baoquan He <bhe@redhat.com>, Alexander Graf <graf@amazon.com>,
	Mike Rapoport <rppt@kernel.org>,
	Changyuan Lyu <changyuanl@google.com>,
	kexec@lists.infradead.org, linux-mm@kvack.org
Subject: [RFC Patch v2 03/16] multikernel: Introduce basic multikernel subsystem infrastructure
Date: Sat, 18 Oct 2025 23:16:17 -0700	[thread overview]
Message-ID: <20251019061631.2235405-4-xiyou.wangcong@gmail.com> (raw)
In-Reply-To: <20251019061631.2235405-1-xiyou.wangcong@gmail.com>

From: Cong Wang <cwang@multikernel.io>

This commit introduces:

* Configuration infrastructure (kernel/multikernel/Kconfig) that adds
  CONFIG_MULTIKERNEL option depending on KEXEC_CORE, it will provide kernfs
  interface for multikernel instance management, device tree based
  resource management, physical memory pool allocation, and kexec integration.

* Core initialization module (kernel/multikernel/core.c) that provides
  basic subsystem initialization using subsys_initcall() to ensure
  multikernel support is initialized after core kernel subsystems.

This foundational commit establishes the basic framework that subsequent
patches will build upon to implement the full multikernel functionality.

Signed-off-by: Cong Wang <cwang@multikernel.io>
---
 kernel/Kconfig.kexec        |  2 ++
 kernel/Makefile             |  1 +
 kernel/multikernel/Kconfig  | 20 ++++++++++++++++++++
 kernel/multikernel/Makefile |  6 ++++++
 kernel/multikernel/core.c   | 17 +++++++++++++++++
 5 files changed, 46 insertions(+)
 create mode 100644 kernel/multikernel/Kconfig
 create mode 100644 kernel/multikernel/Makefile
 create mode 100644 kernel/multikernel/core.c

diff --git a/kernel/Kconfig.kexec b/kernel/Kconfig.kexec
index 422270d64820..e0fbd7e9af43 100644
--- a/kernel/Kconfig.kexec
+++ b/kernel/Kconfig.kexec
@@ -194,4 +194,6 @@ config CRASH_MAX_MEMORY_RANGES
 	  the computation behind the value provided through the
 	  /sys/kernel/crash_elfcorehdr_size attribute.
 
+source "kernel/multikernel/Kconfig"
+
 endmenu
diff --git a/kernel/Makefile b/kernel/Makefile
index df3dd8291bb6..017ed567f86a 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -56,6 +56,7 @@ obj-y += dma/
 obj-y += entry/
 obj-y += unwind/
 obj-$(CONFIG_MODULES) += module/
+obj-$(CONFIG_MULTIKERNEL) += multikernel/
 
 obj-$(CONFIG_KCMP) += kcmp.o
 obj-$(CONFIG_FREEZER) += freezer.o
diff --git a/kernel/multikernel/Kconfig b/kernel/multikernel/Kconfig
new file mode 100644
index 000000000000..0e61fd2e505a
--- /dev/null
+++ b/kernel/multikernel/Kconfig
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Multikernel configuration
+#
+
+config MULTIKERNEL
+	bool "Multikernel support"
+	depends on KEXEC_CORE
+	help
+	  Enable multikernel support, which allows running multiple kernel
+	  instances simultaneously with resource isolation and inter-kernel
+	  communication capabilities.
+
+	  This feature provides:
+	  - Sysfs interface for multikernel instance management
+	  - Device tree based resource specification
+	  - Memory pool management for kernel instances
+	  - Integration with kexec for kernel loading
+
+	  If unsure, say N.
diff --git a/kernel/multikernel/Makefile b/kernel/multikernel/Makefile
new file mode 100644
index 000000000000..950bace927a0
--- /dev/null
+++ b/kernel/multikernel/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile for multikernel support
+#
+
+obj-y += core.o
diff --git a/kernel/multikernel/core.c b/kernel/multikernel/core.c
new file mode 100644
index 000000000000..218424d59cc3
--- /dev/null
+++ b/kernel/multikernel/core.c
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2025 Multikernel Technologies, Inc. All rights reserved
+ */
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/multikernel.h>
+
+static int __init multikernel_init(void)
+{
+	pr_info("Multikernel support initialized\n");
+	return 0;
+}
+
+/* Initialize multikernel after core kernel subsystems are ready */
+subsys_initcall(multikernel_init);
-- 
2.34.1



  parent reply	other threads:[~2025-10-19  6:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-19  6:16 [RFC Patch v2 00/16] kernel: Introduce multikernel architecture support Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 01/16] kexec: Introduce multikernel support via kexec Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 02/16] x86: Introduce SMP INIT trampoline for multikernel CPU bootstrap Cong Wang
2025-10-19  6:16 ` Cong Wang [this message]
2025-10-19  6:16 ` [RFC Patch v2 04/16] x86: Introduce MULTIKERNEL_VECTOR for inter-kernel communication Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 05/16] x86: Introduce arch_cpu_physical_id() to obtain physical CPU ID Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 06/16] multikernel: Introduce physical memory reservation and allocation Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 07/16] kexec: Implement dynamic kimage tracking Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 08/16] multikernel: Introduce device-tree based kernfs interface Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 09/16] kexec: Integrate multikernel instance management with kexec subsystem Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 10/16] Documentation: Add multikernel usage Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 11/16] kexec: Add /proc/kimage interface for kimage tracking Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 12/16] multikernel: Introduce per-instance memory allocation interface Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 13/16] kernel: Introduce generic multikernel IPI communication framework Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 14/16] multikernel: Add messaging layer for inter-kernel communication Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 15/16] kexec: Integrate multikernel support with kexec_file_load() Cong Wang
2025-10-19  6:16 ` [RFC Patch v2 16/16] multikernel: Integrate Kexec HandOver framework for DTB preservation Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251019061631.2235405-4-xiyou.wangcong@gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=changyuanl@google.com \
    --cc=cwang@multikernel.io \
    --cc=graf@amazon.com \
    --cc=jiri@resnulli.us \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=multikernel@lists.linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=rppt@kernel.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox