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

Juergen Gross posted 9 patches 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20250702081305.14440-1-jgross@suse.com
There is a newer version of this series
stubdom/xenstorepvh-minios.cfg |  2 +
tools/include/xenevtchn.h      | 11 ++++
tools/libs/evtchn/minios.c     | 23 +++++++--
tools/libs/gnttab/minios.c     |  1 +
tools/xenstored/core.c         |  5 +-
tools/xenstored/core.h         | 13 ++++-
tools/xenstored/domain.c       | 25 +++++----
tools/xenstored/domain.h       |  2 +-
tools/xenstored/lu.c           | 93 +++++++++++++++++++++-------------
tools/xenstored/lu_minios.c    | 33 +++++++++++-
tools/xenstored/minios.c       | 22 ++++++--
tools/xenstored/posix.c        | 10 ++++
12 files changed, 183 insertions(+), 57 deletions(-)
[PATCH 0/9] Enable Xenstore-stubdom Live Update
Posted by Juergen Gross 4 months ago
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 series is how the Xenstore state is being
read after activating the new binary. Instead of using mmap() the
state records are read one by one via fread(). This might have a
small performance impact for the daemon live update case, but it
should be neglectable.

Juergen Gross (9):
  stubdom: configure kexec for PVH Xenstore stubdom
  tools/xenstore: perform kexec for stubdom live update
  libevtchn: add O_CLOEXEC support for Mini-OS
  libxengnttab: set the cloexec flag on Mini-OS
  xenstored: use read() instead of mmap() for reading live update state
  xenstored: don't use xenevtchn_fdopen() in stubdom
  tools/libxenevtchn: add xenevtchn_bind() under Mini-OS
  xenstored: rebind event channels after live update in stubdom
  tools/xenstored: make stubdom_init() live update aware

 stubdom/xenstorepvh-minios.cfg |  2 +
 tools/include/xenevtchn.h      | 11 ++++
 tools/libs/evtchn/minios.c     | 23 +++++++--
 tools/libs/gnttab/minios.c     |  1 +
 tools/xenstored/core.c         |  5 +-
 tools/xenstored/core.h         | 13 ++++-
 tools/xenstored/domain.c       | 25 +++++----
 tools/xenstored/domain.h       |  2 +-
 tools/xenstored/lu.c           | 93 +++++++++++++++++++++-------------
 tools/xenstored/lu_minios.c    | 33 +++++++++++-
 tools/xenstored/minios.c       | 22 ++++++--
 tools/xenstored/posix.c        | 10 ++++
 12 files changed, 183 insertions(+), 57 deletions(-)

-- 
2.43.0
Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update
Posted by Juergen Gross 3 months, 1 week ago
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 Mini-OS patch series AND it needs
> the Mini-OS commit id updated accordingly in Config.mk.
> 
> One relevant change in this series is how the Xenstore state is being
> read after activating the new binary. Instead of using mmap() the
> state records are read one by one via fread(). This might have a
> small performance impact for the daemon live update case, but it
> should be neglectable.
> 
> Juergen Gross (9):
>    stubdom: configure kexec for PVH Xenstore stubdom
>    tools/xenstore: perform kexec for stubdom live update
>    libevtchn: add O_CLOEXEC support for Mini-OS
>    libxengnttab: set the cloexec flag on Mini-OS
>    xenstored: use read() instead of mmap() for reading live update state
>    xenstored: don't use xenevtchn_fdopen() in stubdom
>    tools/libxenevtchn: add xenevtchn_bind() under Mini-OS
>    xenstored: rebind event channels after live update in stubdom
>    tools/xenstored: make stubdom_init() live update aware
> 
>   stubdom/xenstorepvh-minios.cfg |  2 +
>   tools/include/xenevtchn.h      | 11 ++++
>   tools/libs/evtchn/minios.c     | 23 +++++++--
>   tools/libs/gnttab/minios.c     |  1 +
>   tools/xenstored/core.c         |  5 +-
>   tools/xenstored/core.h         | 13 ++++-
>   tools/xenstored/domain.c       | 25 +++++----
>   tools/xenstored/domain.h       |  2 +-
>   tools/xenstored/lu.c           | 93 +++++++++++++++++++++-------------
>   tools/xenstored/lu_minios.c    | 33 +++++++++++-
>   tools/xenstored/minios.c       | 22 ++++++--
>   tools/xenstored/posix.c        | 10 ++++
>   12 files changed, 183 insertions(+), 57 deletions(-)
> 

Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update
Posted by Juergen Gross 3 months, 2 weeks ago
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 series is how the Xenstore state is being
> read after activating the new binary. Instead of using mmap() the
> state records are read one by one via fread(). This might have a
> small performance impact for the daemon live update case, but it
> should be neglectable.
> 
> Juergen Gross (9):
>    stubdom: configure kexec for PVH Xenstore stubdom
>    tools/xenstore: perform kexec for stubdom live update
>    libevtchn: add O_CLOEXEC support for Mini-OS
>    libxengnttab: set the cloexec flag on Mini-OS
>    xenstored: use read() instead of mmap() for reading live update state
>    xenstored: don't use xenevtchn_fdopen() in stubdom
>    tools/libxenevtchn: add xenevtchn_bind() under Mini-OS
>    xenstored: rebind event channels after live update in stubdom
>    tools/xenstored: make stubdom_init() live update aware
> 
>   stubdom/xenstorepvh-minios.cfg |  2 +
>   tools/include/xenevtchn.h      | 11 ++++
>   tools/libs/evtchn/minios.c     | 23 +++++++--
>   tools/libs/gnttab/minios.c     |  1 +
>   tools/xenstored/core.c         |  5 +-
>   tools/xenstored/core.h         | 13 ++++-
>   tools/xenstored/domain.c       | 25 +++++----
>   tools/xenstored/domain.h       |  2 +-
>   tools/xenstored/lu.c           | 93 +++++++++++++++++++++-------------
>   tools/xenstored/lu_minios.c    | 33 +++++++++++-
>   tools/xenstored/minios.c       | 22 ++++++--
>   tools/xenstored/posix.c        | 10 ++++
>   12 files changed, 183 insertions(+), 57 deletions(-)
> 

Could I get some feedback for this series, please?


Juergen
Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update
Posted by Jan Beulich 3 months, 2 weeks ago
On 02.07.2025 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.

I was about to commit the first two patches here, but then went back to
check here. Aiui such a patch wasn't sent yet, so I need to hold off ...

Jan
Re: [PATCH 0/9] Enable Xenstore-stubdom Live Update
Posted by Jürgen Groß 3 months, 2 weeks ago
On 17.07.25 08:39, Jan Beulich wrote:
> On 02.07.2025 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.
> 
> I was about to commit the first two patches here, but then went back to
> check here. Aiui such a patch wasn't sent yet, so I need to hold off ...

I was about to send that patch, now that the Mini-OS side has gone in.


Juergen