[PATCH v3 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored

Andrii Sultanov posted 3 patches 2 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1725881488.git.andrii.sultanov@cloud.com
tools/ocaml/Makefile                          |   1 +
tools/ocaml/libs/Makefile                     |   2 +-
tools/ocaml/libs/xsd_glue/META.in             |   4 +
tools/ocaml/libs/xsd_glue/Makefile            |  46 +++++
.../xsd_glue/domain_getinfo_plugin_v1/META.in |   5 +
.../domain_getinfo_plugin_v1/Makefile         |  38 ++++
.../domain_getinfo_stubs_v1.c                 | 162 ++++++++++++++++++
.../domain_getinfo_v1.ml                      |  35 ++++
.../domain_getinfo_v1.mli                     |   1 +
.../libs/xsd_glue/plugin_interface_v1.ml      |  30 ++++
.../libs/xsd_glue/plugin_interface_v1.mli     |  38 ++++
tools/ocaml/xenstored/Makefile                |   5 +-
tools/ocaml/xenstored/domains.ml              |  79 ++++++---
tools/ocaml/xenstored/paths.ml.in             |   1 +
14 files changed, 419 insertions(+), 28 deletions(-)
create mode 100644 tools/ocaml/libs/xsd_glue/META.in
create mode 100644 tools/ocaml/libs/xsd_glue/Makefile
create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/META.in
create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/Makefile
create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_stubs_v1.c
create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_v1.ml
create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_v1.mli
create mode 100644 tools/ocaml/libs/xsd_glue/plugin_interface_v1.ml
create mode 100644 tools/ocaml/libs/xsd_glue/plugin_interface_v1.mli
[PATCH v3 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored
Posted by Andrii Sultanov 2 months, 3 weeks ago
Changes from V2:

* Drop the upstreamed "Build infrastructure" commit
* Split the last commit into two: Loading the plugin in oxenstored and
switching to it
* Remove configure and paths.m4 defines as suggested.
* Reformat files appropriately
* Rename all instances of 'xenstoredglue', 'xenstored_glue', 'xsglue' to
'xsd_glue' for consistency
* Remove _v1 suffix from all static functions
* Remove leftover #defines left unused by the previous changes
* Fix inconsistent tabs/spaces usage, added blank lines where appropriate.
* Define the 'xsd_glue_failwith' macro as suggested
* Remove first_domain argument in 'domain_getinfolist' function
* Remove unnecessary memory allocation alignment code in
'domain_getinfolist'
* Improve error handling in 'domain_getinfolist' as suggested.
* Add SPDX license headers to new files.

Patch series on Gitlab for ease of review: https://gitlab.com/xen-project/people/asultanov/xen/-/compare/staging...plugin-v3

These changes passed the Gitlab CI:
- Loading the plugin: https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1445544074
- Switching to it as well: https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1445699231

The patch series has also been tested manually.

Andrii Sultanov (3):
  ocaml/libs: Implement a dynamically-loaded plugin for
    Xenctrl.domain_getinfo
  tools/oxenstored: Load the plugin for Xenctrl.domain_getinfo
  tools/oxenstored: Switch to using the plugin for
    Xenctrl.domain_getinfo

 tools/ocaml/Makefile                          |   1 +
 tools/ocaml/libs/Makefile                     |   2 +-
 tools/ocaml/libs/xsd_glue/META.in             |   4 +
 tools/ocaml/libs/xsd_glue/Makefile            |  46 +++++
 .../xsd_glue/domain_getinfo_plugin_v1/META.in |   5 +
 .../domain_getinfo_plugin_v1/Makefile         |  38 ++++
 .../domain_getinfo_stubs_v1.c                 | 162 ++++++++++++++++++
 .../domain_getinfo_v1.ml                      |  35 ++++
 .../domain_getinfo_v1.mli                     |   1 +
 .../libs/xsd_glue/plugin_interface_v1.ml      |  30 ++++
 .../libs/xsd_glue/plugin_interface_v1.mli     |  38 ++++
 tools/ocaml/xenstored/Makefile                |   5 +-
 tools/ocaml/xenstored/domains.ml              |  79 ++++++---
 tools/ocaml/xenstored/paths.ml.in             |   1 +
 14 files changed, 419 insertions(+), 28 deletions(-)
 create mode 100644 tools/ocaml/libs/xsd_glue/META.in
 create mode 100644 tools/ocaml/libs/xsd_glue/Makefile
 create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/META.in
 create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/Makefile
 create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_stubs_v1.c
 create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_v1.ml
 create mode 100644 tools/ocaml/libs/xsd_glue/domain_getinfo_plugin_v1/domain_getinfo_v1.mli
 create mode 100644 tools/ocaml/libs/xsd_glue/plugin_interface_v1.ml
 create mode 100644 tools/ocaml/libs/xsd_glue/plugin_interface_v1.mli

-- 
2.39.2
Re: [PATCH v3 0/3] tools/ocaml: Stabilize domain_getinfo for Oxenstored
Posted by Andrew Cooper 2 months, 3 weeks ago
On 09/09/2024 1:02 pm, Andrii Sultanov wrote:
> Changes from V2:
>
> * Drop the upstreamed "Build infrastructure" commit
> * Split the last commit into two: Loading the plugin in oxenstored and
> switching to it
> * Remove configure and paths.m4 defines as suggested.
> * Reformat files appropriately
> * Rename all instances of 'xenstoredglue', 'xenstored_glue', 'xsglue' to
> 'xsd_glue' for consistency
> * Remove _v1 suffix from all static functions
> * Remove leftover #defines left unused by the previous changes
> * Fix inconsistent tabs/spaces usage, added blank lines where appropriate.
> * Define the 'xsd_glue_failwith' macro as suggested
> * Remove first_domain argument in 'domain_getinfolist' function
> * Remove unnecessary memory allocation alignment code in
> 'domain_getinfolist'
> * Improve error handling in 'domain_getinfolist' as suggested.
> * Add SPDX license headers to new files.
>
> Patch series on Gitlab for ease of review: https://gitlab.com/xen-project/people/asultanov/xen/-/compare/staging...plugin-v3
>
> These changes passed the Gitlab CI:
> - Loading the plugin: https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1445544074
> - Switching to it as well: https://gitlab.com/xen-project/people/asultanov/xen/-/pipelines/1445699231
>
> The patch series has also been tested manually.
>
> Andrii Sultanov (3):
>   ocaml/libs: Implement a dynamically-loaded plugin for
>     Xenctrl.domain_getinfo
>   tools/oxenstored: Load the plugin for Xenctrl.domain_getinfo
>   tools/oxenstored: Switch to using the plugin for
>     Xenctrl.domain_getinfo

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> and queued.