[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH v5 19/23] libxl: modify libxl_device_pci_assignable_add/remove/list/list_free()...
> -----Original Message----- > From: Wei Liu <wl@xxxxxxx> > Sent: 04 December 2020 11:36 > To: Paul Durrant <paul@xxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Paul Durrant <pdurrant@xxxxxxxxxx>; > Christian Lindig > <christian.lindig@xxxxxxxxxx>; Ian Jackson <iwj@xxxxxxxxxxxxxx>; Wei Liu > <wl@xxxxxxx>; David Scott > <dave@xxxxxxxxxx>; Anthony PERARD <anthony.perard@xxxxxxxxxx> > Subject: Re: [PATCH v5 19/23] libxl: modify > libxl_device_pci_assignable_add/remove/list/list_free()... > > On Thu, Dec 03, 2020 at 02:25:30PM +0000, Paul Durrant wrote: > > From: Paul Durrant <pdurrant@xxxxxxxxxx> > > > > ... to use 'libxl_pci_bdf' rather than 'libxl_device_pci'. > > > > This patch modifies the API and callers accordingly. It also modifies > > several internal functions in libxl_pci.c that support the API to also use > > 'libxl_pci_bdf'. > > > > NOTE: The OCaml bindings are adjusted to contain the interface change. It > > should therefore not affect compatibility with OCaml-based utilities. > > > > Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx> > > Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx> > > > --- > > Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx> > > Cc: Wei Liu <wl@xxxxxxx> > > Cc: David Scott <dave@xxxxxxxxxx> > > Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx> > > --- > > tools/include/libxl.h | 15 +- > > tools/libs/light/libxl_pci.c | 213 +++++++++++++++------------ > > tools/ocaml/libs/xl/xenlight_stubs.c | 15 +- > > tools/xl/xl_pci.c | 32 ++-- > > 4 files changed, 156 insertions(+), 119 deletions(-) > > > > diff --git a/tools/include/libxl.h b/tools/include/libxl.h > > index 5edacccbd1da..5703fdf367c5 100644 > > --- a/tools/include/libxl.h > > +++ b/tools/include/libxl.h > > @@ -469,6 +469,13 @@ > > */ > > #define LIBXL_HAVE_PCI_BDF 1 > > > > +/* > > + * LIBXL_HAVE_PCI_ASSIGNABLE_BDF indicates that the > > + * libxl_device_pci_assignable_add/remove/list/list_free() functions all > > + * use the 'libxl_pci_bdf' type rather than 'libxl_device_pci' type. > > + */ > > +#define LIBXL_HAVE_PCI_ASSIGNABLE_BDF 1 > > + > > /* > > * libxl ABI compatibility > > * > > @@ -2378,10 +2385,10 @@ int libxl_device_events_handler(libxl_ctx *ctx, > > * added or is not bound, the functions will emit a warning but return > > * SUCCESS. > > */ > > -int libxl_device_pci_assignable_add(libxl_ctx *ctx, libxl_device_pci *pci, > > int rebind); > > -int libxl_device_pci_assignable_remove(libxl_ctx *ctx, libxl_device_pci > > *pci, int rebind); > > -libxl_device_pci *libxl_device_pci_assignable_list(libxl_ctx *ctx, int > > *num); > > -void libxl_device_pci_assignable_list_free(libxl_device_pci *list, int > > num); > > +int libxl_device_pci_assignable_add(libxl_ctx *ctx, libxl_pci_bdf *pcibdf, > > int rebind); > > +int libxl_device_pci_assignable_remove(libxl_ctx *ctx, libxl_pci_bdf > > *pcibdf, int rebind); > > +libxl_pci_bdf *libxl_device_pci_assignable_list(libxl_ctx *ctx, int *num); > > +void libxl_device_pci_assignable_list_free(libxl_pci_bdf *list, int num); > > Given these APIs are visible to external callers, you will need to > provide fallbacks for the old APIs. > Ok, I'll name the new functions something like 'libxl_pci_bdf_assignable_add/remove' etc. and provide compat shims. Paul > Wei.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |