All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Sultanov <andrii.sultanov@cloud.com>
To: xen-devel@lists.xenproject.org
Cc: Andrii Sultanov <andrii.sultanov@cloud.com>,
	Christian Lindig <christian.lindig@citrix.com>,
	David Scott <dave@recoil.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: [PATCH v1 0/4] Stabilize Oxenstored's interface with
Date: Thu, 22 Aug 2024 10:06:01 +0100	[thread overview]
Message-ID: <cover.1724314239.git.andrii.sultanov@cloud.com> (raw)

Oxenstored depends on unstable Xenctrl, utilizing only a few of its
functions. This patch series introduces a dynamically-loaded OCaml
plugin that aims to stabilize 'Xenctrl.domain_getinfo' and
'Xenctrl.domain_getinfolist' by hiding the instability behind a versioned
interface.

This, in turn, would allow to fork Oxenstored out of the xen tree,
speeding up its development and allowing it to transition to an
OCaml-standard build system.

This is only one step towards the long-term goal of being able to drop
libxenctrl: https://gitlab.com/xen-project/xen/-/issues/190

Commits and notes further in the patches explain the exact mechanism behind
this. I've tested this oxenstored with a V2 interface and plugin, with V1
plugin continuing to be compiled, loaded, and working correctly.

A dynamic-loading approach was chosen because it allows one to easily review
the remaining usages of Xenctrl and does not force oxenstored to be recompiled
every time xen changes.

This patch series passed the Gitlab CI
(https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1421643375),
and was further tested on some hosts.

Oxenstored currently uses the single-domain 'domain_getinfo' function,
whereas Cxenstored uses the more-efficient 'domain_getinfolist'. Both of
these are provided in the plugin to allow a transition from one to the
other without modifying the interface in the future.

A prototype of oxenstored using domain_getinfolist was also developed,
though it is not a part of the current patch series. It also passed the
Gitlab CI and was tested on hosts.
(https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1421686622)

A Gitlab repository with these patches applied, if it's easier for
anyone to review it on there:
https://gitlab.com/xen-project/people/asultanov/xen/-/compare/staging...staging?from_project_id=2336572

Andrii Sultanov (4):
  tools/ocaml/common.make: Remove '-cc $(CC)' flag from OCAMLOPTFLAGS
  ocaml/libs: Implement a dynamically-loaded plugin for
    Xenctrl.domain_getinfo
  tools/oxenstored: Use the plugin for Xenctrl.domain_getinfo
  Makefile.rules: Fix OCaml libs

 Config.mk                                     |   2 +-
 configure                                     |   7 +
 m4/paths.m4                                   |   4 +
 tools/configure                               |   7 +
 tools/ocaml/Makefile                          |   1 +
 tools/ocaml/Makefile.rules                    |  21 ++-
 tools/ocaml/common.make                       |   2 +-
 tools/ocaml/libs/Makefile                     |   2 +-
 tools/ocaml/libs/xenstoredglue/META.in        |   4 +
 tools/ocaml/libs/xenstoredglue/Makefile       |  39 ++++
 .../domain_getinfo_plugin_v1/META.in          |   5 +
 .../domain_getinfo_plugin_v1/Makefile         |  38 ++++
 .../domain_getinfo_stubs_v1.c                 | 169 ++++++++++++++++++
 .../domain_getinfo_v1.ml                      |  51 ++++++
 .../domain_getinfo_v1.mli                     |   0
 .../libs/xenstoredglue/plugin_interface_v1.ml |  25 +++
 .../xenstoredglue/plugin_interface_v1.mli     |  34 ++++
 tools/ocaml/xenstored/Makefile                |   5 +-
 tools/ocaml/xenstored/domains.ml              |  63 +++++--
 tools/ocaml/xenstored/paths.ml.in             |   1 +
 20 files changed, 454 insertions(+), 26 deletions(-)
 create mode 100644 tools/ocaml/libs/xenstoredglue/META.in
 create mode 100644 tools/ocaml/libs/xenstoredglue/Makefile
 create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/META.in
 create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/Makefile
 create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_stubs_v1.c
 create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.ml
 create mode 100644 tools/ocaml/libs/xenstoredglue/domain_getinfo_plugin_v1/domain_getinfo_v1.mli
 create mode 100644 tools/ocaml/libs/xenstoredglue/plugin_interface_v1.ml
 create mode 100644 tools/ocaml/libs/xenstoredglue/plugin_interface_v1.mli

-- 
2.39.2



             reply	other threads:[~2024-08-22  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  9:06 Andrii Sultanov [this message]
2024-08-22  9:06 ` [PATCH v1 1/4] tools/ocaml/common.make: Remove '-cc $(CC)' flag from OCAMLOPTFLAGS Andrii Sultanov
2024-08-22 12:25   ` Andrew Cooper
2024-08-22 13:10     ` Christian Lindig
2024-08-22 14:31     ` Edwin Torok
2024-08-22  9:06 ` [PATCH v1 2/4] ocaml/libs: Implement a dynamically-loaded plugin for Xenctrl.domain_getinfo Andrii Sultanov
2024-08-22 11:49   ` Anthony PERARD
2024-08-27  9:57     ` Andrii Sultanov
2024-08-23 17:19   ` Andrew Cooper
2024-08-27  9:08     ` Edwin Torok
2024-08-22  9:06 ` [PATCH v1 3/4] tools/oxenstored: Use the " Andrii Sultanov
2024-08-23 17:25   ` Andrew Cooper
2024-08-22  9:06 ` [PATCH v1 4/4] Makefile.rules: Fix OCaml libs Andrii Sultanov
2024-08-22  9:27 ` [PATCH v1 0/4] Stabilize Oxenstored's interface with Christian Lindig

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=cover.1724314239.git.andrii.sultanov@cloud.com \
    --to=andrii.sultanov@cloud.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.