All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Stabilize Oxenstored's interface with
@ 2024-08-22  9:06 Andrii Sultanov
  2024-08-22  9:06 ` [PATCH v1 1/4] tools/ocaml/common.make: Remove '-cc $(CC)' flag from OCAMLOPTFLAGS Andrii Sultanov
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Andrii Sultanov @ 2024-08-22  9:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrii Sultanov, Christian Lindig, David Scott, Anthony PERARD,
	Andrew Cooper, Jan Beulich, Julien Grall, Stefano Stabellini

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



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-08-27  9:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22  9:06 [PATCH v1 0/4] Stabilize Oxenstored's interface with Andrii Sultanov
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

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.