Stabilize Oxenstored's interface with
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | tools/ocaml/common.make: Remove '-cc $(CC)' flag from OCAMLOPTFLAGStools/ | +1 | 3 replies | |
| 2/4 | ocaml/libs: Implement a dynamically-loaded plugin for Xenctrl.domain_getinfotools/ tools/ tools/ +9 more | +383 | 4 replies | |
| 3/4 | tools/oxenstored: Use the plugin for Xenctrl.domain_getinfoConfig.mk configure m4/ +4 more | +68 | 1 reply | |
| 4/4 | Makefile.rules: Fix OCaml libstools/ | +3 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Christian Lindig |
|---|---|
| Series | A-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/4] Stabilize Oxenstored's interface with
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
Signature · 1 line
2.39.2