[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v2 5/7] libxl: add device function definitions to libxl_types.idl


  • To: Nick Rosbrook <rosbrookn@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 4 May 2021 16:43:27 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <george.dunlap@xxxxxxxxxx>, "Nick Rosbrook" <rosbrookn@xxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 04 May 2021 15:43:37 +0000
  • Ironport-hdrordr: A9a23:wa48pqEa1OciuhDypLqFH5HXdLJzesId70hD6mlYQxZYa9Hdss iokugS2xOcskdpZFgLs7m7VpWoa3Xa6JJz/M01NbCtQAHptAKTXflfxKHlxCDtHDC7y/5F2c 5bAtZDIfD5EFQSt7ee3CCWCNAlqePqzImJgqPkw25pXUVWbchbnmFEIyK6NmEzewVcH5o+E/ Onl7t6jh6tY24eYMj+JlRtZZmmm/TxmJjrYQELCnccgWHk516VwYX3HBSC0hAVXykn+8ZEzU H+nwv16r7LiYDY9jbny2TR455K8eGB9vJ/BdeBgsVQCjLghhfAXvUDZ5S+vSs4qOzq1VAykN OkmXcdFvl0gkm/QkiF5T/WnyjpynIH9mLrw17wuwqZneXJABYBT/dnqa0cWB3D8EYktMx7y8 twrhiknqsSNjnhpmDU7cXJURYCrDvFnVMy1eoIy3BPW4oXb7Fc6YgS5llcHpsbECXm84w/C+ V1AMbA5PFZbEOCYxnizxRS6c3pWm52EgaNQ0AEtMDQziNfm2phyVAEgMMFmHMN8488VolE6+ zIPr8ArsAzcuYGKaRnBOkARsOrCmvCBRLUWVjiXmjaKA==
  • Ironport-sdr: HdnusMnvgV1Hhh3dubwoBwLGhDz+q3r6GjigUP/pZ3Kh1++xV9ZwKN3/eMKjbA5i10B7TNwbED Ol8LswLekaoQFuLQsrjDD0CBJm0fw/mc7jInnpPKteziUrDqQtBiZEYPE6mMjGqrk4nc32kK5V +ZbaCg56nA8771CmwuwEpdSqnYgtOUSiIJmaYGRswFxtntKirOCqX5dQqtkmF9BInyUtLnUxZF GKMubgrpsW+Ta5QK4gw6hO0dpRJtARd3Hym1RztW5z3VbumXRBNth7jbQOlArCp0JQxCjBWxXA ugk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Mar 02, 2021 at 08:46:17PM -0500, Nick Rosbrook wrote:
> diff --git a/tools/libs/light/libxl_types.idl 
> b/tools/libs/light/libxl_types.idl
> index 5b85a7419f..550af7a1c7 100644
> --- a/tools/libs/light/libxl_types.idl
> +++ b/tools/libs/light/libxl_types.idl
> @@ -666,6 +668,24 @@ libxl_device_vfb = Struct("device_vfb", [
>      ("keymap",        string),
>      ])
>  
> +libxl_device_vfb_add = DeviceAddFunction("device_vfb_add",
> +    device_param=("vfb", libxl_device_vfb),
> +    extra_params=[("ao_how", libxl_asyncop_how)],
> +    return_type=libxl_error
> +)
> +
> +libxl_device_vfb_remove = DeviceRemoveFunction("device_vfb_remove",
> +    device_param=("vfb", libxl_device_vfb),
> +    extra_params=[("ao_how", libxl_asyncop_how)],
> +    return_type=libxl_error
> +)
> +
> +libxl_device_vfb_destroy = DeviceDestroyFunction("device_vfb_destroy",
> +    device_param=("vfb", libxl_device_vfb),
> +    extra_params=[("ao_how", libxl_asyncop_how)],
> +    return_type=libxl_error
> +)
> +
>  libxl_device_vkb = Struct("device_vkb", [
>      ("backend_domid", libxl_domid),
>      ("backend_domname", string),

In future version of the series that is deem ready, I think it would be
useful to have this change in libxl_types.idl and the change that remove
the macro call from the C file in the same patch. It would make it
possible to review discrepancies.

The change in the idl for vfb is different that the change in the C
file:

> --- a/tools/libs/light/libxl_console.c
> +++ b/tools/libs/light/libxl_console.c
> @@ -723,8 +723,6 @@ static LIBXL_DEFINE_UPDATE_DEVID(vfb)
>  static LIBXL_DEFINE_DEVICE_FROM_TYPE(vfb)
> 
>  /* vfb */
> -LIBXL_DEFINE_DEVICE_REMOVE(vfb)
> -
>  DEFINE_DEVICE_TYPE_STRUCT(vfb, VFB, vfbs,
>      .skip_attach = 1,
>      .set_xenstore_config = (device_set_xenstore_config_fn_t)

No add function ;-)

And libxl doesn't build anymore with the last patch applied. They are
maybe also issues with functions that are static and thus are not
accessible from other c files.

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.