[libvirt] [PATCH] libxl: add USB to hostdev domcapabilities

Joao Martins joao.m.martins at oracle.com
Thu Jun 16 22:30:14 UTC 2016



On 06/16/2016 10:59 PM, Jim Fehlig wrote:
> Commit 2a58ed0b added support for creating guests with USB
> hostdevs. Commit fc21d10 later added support for hotplut of
                                                         ^ hotplug
> USB hostdevs. Advertise support for USB hostdevs in the
> domcapabilities.
> 
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>  src/libxl/libxl_capabilities.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
> index 45f0988..0145116 100644
> --- a/src/libxl/libxl_capabilities.c
> +++ b/src/libxl/libxl_capabilities.c
> @@ -492,6 +492,11 @@ libxlMakeDomainDeviceHostdevCaps(virDomainCapsDeviceHostdevPtr dev)
>      VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
>                               VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI);
>  
> +#ifdef LIBXL_HAVE_PVUSB
> +    VIR_DOMAIN_CAPS_ENUM_SET(dev->subsysType,
> +                             VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB);
> +#endif
> +
Hm, this also requires changes on domaincapstest otherwise the test will fail for Xen
>= 4.7. Probably to cover also < Xen 4.7 we would end up having two sets of caps to
test and have libxl_capabilities.h advertise whether it was built with PVUSB support
or not?

Joao




More information about the libvir-list mailing list