[PATCH v3 1/2] tools/xl: add available Xenstore features to xl info output

2025-07-31 Thread Juergen Gross
Add the Xenstore feature value to the output of "xl info" in order to prepare for a future capability to limit Xenstore features visible by a guest. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/xl/Makefile | 3 ++- tools/xl/xl_i

[PATCH v3 2/2] tools: allow to limit xenstore features via guest config

2025-07-31 Thread Juergen Gross
Add a guest config parameter "xenstore_feature_mask" allowing to limit the Xenstore features the guest can see and use. This can be needed in order to allow migrating a guest to a host running a Xenstore version providing less features than the source host. Signed-off-by: Juergen Gross

[PATCH v3 0/2] tools: add support for domain specific Xenstore features

2025-07-31 Thread Juergen Gross
). Oxenstored is not covered. Changes in V2: - added Jason's Reviewed-by: tags - a small fix of patch 4 Changes in V3: - patches 1-5 have gone in already - 2 fixes in patch Juergen Gross (2): tools/xl: add available Xenstore features to xl info output tools: allow to limit xenstore features via

[PATCH v3 8/9] SUPPORT.md: add xenstorepvh-stubdom live update

2025-07-30 Thread Juergen Gross
Live update is now working with the PVH variant of xenstore-stubdom. Signed-off-by: Juergen Gross --- V2: - new patch --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index 6a82a92189..eb44ee85fd 100644 --- a/SUPPORT.md +++ b/SUPPORT.md

[PATCH v3 9/9] CHANGELOG.md: add xenstorepvh-stubdom live update

2025-07-30 Thread Juergen Gross
Signed-off-by: Juergen Gross --- V2: - new patch --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f31ca08fe..d118bb1c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https

[PATCH v3 5/9] tools/libxenevtchn: add xenevtchn_bind() under Mini-OS

2025-07-30 Thread Juergen Gross
In order to reactivate an event channel after kexec() of Mini-OS, libxenevtchn needs to allocate the port data for the event channel and set the handler again. Add a new interface xenevtchn_bind() for that purpose, available under Mini-OS only. Signed-off-by: Juergen Gross Reviewed-by: Jason

[PATCH v3 7/9] tools/xenstored: make stubdom_init() live update aware

2025-07-30 Thread Juergen Gross
Pass the live_update bool to stubdom_init() in order to be able to handle it properly under Mini-OS. As stubdom_init() will (re-)create the 9pfs device needed for reading the saved state, call stubdom_init() before lu_read_state(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

[PATCH v3 6/9] xenstored: rebind event channels after live update in stubdom

2025-07-30 Thread Juergen Gross
After performing a live update in stubdom environment some information about inter-domain event channels is lost. In order to set this information again, call xenevtchn_bind() from new_domain() in the restore case. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored

[PATCH v3 3/9] libxengnttab: set the cloexec flag on Mini-OS

2025-07-30 Thread Juergen Gross
With Mini-OS now supporting the O_CLOEXEC flag for the kexec case, set the related cloexec flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/libs/gnttab/minios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/gnttab

[PATCH v3 1/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-30 Thread Juergen Gross
e exceeding 4GB. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - move to start of series V3: - change offset to off64_t and size to size_t (Andrew Cooper) --- tools/xenstored/lu.c | 97 +++- 1 file changed, 60 insertions(+), 37 deletions(-

[PATCH v3 4/9] xenstored: don't use xenevtchn_fdopen() in stubdom

2025-07-30 Thread Juergen Gross
When running in a stubdom environment xenevtchn_fdopen() won't work, as any file descriptor state is lost across kexec(). Use a wrapper to replace the call of xenevtchn_fdopen() with the really needed xenevtchn_open() when running on top of Mini-OS. Signed-off-by: Juergen Gross Review

[PATCH v3 2/9] libevtchn: add O_CLOEXEC support for Mini-OS

2025-07-30 Thread Juergen Gross
With Mini-OS now supporting O_CLOEXEC for the kexec case, no longer ignore the XENEVTCHN_NO_CLOEXEC flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/libs/evtchn/minios.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v3 0/9] Enable Xenstore-stubdom Live Update

2025-07-30 Thread Juergen Gross
1 and 5 Juergen Gross (9): xenstored: use fread() instead of mmap() for reading live update state libevtchn: add O_CLOEXEC support for Mini-OS libxengnttab: set the cloexec flag on Mini-OS xenstored: don't use xenevtchn_fdopen() in stubdom tools/libxenevtchn: add xenevtchn_bind()

Re: [PATCH v2 1/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-29 Thread Juergen Gross
On 30.07.25 08:18, Jürgen Groß wrote: On 29.07.25 21:25, Andrew Cooper wrote: On 29/07/2025 8:21 pm, Andrew Cooper wrote: On 29/07/2025 12:01 pm, Juergen Gross wrote: diff --git a/tools/xenstored/lu.c b/tools/xenstored/lu.c index 77e0d377c5..f2c8b92d07 100644 --- a/tools/xenstored/lu.c +++ b

[PATCH v2 9/9] CHANGELOG.md: add xenstorepvh-stubdom live update

2025-07-29 Thread Juergen Gross
Signed-off-by: Juergen Gross --- V2: - new patch --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f31ca08fe..d118bb1c8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](https

[PATCH v2 8/9] SUPPORT.md: add xenstorepvh-stubdom live update

2025-07-29 Thread Juergen Gross
Live update is now working with the PVH variant of xenstore-stubdom. Signed-off-by: Juergen Gross --- V2: - new patch --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index 6a82a92189..eb44ee85fd 100644 --- a/SUPPORT.md +++ b/SUPPORT.md

[PATCH v2 6/9] xenstored: rebind event channels after live update in stubdom

2025-07-29 Thread Juergen Gross
After performing a live update in stubdom environment some information about inter-domain event channels is lost. In order to set this information again, call xenevtchn_bind() from new_domain() in the restore case. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored

[PATCH v2 7/9] tools/xenstored: make stubdom_init() live update aware

2025-07-29 Thread Juergen Gross
Pass the live_update bool to stubdom_init() in order to be able to handle it properly under Mini-OS. As stubdom_init() will (re-)create the 9pfs device needed for reading the saved state, call stubdom_init() before lu_read_state(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

[PATCH v2 4/9] xenstored: don't use xenevtchn_fdopen() in stubdom

2025-07-29 Thread Juergen Gross
When running in a stubdom environment xenevtchn_fdopen() won't work, as any file descriptor state is lost across kexec(). Use a wrapper to replace the call of xenevtchn_fdopen() with the really needed xenevtchn_open() when running on top of Mini-OS. Signed-off-by: Juergen Gross Review

[PATCH v2 0/9] Enable Xenstore-stubdom Live Update

2025-07-29 Thread Juergen Gross
small performance impact for the daemon live update case, but it should be neglectable. Changes in V2: - rebase - former patches 1 and 2 have been committed already - former patch 5 moved to start of the series (has all needed Acks) - new patches 8 and 9 Juergen Gross (9): xenstored: use fread

[PATCH v2 2/9] libevtchn: add O_CLOEXEC support for Mini-OS

2025-07-29 Thread Juergen Gross
With Mini-OS now supporting O_CLOEXEC for the kexec case, no longer ignore the XENEVTCHN_NO_CLOEXEC flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/evtchn/minios.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/libs

[PATCH v2 5/9] tools/libxenevtchn: add xenevtchn_bind() under Mini-OS

2025-07-29 Thread Juergen Gross
In order to reactivate an event channel after kexec() of Mini-OS, libxenevtchn needs to allocate the port data for the event channel and set the handler again. Add a new interface xenevtchn_bind() for that purpose, available under Mini-OS only. Signed-off-by: Juergen Gross Reviewed-by: Jason

[PATCH v2 3/9] libxengnttab: set the cloexec flag on Mini-OS

2025-07-29 Thread Juergen Gross
With Mini-OS now supporting the O_CLOEXEC flag for the kexec case, set the related cloexec flag in minios.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/gnttab/minios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/gnttab/minios.c b/tools/libs/gnttab

[PATCH v2 1/9] xenstored: use fread() instead of mmap() for reading live update state

2025-07-29 Thread Juergen Gross
Mini-OS doesn't support using mmap() for accessing a file. In order to support reading the live update state from a 9pfs based file, use fread() instead of mmap(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - move to start of series --- tools/xenstored/lu.c

[PATCH] Config: update Mini-OS commit id

2025-07-29 Thread Juergen Gross
Use the newest Mini-OS. Signed-off-by: Juergen Gross --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 20e4382ef8..7edbab8efe 100644 --- a/Config.mk +++ b/Config.mk @@ -208,7 +208,7 @@ QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git

[MINI-OS PATCH v2 1/2] mm: provide a way to do very early page table allocations

2025-07-29 Thread Juergen Gross
Add a small pool of statically allocated memory pages to be handed out for very early page table allocations. This will make it possible to do virtual allocations e.g. for mapping the shared info page. Signed-off-by: Juergen Gross --- V2: - add comment (Jan Beulich) - drop N_PT in favor of

[MINI-OS PATCH v2 2/2] x86: don't use a memory page for mapping the shared info page

2025-07-29 Thread Juergen Gross
There is no need to use a populated memory page for mapping the shared info page at that location. Just use an allocated virtual address for the shared info page. For PVH allocate an unused pfn. Signed-off-by: Juergen Gross --- V2: - don't leak virtual page in map_shared_page() (Jan Be

[MINI-OS PATCH v2 0/2] x86: don't use a memory page for mapping the shared info page

2025-07-29 Thread Juergen Gross
the RAM areas, resulting in a net win of one memory page. Changes in V2: - addressed comments by Jan Juergen Gross (2): mm: provide a way to do very early page table allocations x86: don't use a memory page for mapping the shared info page arch/x86/mm.c | 20

[GIT PULL] xen: branch for v6.17-rc1

2025-07-27 Thread Juergen Gross
): xen/netfront: Fix TX response spurious interrupts Dr. David Alan Gilbert (1): xen: Remove some deadcode (x) Juergen Gross (1): xen/gntdev: remove struct gntdev_copy_batch from stack Peng Jiang (1): xen/xenbus: fix W=1 build warning in xenbus_va_dev_error function Ryan Chung (1

[PATCH v2 7/7] tools: allow to limit xenstore features via guest config

2025-07-25 Thread Juergen Gross
Add a guest config parameter "xenstore_feature_mask" allowing to limit the Xenstore features the guest can see and use. This can be needed in order to allow migrating a guest to a host running a Xenstore version providing less features than the source host. Signed-off-by: Juergen Gross

[PATCH v2 5/7] tools/xenstored: support SET/GET_FEATURE commands

2025-07-25 Thread Juergen Gross
Add support for XS_SET_FEATURE and XS_GET_FEATURE to xenstored. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/core.c | 4 +++ tools/xenstored/domain.c | 60 tools/xenstored/domain.h | 8 ++ 3 files changed, 72

[PATCH v2 2/7] tools/xenstored: support specification of migration stream version

2025-07-25 Thread Juergen Gross
now only version 1 is supported. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 6 ++--- tools/xenstored/lu.c| 21 ++- tools/xenstored/lu.h| 1 + tools/xs-clients/xenstore_control.c | 41

[PATCH v2 3/7] tools/xenstored: add missing migration record definitions

2025-07-25 Thread Juergen Gross
he current known one. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c| 2 +- tools/xenstored/lu.c | 2 +- tools/xenstored/xenstore_state.h | 31 ++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --g

[PATCH v2 0/7] tools: add support for domain specific Xenstore features

2025-07-25 Thread Juergen Gross
). Oxenstored is not covered. Changes in V2: - added Jason's Reviewed-by: tags - a small fix of patch 4 Juergen Gross (7): tools/libs/store: add get- and set-feature related functions tools/xenstored: support specification of migration stream version tools/xenstored: add missing migration r

[PATCH v2 6/7] tools/xl: add available Xenstore features to xl info output

2025-07-25 Thread Juergen Gross
Add the Xenstore feature value to the output of "xl info" in order to prepare for a future capability to limit Xenstore features visible by a guest. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xl/Makefile | 3 ++- tools/xl/xl_info.c | 22 +

[PATCH v2 4/7] tools/xenstored: add server feature support

2025-07-25 Thread Juergen Gross
features to guests by setting the appropriate bits in the ring page. Signed-off-by: Juergen Gross --- V2: - move setting interface->server_features to introduce_domain() --- tools/xenstored/domain.c | 60 +++- tools/xenstored/domain.h | 3 ++ tools/xenstored/l

[PATCH v2 1/7] tools/libs/store: add get- and set-feature related functions

2025-07-25 Thread Juergen Gross
specific domain. xs_set_features_domain(): set the features available for a specific domain. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/include/xenstore.h | 13 + tools/libs/store/Makefile| 2 +- tools/libs/store/libxenstore.map | 6 tools

Re: [PATCH 4/7] tools/xenstored: add server feature support

2025-07-25 Thread Juergen Gross
On 25.07.25 07:18, Jürgen Groß wrote: On 25.07.25 00:48, Jason Andryuk wrote: On 2025-07-22 10:06, Juergen Gross wrote: Add per domain server features, which are initialized by the supported features at domain introduction, or by live update from the migration stream. This requires to add

[PATCH 7/7] tools: allow to limit xenstore features via guest config

2025-07-22 Thread Juergen Gross
Add a guest config parameter "xenstore_feature_mask" allowing to limit the Xenstore features the guest can see and use. This can be needed in order to allow migrating a guest to a host running a Xenstore version providing less features than the source host. Signed-off-by: Juergen Gross

[PATCH 6/7] tools/xl: add available Xenstore features to xl info output

2025-07-22 Thread Juergen Gross
Add the Xenstore feature value to the output of "xl info" in order to prepare for a future capability to limit Xenstore features visible by a guest. Signed-off-by: Juergen Gross --- tools/xl/Makefile | 3 ++- tools/xl/xl_info.c | 22 ++ 2 files changed, 24 insert

[PATCH 4/7] tools/xenstored: add server feature support

2025-07-22 Thread Juergen Gross
features to guests by setting the appropriate bits in the ring page. Signed-off-by: Juergen Gross --- tools/xenstored/domain.c | 71 tools/xenstored/domain.h | 3 ++ tools/xenstored/lu.c | 14 ++-- tools/xenstored/lu.h | 2 +- 4 files changed, 80

[PATCH 5/7] tools/xenstored: support SET/GET_FEATURE commands

2025-07-22 Thread Juergen Gross
Add support for XS_SET_FEATURE and XS_GET_FEATURE to xenstored. Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 4 +++ tools/xenstored/domain.c | 60 tools/xenstored/domain.h | 8 ++ 3 files changed, 72 insertions(+) diff --git a/tools

[PATCH 2/7] tools/xenstored: support specification of migration stream version

2025-07-22 Thread Juergen Gross
now only version 1 is supported. Signed-off-by: Juergen Gross --- tools/xenstored/control.c | 6 ++--- tools/xenstored/lu.c| 21 ++- tools/xenstored/lu.h| 1 + tools/xs-clients/xenstore_control.c | 41 ++--- 4 files

[PATCH 1/7] tools/libs/store: add get- and set-feature related functions

2025-07-22 Thread Juergen Gross
specific domain. xs_set_features_domain(): set the features available for a specific domain. Signed-off-by: Juergen Gross --- tools/include/xenstore.h | 13 + tools/libs/store/Makefile| 2 +- tools/libs/store/libxenstore.map | 6 tools/libs/store/xs.c

[PATCH 3/7] tools/xenstored: add missing migration record definitions

2025-07-22 Thread Juergen Gross
he current known one. Signed-off-by: Juergen Gross --- tools/xenstored/control.c| 2 +- tools/xenstored/lu.c | 2 +- tools/xenstored/xenstore_state.h | 31 ++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/tools/xenstored/control

[PATCH 0/7] tools: add support for domain specific Xenstore features

2025-07-22 Thread Juergen Gross
). Oxenstored is not covered. Juergen Gross (7): tools/libs/store: add get- and set-feature related functions tools/xenstored: support specification of migration stream version tools/xenstored: add missing migration record definitions tools/xenstored: add server feature support tools/xenstored

Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update

2025-07-21 Thread Juergen Gross
Anthony, could you please have a look at patches 3, 4 and 7? They are lacking a tools maintainer's comment. Juergen On 02.07.25 10:12, Juergen Gross wrote: With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. This series is based on a related

Re: [PATCH] x86/S3: don't lose previously collected CPU data (AMD extra)

2025-07-17 Thread Juergen Gross
pulating of cpu_data[]") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 15/17] tools/init-dom0less: Factor out xenstore setup

2025-07-17 Thread Juergen Gross
On 16.07.25 23:15, Jason Andryuk wrote: Factor out the xenstore setup code into configure_xenstore(). This is in preparation for handling already-introduced domains. Signed-off-by: Jason Andryuk --- tools/helpers/init-dom0less.c | 51 --- 1 file changed, 36 i

Re: [PATCH v2 14/17] tools/xenstored: Auto-introduce domains

2025-07-17 Thread Juergen Gross
On 16.07.25 23:15, Jason Andryuk wrote: Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains and introduce them. dom0_domid is updated with the xenstore domain, since it really indicates the local domain. I agree with that explanation, but I w

Re: [PATCH v2 13/17] tools/xenstored: Delay firing special watches

2025-07-17 Thread Juergen Gross
On 16.07.25 23:15, Jason Andryuk wrote: fire_special_watches() can only be called after setup_structure() has been called. If it is called before setup_structure(), the hashtable search will segfault as the nodes hashtable has not been allocated. Normally, dom0 is setup up first and setup_struc

[PATCH] Config: update Mini-OS commit id

2025-07-16 Thread Juergen Gross
Use the newest Mini-OS. Signed-off-by: Juergen Gross --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 55b1b83d49..6430a871cb 100644 --- a/Config.mk +++ b/Config.mk @@ -208,7 +208,7 @@ QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git

Re: [PATCH v2 12/17] tools/manage: Expose domain capabilities

2025-07-16 Thread Juergen Gross
cycle, so no need for playing "stable interface" games. :-) Signed-off-by: Jason Andryuk Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 11/17] xen: Add capabilities to get_domain_state

2025-07-16 Thread Juergen Gross
, returned as 0. */ +uint16_t caps; /* Must be 0 on input, returned as 0. */ I'd drop the "returned as 0" in the comment. :-) With that fixed: Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 10/17] tools/xenstored: Read event channel from xenstored page

2025-07-16 Thread Juergen Gross
On 16.07.25 23:14, Jason Andryuk wrote: Make introduce_domain() use an event channel from the the xenstore page. It is only used if non-zero. Otherwise the passed in event channel port is used. The is useful for a xenstored stubdom to configure domains autonomously. Signed-off-by: Jason Andryu

Re: [PATCH v2 09/17] xen/dom0less: store xenstore event channel in page

2025-07-16 Thread Juergen Gross
On 16.07.25 23:14, Jason Andryuk wrote: Write the associated event channel into the xenstore page so xenstored can read it. xenstored can map the grant by the reserved grant table entry, and then read out the event channel and bind it. This eliminates the need for an additional mechanism to dis

Re: [PATCH v2 08/17] public/io: xs_wire: Include event channel in interface page

2025-07-16 Thread Juergen Gross
index, so no further information is needed. Suggested-by: Juergen Gross Signed-off-by: Jason Andryuk --- xen/include/public/io/xs_wire.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/include/public/io/xs_wire.h b/xen/include/public/io/xs_wire.h index e92a87a07b..f2c0afd107

Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update

2025-07-15 Thread Juergen Gross
On 02.07.25 10:12, Juergen Gross wrote: With this series applied I was able to perform Live Update of Xenstore running in a PVH stubdom. This series is based on a related Mini-OS patch series AND it needs the Mini-OS commit id updated accordingly in Config.mk. One relevant change in this

[MINI-OS PATCH v2 13/14] 9pfs: add support to keep device opened across kexec

2025-07-15 Thread Juergen Gross
before having read the saved state). Add an alternative init function for a 9pfs device supporting to take the configuration from the kexec module instead of Xenstore. Add support for creating the device using the kexec module, too. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

[MINI-OS PATCH v2 10/14] 9pfs: refactor init_9pfront()

2025-07-15 Thread Juergen Gross
Move the Xenstore and backend interface related handling into a sub-function in order to prepare supporting reconnecting to an active 9pfs device after kexec. Don't use gnttab_alloc_and_grant(), as this will hard code to use dom0 as backend. Signed-off-by: Juergen Gross Reviewed-by:

[MINI-OS PATCH v2 12/14] gnttab: add function to obtain memory address from grantref

2025-07-15 Thread Juergen Gross
Add a new function gnttab_get_addr() to obtain a memory pointer for a given grant reference. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- gnttab.c | 10 ++ include/gnttab.h | 1 + 2 files changed, 11 insertions(+) diff --git a/gnttab.c b/gnttab.c index 6bac0905

[MINI-OS PATCH v2 14/14] events: export bind_evtchn()

2025-07-15 Thread Juergen Gross
Export the bind_evtchn() function, as it will be needed for reactivating events after kexec(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/events.c b/events.c index 9f3dbf05..a9c1ccac 100644 --- a/events.c +++ b

[MINI-OS PATCH v2 11/14] gnttab: remove gnttab_alloc_and_grant() function

2025-07-15 Thread Juergen Gross
users, there doesn't seem to be a real demand for that function. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- gnttab.c | 13 - include/gnttab.h | 1 - 2 files changed, 14 deletions(-) diff --git a/gnttab.c b/gnttab.c index 5b04ab01..6bac0905 100644

[MINI-OS PATCH v2 07/14] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Juergen Gross
fying it as a module in struct hvm_start_info. The contents of the memory area are described via a generic table of contents in the last page of the memory. Signed-off-by: Juergen Gross --- V2: - set kexec_mod_start in kexec_check_module() - remove fallback definition of CONFIG_KEXEC_MODULE_PAGES

[MINI-OS PATCH v2 06/14] mini-os: config: add support for config items with numerical values

2025-07-15 Thread Juergen Gross
Add support for a Mini-OS config file containing config items with numerical values, e.g. CONFIG_FOO=7. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- Config.mk | 4 1 file changed, 4 insertions(+) diff --git a/Config.mk b/Config.mk index e2afb1b4..b9675e61 100644 --- a

[MINI-OS PATCH v2 08/14] kexec: add support for allocating pages from kexec module memory

2025-07-15 Thread Juergen Gross
Add the needed functions for allocating and freeing memory pages of the kexec module. As the pages are always related to a kexec module record, add the related utility functions, too. For now only support adding records and retrieving them. Signed-off-by: Juergen Gross Reviewed-by: Jason

[MINI-OS PATCH v2 05/14] e820: use special type for software reserved memory

2025-07-15 Thread Juergen Gross
that new type can easily be filtered out when building the memory map for the new kernel. Introduce the type E820_TYPE_SOFT_RESERVED with the same value as the Linux kernel is using for the same purpose. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- arch/x86/kexec.c | 4 +++- e

[MINI-OS PATCH v2 09/14] 9pfs: store bepath in struct struct dev_9pfs

2025-07-15 Thread Juergen Gross
Use struct dev_9pfs for storing the backend path of the device state in order to avoid code duplication in init_9pfront() and shutdown_9pfront(). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- 9pfront.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions

[MINI-OS PATCH v2 04/14] kexec: restructure building the start info data

2025-07-15 Thread Juergen Gross
will make it easier to add new data items without having to rewrite large portions of the function. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- arch/x86/kexec.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/x86/kexec.c b/arch/x86/kex

[MINI-OS PATCH v2 02/14] kexec: fix physical addresses in start info data

2025-07-15 Thread Juergen Gross
("mini-os: kexec: build parameters for new kernel") Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - rename kexec_param_loc to kexec_param_pa (Jason Andryuk) --- arch/x86/kexec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86

[MINI-OS PATCH v2 00/14] Make Xenstore-stubdom live update possible

2025-07-15 Thread Juergen Gross
perform a Xenstore live update an associated patch series for Xen is needed. The Xen series is depending on this Mini-OS patch series. Changes in V2: - patches 1-5 of V1 have been applied already - addressed the (minor) comments to V1 Juergen Gross (14): mm: don't add module pages to free m

[MINI-OS PATCH v2 03/14] e820: don't count lapic page as initially reserved

2025-07-15 Thread Juergen Gross
a lapic. So when finding the lapic page to be marked as reserved, don't add it to the number of reserved pages. Fixes: 9b87429d2864 ("mini-os: fix number of pages for PVH") Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- e820.c | 3 +++ 1 file changed, 3 insertions(+

[MINI-OS PATCH v2 01/14] mm: don't add module pages to free memory

2025-07-15 Thread Juergen Gross
pages are below the page tables. Signed-off-by: Juergen Gross --- V2: - call pvh_reserve_start_info() from arch_mm_preinit() (Jason Andryuk) --- arch/x86/mm.c | 77 +++ include/mm.h | 1 + mm.c | 21 +- 3 files changed, 98 inser

Re: [MINI-OS PATCH 17/19] gnttab: add function to obtain memory address from grantref

2025-07-15 Thread Juergen Gross
On 14.07.25 23:23, Jason Andryuk wrote: On 2025-07-02 04:12, Juergen Gross wrote: Add a new function gnttab_get_addr() to obtain a memory pointer for a given grant reference. Signed-off-by: Juergen Gross Maybe you want to name it gnttab_get_vaddr() to be a little more explicit in its

Re: [MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-15 Thread Juergen Gross
On 14.07.25 23:22, Jason Andryuk wrote: On 2025-07-11 03:49, Jürgen Groß wrote: On 11.07.25 01:21, Jason Andryuk wrote: On 2025-07-02 04:12, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around

Re: [PATCH] xen/netfront: Fix TX response spurious interrupts

2025-07-11 Thread Juergen Gross
On 10.07.25 18:11, Anthoine Bourgeois wrote: We found at Vates that there are lot of spurious interrupts when benchmarking the PV drivers of Xen. This issue appeared with a patch that addresses security issue XSA-391 (see Fixes below). On an iperf benchmark, spurious interrupts can represent up t

[MINI-OS PATCH] e820: fix e820_get_reserved_pfns() to reserve page aligned area

2025-07-11 Thread Juergen Gross
e820_get_reserved_pfns() needs to make sure to reserve only page aligned memory areas. Fixes: a7d27a7332ba ("mini-os: add memory map service functions") Signed-off-by: Juergen Gross --- e820.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e820.c b/e820.c inde

[PATCH] libxl: allow to run non-HVM guest without any device model being available

2025-07-11 Thread Juergen Gross
kends, handle this case gracefully. Fixes: 19ab8356abe4 ("tools: remove support for running a guest with qemu-traditional") Signed-off-by: Juergen Gross --- tools/libs/light/libxl_create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/libxl_c

Re: [PATCH v2 0/3] stubdom/grub: avoid relying on start_info definition

2025-07-10 Thread Juergen Gross
On 26.06.25 17:13, Juergen Gross wrote: With the related change having been added to Mini-OS, the single V1 patch can now be expanded to a 3 patch series, especially meant to untangle the close dependencies between grub-pv and Mini-OS internals. Changes in V2: - add comment to patch 1 - added

Re: [MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-09 Thread Juergen Gross
On 02.07.25 10:12, Juergen Gross wrote: Especially for support of Xenstore-stubdom live update some memory must be handed over to the new kernel without moving it around: as the 9pfs device used for storing and retrieving the state of Xenstore needs to be kept operational across kexec (it can&#

[MINI-OS PATCH 1/2] mm: provide a way to do very early page table allocations

2025-07-07 Thread Juergen Gross
Add a small pool of statically allocated memory pages to be handed out for very early page table allocations. This will make it possible to do virtual allocations e.g. for mapping the shared info page. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 16 +++- 1 file changed, 15

[MINI-OS PATCH 2/2] x86: don't use a memory page for mapping the shared info page

2025-07-07 Thread Juergen Gross
There is no need to use a populated memory page for mapping the shared info page at that location. Just use an allocated virtual address for the shared info page. For PVH allocate an unused pfn. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 7 --- arch/x86/setup.c | 15

[MINI-OS PATCH 0/2] x86: don't use a memory page for mapping the shared info page

2025-07-07 Thread Juergen Gross
the RAM areas, resulting in a net win of one memory page. Juergen Gross (2): mm: provide a way to do very early page table allocations x86: don't use a memory page for mapping the shared info page arch/x86/mm.c | 23 +++ arch/x86/setup.c | 15 --- arc

Re: [PATCH 08/11] xen/sysctl: wrap around XEN_SYSCTL_scheduler_op

2025-07-06 Thread Juergen Gross
: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH 07/11] xen/sysctl: wrap around XEN_SYSCTL_cpupool_op

2025-07-06 Thread Juergen Gross
- cpupool_unassign_cpu_helper - cpupool_unassign_cpu Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digital signature

Re: [PATCH 03/11] xen/sysctl: wrap around XEN_SYSCTL_sched_id

2025-07-06 Thread Juergen Gross
On 07.07.25 05:13, Penny Zheng wrote: The following function shall be wrapped: - scheduler_id() Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc

Re: [RFC PATCH] xen/gntdev: reduce stack usage by dynamically allocating gntdev_copy_batch

2025-07-03 Thread Juergen Gross
On 03.07.25 19:35, Christophe JAILLET wrote: Le 03/07/2025 à 07:22, Jürgen Groß a écrit : On 03.07.25 00:42, Tu Dinh wrote: On 01/07/2025 23:53, Abinash wrote: Hi , Thanks for pointing that out. I haven’t measured the performance impact yet — my main focus was on getting rid of the stack usa

[PATCH] xen/gntdev: remove struct gntdev_copy_batch from stack

2025-07-03 Thread Juergen Gross
Abinash Singh Signed-off-by: Juergen Gross --- drivers/xen/gntdev-common.h | 4 +++ drivers/xen/gntdev.c| 71 ++--- 2 files changed, 54 insertions(+), 21 deletions(-) diff --git a/drivers/xen/gntdev-common.h b/drivers/xen/gntdev-common.h index 9c286b2a

[PATCH 8/9] xenstored: rebind event channels after live update in stubdom

2025-07-02 Thread Juergen Gross
After performing a live update in stubdom environment some information about inter-domain event channels is lost. In order to set this information again, call xenevtchn_bind() from new_domain() in the restore case. Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 1 - tools/xenstored

[MINI-OS PATCH 09/19] kexec: restructure building the start info data

2025-07-02 Thread Juergen Gross
will make it easier to add new data items without having to rewrite large portions of the function. Signed-off-by: Juergen Gross --- arch/x86/kexec.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/arch/x86/kexec.c b/arch/x86/kexec.c index d84df42c..3e3b6

[MINI-OS PATCH 15/19] 9pfs: refactor init_9pfront()

2025-07-02 Thread Juergen Gross
Move the Xenstore and backend interface related handling into a sub-function in order to prepare supporting reconnecting to an active 9pfs device after kexec. Signed-off-by: Juergen Gross --- 9pfront.c | 136 ++ 1 file changed, 86 insertions

[MINI-OS PATCH 16/19] gnttab: remove gnttab_alloc_and_grant() function

2025-07-02 Thread Juergen Gross
users, there doesn't seem to be a real demand for that function. Signed-off-by: Juergen Gross --- gnttab.c | 13 - include/gnttab.h | 1 - 2 files changed, 14 deletions(-) diff --git a/gnttab.c b/gnttab.c index 5b04ab01..6bac0905 100644 --- a/gnttab.c +++ b/gnttab.c @@ -1

[PATCH 6/9] xenstored: don't use xenevtchn_fdopen() in stubdom

2025-07-02 Thread Juergen Gross
When running in a stubdom environment xenevtchn_fdopen() won't work, as any file descriptor state is lost across kexec(). Use a wrapper to replace the call of xenevtchn_fdopen() with the really needed xenevtchn_open() when running on top of Mini-OS. Signed-off-by: Juergen Gross ---

[MINI-OS PATCH 11/19] mini-os: config: add support for config items with numerical values

2025-07-02 Thread Juergen Gross
Add support for a Mini-OS config file containing config items with numerical values, e.g. CONFIG_FOO=7. Signed-off-by: Juergen Gross --- Config.mk | 4 1 file changed, 4 insertions(+) diff --git a/Config.mk b/Config.mk index e2afb1b4..b9675e61 100644 --- a/Config.mk +++ b/Config.mk

[MINI-OS PATCH 08/19] e820: don't count lapic page as initially reserved

2025-07-02 Thread Juergen Gross
a lapic. So when finding the lapic page to be marked as reserved, don't add it to the number of reserved pages. Fixes: 9b87429d2864 ("mini-os: fix number of pages for PVH") Signed-off-by: Juergen Gross --- e820.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e820.c

[MINI-OS PATCH 17/19] gnttab: add function to obtain memory address from grantref

2025-07-02 Thread Juergen Gross
Add a new function gnttab_get_addr() to obtain a memory pointer for a given grant reference. Signed-off-by: Juergen Gross --- gnttab.c | 10 ++ include/gnttab.h | 1 + 2 files changed, 11 insertions(+) diff --git a/gnttab.c b/gnttab.c index 6bac0905..52d6792a 100644 --- a

[MINI-OS PATCH 04/19] time: unbind VIRQ_TIMER across kexec

2025-07-02 Thread Juergen Gross
Deactivate the VIRQ_TIMER event when doing kexec() in order to be able to set it up again in the new kernel. Signed-off-by: Juergen Gross --- arch/x86/time.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/time.c b/arch/x86/time.c index 52916e15..3a2a1d29 100644

[MINI-OS PATCH 12/19] mini-os: kexec: add support for handing over some memory across kexec

2025-07-02 Thread Juergen Gross
fying it as a module in struct hvm_start_info. The contents of the memory area are described via a generic table of contents in the last page of the memory. Signed-off-by: Juergen Gross --- Config.mk | 2 ++ arch/x86/kexec.c | 77 +++ arc

[PATCH 9/9] tools/xenstored: make stubdom_init() live update aware

2025-07-02 Thread Juergen Gross
Pass the live_update bool to stubdom_init() in order to be able to handle it properly under Mini-OS. As stubdom_init() will (re-)create the 9pfs device needed for reading the saved state, call stubdom_init() before lu_read_state(). Signed-off-by: Juergen Gross --- tools/xenstored/core.c | 4

[PATCH 4/9] libxengnttab: set the cloexec flag on Mini-OS

2025-07-02 Thread Juergen Gross
With Mini-OS now supporting the O_CLOEXEC flag for the kexec case, set the related cloexec flag in minios.c. Signed-off-by: Juergen Gross --- tools/libs/gnttab/minios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/libs/gnttab/minios.c b/tools/libs/gnttab/minios.c index cac89f0ba6

  1   2   3   4   5   6   7   8   9   10   >