[RFC v2 0/7] add function support to IDL

Nick Rosbrook posted 7 patches 3 years, 1 month ago
Test gitlab-ci failed
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1614734296.git.rosbrookn@ainfosec.com
tools/golang/xenlight/gengotypes.py |   2 +-
tools/libs/light/gentypes.py        | 107 +++++++++++++--
tools/libs/light/idl.py             |  69 +++++++++-
tools/libs/light/libxl_9pfs.c       |   2 -
tools/libs/light/libxl_console.c    |   2 -
tools/libs/light/libxl_disk.c       |   2 -
tools/libs/light/libxl_nic.c        |   2 -
tools/libs/light/libxl_pvcalls.c    |   2 -
tools/libs/light/libxl_types.idl    | 202 ++++++++++++++++++++++++++++
tools/libs/light/libxl_usb.c        |   3 -
tools/libs/light/libxl_vdispl.c     |   2 -
tools/libs/light/libxl_vkb.c        |   1 -
tools/libs/light/libxl_vsnd.c       |   2 -
tools/libs/light/libxl_vtpm.c       |   2 -
14 files changed, 367 insertions(+), 33 deletions(-)
[RFC v2 0/7] add function support to IDL
Posted by Nick Rosbrook 3 years, 1 month ago
At a Xen Summit design session for the golang bindings (see [1]), we
agreed that it would be beneficial to expand the libxl IDL with function
support. In addition to benefiting libxl itself, this would allow other
language bindings to easily generate function wrappers.

The first version of this RFC is quite old [1]. I did address comments
on the original RFC, but also expanded the scope a bit. As a way to
evaluate function support, I worked on using this addition to the IDL to
generate device add/remove/destroy functions, and removing the
corresponding macros in libxl_internal.h. However, I stopped short of
actually completing a build with this in place, as I thought it made
sense to get feedback on the idea before working on the next step.

[1] https://lists.xenproject.org/archives/html/xen-devel/2020-07/msg00964.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2020-07/msg01352.html

Nick Rosbrook (7):
  libxl: remove extra whitespace from gentypes.py
  libxl: add Function class to IDL
  libxl: add PASS_BY_CONST_REFERENCE to idl
  libxl: add DeviceFunction classes to IDL
  libxl: add device function definitions to libxl_types.idl
  libxl: implement device add/remove/destroy functions generation
  libxl: replace LIBXL_DEFINE_DEVICE* macro usage with generated code

 tools/golang/xenlight/gengotypes.py |   2 +-
 tools/libs/light/gentypes.py        | 107 +++++++++++++--
 tools/libs/light/idl.py             |  69 +++++++++-
 tools/libs/light/libxl_9pfs.c       |   2 -
 tools/libs/light/libxl_console.c    |   2 -
 tools/libs/light/libxl_disk.c       |   2 -
 tools/libs/light/libxl_nic.c        |   2 -
 tools/libs/light/libxl_pvcalls.c    |   2 -
 tools/libs/light/libxl_types.idl    | 202 ++++++++++++++++++++++++++++
 tools/libs/light/libxl_usb.c        |   3 -
 tools/libs/light/libxl_vdispl.c     |   2 -
 tools/libs/light/libxl_vkb.c        |   1 -
 tools/libs/light/libxl_vsnd.c       |   2 -
 tools/libs/light/libxl_vtpm.c       |   2 -
 14 files changed, 367 insertions(+), 33 deletions(-)

-- 
2.17.1


Re: [RFC v2 0/7] add function support to IDL
Posted by Ian Jackson 3 years, 1 month ago
Nick Rosbrook writes ("[RFC v2 0/7] add function support to IDL"):
> At a Xen Summit design session for the golang bindings (see [1]), we
> agreed that it would be beneficial to expand the libxl IDL with function
> support. In addition to benefiting libxl itself, this would allow other
> language bindings to easily generate function wrappers.
> 
> The first version of this RFC is quite old [1]. I did address comments
> on the original RFC, but also expanded the scope a bit. As a way to
> evaluate function support, I worked on using this addition to the IDL to
> generate device add/remove/destroy functions, and removing the
> corresponding macros in libxl_internal.h. However, I stopped short of
> actually completing a build with this in place, as I thought it made
> sense to get feedback on the idea before working on the next step.

This is exciting!  I hope to find time to look at it, but I'm the
release manager for Xen 4.15 and that's taking most of my time right
now.

Regards,
Ian.

Re: [RFC v2 0/7] add function support to IDL
Posted by Nick Rosbrook 3 years, 1 month ago
On Wed, Mar 03, 2021 at 09:48:02AM +0000, Ian Jackson wrote:
> Nick Rosbrook writes ("[RFC v2 0/7] add function support to IDL"):
> > At a Xen Summit design session for the golang bindings (see [1]), we
> > agreed that it would be beneficial to expand the libxl IDL with function
> > support. In addition to benefiting libxl itself, this would allow other
> > language bindings to easily generate function wrappers.
> > 
> > The first version of this RFC is quite old [1]. I did address comments
> > on the original RFC, but also expanded the scope a bit. As a way to
> > evaluate function support, I worked on using this addition to the IDL to
> > generate device add/remove/destroy functions, and removing the
> > corresponding macros in libxl_internal.h. However, I stopped short of
> > actually completing a build with this in place, as I thought it made
> > sense to get feedback on the idea before working on the next step.
> 
> This is exciting!  I hope to find time to look at it, but I'm the
> release manager for Xen 4.15 and that's taking most of my time right
> now.

Of course, I understand. Thank you for expressing interest, I look
forward to hearing your thoughts when time permits.

Thanks,
NR

Re: [RFC v2 0/7] add function support to IDL
Posted by Nick Rosbrook 2 years, 12 months ago
On Wed, Mar 3, 2021 at 8:41 AM Nick Rosbrook <rosbrookn@gmail.com> wrote:
>
> On Wed, Mar 03, 2021 at 09:48:02AM +0000, Ian Jackson wrote:
> > Nick Rosbrook writes ("[RFC v2 0/7] add function support to IDL"):
> > > At a Xen Summit design session for the golang bindings (see [1]), we
> > > agreed that it would be beneficial to expand the libxl IDL with function
> > > support. In addition to benefiting libxl itself, this would allow other
> > > language bindings to easily generate function wrappers.
> > >
> > > The first version of this RFC is quite old [1]. I did address comments
> > > on the original RFC, but also expanded the scope a bit. As a way to
> > > evaluate function support, I worked on using this addition to the IDL to
> > > generate device add/remove/destroy functions, and removing the
> > > corresponding macros in libxl_internal.h. However, I stopped short of
> > > actually completing a build with this in place, as I thought it made
> > > sense to get feedback on the idea before working on the next step.
> >
> > This is exciting!  I hope to find time to look at it, but I'm the
> > release manager for Xen 4.15 and that's taking most of my time right
> > now.
>
> Of course, I understand. Thank you for expressing interest, I look
> forward to hearing your thoughts when time permits.
>
Hi,

Just thought I would send a ping to see if anyone has time to review.

Thanks,
NR

Re: [RFC v2 0/7] add function support to IDL
Posted by Anthony PERARD 2 years, 11 months ago
On Tue, Mar 02, 2021 at 08:46:12PM -0500, Nick Rosbrook wrote:
> At a Xen Summit design session for the golang bindings (see [1]), we
> agreed that it would be beneficial to expand the libxl IDL with function
> support. In addition to benefiting libxl itself, this would allow other
> language bindings to easily generate function wrappers.
> 
> The first version of this RFC is quite old [1]. I did address comments
> on the original RFC, but also expanded the scope a bit. As a way to
> evaluate function support, I worked on using this addition to the IDL to
> generate device add/remove/destroy functions, and removing the
> corresponding macros in libxl_internal.h. However, I stopped short of
> actually completing a build with this in place, as I thought it made
> sense to get feedback on the idea before working on the next step.

The series looks good to me, beside a few detail.

Cheers,

-- 
Anthony PERARD

Re: [RFC v2 0/7] add function support to IDL
Posted by Nick Rosbrook 2 years, 11 months ago
On Tue, May 04, 2021 at 04:46:52PM +0100, Anthony PERARD wrote:
> On Tue, Mar 02, 2021 at 08:46:12PM -0500, Nick Rosbrook wrote:
> > At a Xen Summit design session for the golang bindings (see [1]), we
> > agreed that it would be beneficial to expand the libxl IDL with function
> > support. In addition to benefiting libxl itself, this would allow other
> > language bindings to easily generate function wrappers.
> > 
> > The first version of this RFC is quite old [1]. I did address comments
> > on the original RFC, but also expanded the scope a bit. As a way to
> > evaluate function support, I worked on using this addition to the IDL to
> > generate device add/remove/destroy functions, and removing the
> > corresponding macros in libxl_internal.h. However, I stopped short of
> > actually completing a build with this in place, as I thought it made
> > sense to get feedback on the idea before working on the next step.
> 
> The series looks good to me, beside a few detail.
> 
> Cheers,
> 
> -- 
> Anthony PERARD

Thanks for reviewing!

-NR