libxl: add 'name' field to 'libxl_device_pci' in the IDL...
authorPaul Durrant <pdurrant@amazon.com>
Tue, 5 Jan 2021 17:46:39 +0000 (17:46 +0000)
committerWei Liu <wl@xen.org>
Thu, 21 Jan 2021 15:20:40 +0000 (15:20 +0000)
commit57bff091f47f0784f67cad198649469cbac585d8
tree10951bb27af92bcce7660a6986b93d772ea544e4
parentd473d74af381fd7086b5b9ca405a67735a41cc79
libxl: add 'name' field to 'libxl_device_pci' in the IDL...

... and modify libxl_pci_bdf_assignable_add/remove/list() to make use of it.

libxl_pci_bdf_assignable_add() will store the name of the device in xenstore
if the field is specified (i.e. non-NULL) and libxl_pci_bdf_assignable_remove()
will remove devices specified only by name, looking up the BDF as necessary.

libxl_pci_bdf_assignable_list() will also populate the 'name' field if a name
was stored by libxl_pci_bdf_assignable_add().

NOTE: This patch also fixes whitespace in the declaration of 'libxl_device_pci'
      in the IDL.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
tools/include/libxl.h
tools/libs/light/libxl_pci.c
tools/libs/light/libxl_types.idl