libxl: add PVH support to USB
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 22 Sep 2017 15:25:11 +0000 (16:25 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Thu, 28 Sep 2017 14:28:02 +0000 (15:28 +0100)
Add PVH support to usb related functions.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_usb.c

index 1d5a2432ba865819a5c961af5cac5beb738337e4..cb0e7927248f186f155dea4763cb9b36cc65d81f 100644 (file)
@@ -46,13 +46,13 @@ static int libxl__device_usbctrl_setdefault(libxl__gc *gc, uint32_t domid,
     libxl_domain_type domtype = libxl__domain_type(gc, domid);
 
     if (usbctrl->type == LIBXL_USBCTRL_TYPE_AUTO) {
-        if (domtype == LIBXL_DOMAIN_TYPE_PV) {
+        if (domtype != LIBXL_DOMAIN_TYPE_HVM) {
             rc = usbback_is_loaded(gc);
             if (rc < 0)
                 goto out;
             usbctrl->type = rc ? LIBXL_USBCTRL_TYPE_PV
                                : LIBXL_USBCTRL_TYPE_QUSB;
-        } else if (domtype == LIBXL_DOMAIN_TYPE_HVM) {
+        } else {
             /* FIXME: See if we can detect PV frontend */
             usbctrl->type = LIBXL_USBCTRL_TYPE_DEVICEMODEL;
         }