[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] RFC: Proposed libxl USB hot-plug interface
OK, based on the feedback, what about an interface like the following?The idea would be that long-term, AUTO would always do PV for PV VMs, and would somehow decide whether to do HVM or PV for HVM domains. The "type" and the "union" fields are designed to allow the interface to be extended to include other types of devices, such as adding emulated tablets, mice, keyboards, usb sticks, &c. "list" should return all available USB devices including the "handle" that can be used to remove a device. Thoughts? -George #define LIBXL_DEVICE_HOST_USB_ANY (-1) int libxl_usb_add(libxl_ctx *ctx, uint32_t domid, libxl_device_usb *dev, const libxl_asyncop_how *ao_how) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_usb_del(libxl_ctx *ctx, uint32_t domid, uint64_t handle, const libxl_asyncop_how *ao_how) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_usb_list(libxl_ctx *ctx, uint32_t domid, libxl_device_usb **dev, const libxl_asyncop_how *ao_how) LIBXL_EXTERNAL_CALLERS_ONLY; struct libxl_device_usb { uint16_t protocol; /* AUTO, PV, HVM */uint16_t type; /* HOST; later can be emulated devices like tablet, disk, &c */ uint32_t backend_domain_id; /* For PVUSB */uint64_t handle; /* OUT: Unique (per domain) handle that must be used to remove a device */ int union { struct { int hostbus, hostaddr, vendorid, productid; } host; }; }; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |