[PATCH 1/9] stubdom: configure kexec for PVH Xenstore stubdom

Juergen Gross posted 9 patches 4 months ago
There is a newer version of this series
[PATCH 1/9] stubdom: configure kexec for PVH Xenstore stubdom
Posted by Juergen Gross 4 months ago
Add the required configuration settings to enable kexec in the PVH
variant of xenstore-stubdom. This is required to support live update.

Set the number of kexec module pages to 18 in order to support using
the kexec module memory for the stubdom's 9pfs granted pages.

In Xenstore code test the CONFIG_KEXEC setting in order to determine
whether stubdom live update is supported (PV xenstore-stubdom doesn't
have live update support, as it lacks kexec).

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 stubdom/xenstorepvh-minios.cfg | 2 ++
 tools/xenstored/core.h         | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/stubdom/xenstorepvh-minios.cfg b/stubdom/xenstorepvh-minios.cfg
index 62a228f33d..ed2461d7fa 100644
--- a/stubdom/xenstorepvh-minios.cfg
+++ b/stubdom/xenstorepvh-minios.cfg
@@ -8,4 +8,6 @@ CONFIG_CONSFRONT=n
 CONFIG_LWIP=n
 CONFIG_9PFRONT=y
 CONFIG_BALLOON=y
+CONFIG_KEXEC=y
+CONFIG_KEXEC_MODULE_PAGES=18
 XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
diff --git a/tools/xenstored/core.h b/tools/xenstored/core.h
index 632886cecf..1ba9592d16 100644
--- a/tools/xenstored/core.h
+++ b/tools/xenstored/core.h
@@ -45,6 +45,11 @@
 #endif
 #endif
 
+/* Live update in stubdom case needs kexec support. */
+#if defined(__MINIOS__) && !defined(CONFIG_KEXEC)
+#define NO_LIVE_UPDATE
+#endif
+
 /* DEFAULT_BUFFER_SIZE should be large enough for each errno string. */
 #define DEFAULT_BUFFER_SIZE 16
 
-- 
2.43.0
Re: [PATCH 1/9] stubdom: configure kexec for PVH Xenstore stubdom
Posted by Jason Andryuk 3 months, 2 weeks ago
On 2025-07-02 04:12, Juergen Gross wrote:
> Add the required configuration settings to enable kexec in the PVH
> variant of xenstore-stubdom. This is required to support live update.
> 
> Set the number of kexec module pages to 18 in order to support using
> the kexec module memory for the stubdom's 9pfs granted pages.
> 
> In Xenstore code test the CONFIG_KEXEC setting in order to determine
> whether stubdom live update is supported (PV xenstore-stubdom doesn't
> have live update support, as it lacks kexec).
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>