libxl / libxlu: support 'xl pci-attach/detach' by name
authorPaul Durrant <pdurrant@amazon.com>
Tue, 8 Dec 2020 19:30:33 +0000 (19:30 +0000)
committerWei Liu <wl@xen.org>
Tue, 15 Dec 2020 16:24:34 +0000 (16:24 +0000)
commit8bf0fab14256057bbd145563151814300476bb28
treed947a6045493861497ff8292ff5420520591b591
parente1141654c3745588f9f13e8cf7de19cdb987ae5d
libxl / libxlu: support 'xl pci-attach/detach' by name

This patch adds a 'name' field into the idl for 'libxl_device_pci' and
libxlu_pci_parse_spec_string() is modified to parse the new 'name'
parameter of PCI_SPEC_STRING detailed in the updated documention in
xl-pci-configuration(5).

If the 'name' field is non-NULL then both libxl_device_pci_add() and
libxl_device_pci_remove() will use it to look up the device BDF in
the list of assignable devices.

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
tools/libs/util/libxlu_pci.c