[Xen-devel] [PATCH V2] bind_usbintf: do not reuse 'path'

2016-04-07 Thread Chunyan Liu
To avoid confusion, use "intf_path" to indicate driver/interface path, and "bind_path" indicate driver/bind path. Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@citrix.com> CC: Ian Jackson

[Xen-devel] [PATCH] bind_usbintf: do not reuse 'path'

2016-04-07 Thread Chunyan Liu
To avoid confusion, add a new variable "intf_path" to indicate driver/interface path, let "path" indicate driver/bind path only. CID: 1358111 Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@ci

[Xen-devel] [PATCH 1/4] a fix in libxl_device_usbdev_list

2016-04-07 Thread Chunyan Liu
In testing with libvirt pvusb functionality, found a rc check error in libxl_device_usbdev_list. Correct it. This function is not used by xl. Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@citrix.com> CC: Ian

[Xen-devel] [PATCH 2/4] correct libxl_write_exactly sizeof

2016-04-07 Thread Chunyan Liu
sizeof is wrongly used in libxl_write_exactly function, using strlen instead. CID: 1358110 CID: 1358109 Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.

[Xen-devel] [PATCH 0/4] pvusb fixes

2016-04-07 Thread Chunyan Liu
Patch series of pvusb fixes. Chunyan Liu (4): a fix in libxl_device_usbdev_list correct libxl_write_exactly sizeof cleanup redundant lstat in libxl_pvusb.c fix a pvusb type check tools/libxl/libxl_pvusb.c | 38 +- 1 file changed, 17 insertions(+), 21

[Xen-devel] [PATCH 3/4] cleanup redundant lstat in libxl_pvusb.c

2016-04-07 Thread Chunyan Liu
CID: 1358112 Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_pvusb.c | 21 + 1 file changed, 5 insertions(+

[Xen-devel] [PATCH 4/4] fix a pvusb type check

2016-04-07 Thread Chunyan Liu
Missing a check of controller type. Signed-off-by: Chunyan Liu <cy...@suse.com> CC: Simon Cao <caobosi...@gmail.com> CC: George Dunlap <george.dun...@citrix.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Juergen Gross <jgr...@suse.com> --- This affects

[Xen-devel] [PATCH V17 5/6] domcreate: support pvusb in configuration file

2016-03-08 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> Acked-by: Ian

[Xen-devel] [PATCH V17 6/6] xl: add pvusb commands

2016-03-08 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V17 0/6] xen pvusb toolstack work

2016-03-08 Thread Chunyan Liu
original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In

[Xen-devel] [PATCH V17 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-03-08 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- t

[Xen-devel] [PATCH V17 1/6] libxl: export some functions for pvusb use

2016-03-08 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V17 2/6] libxl_utils: add internal function to read sysfs file contents

2016-03-08 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V17 4/6] libxl: add pvusb API

2016-03-08 Thread Chunyan Liu
; Signed-off-by: Chunyan Liu <cy...@suse.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- tools/libxl/Makefile |3 +- tools/libxl/libxl.c | 18 + tools/libxl/libxl.h | 77 ++ tools/libxl/libxl_device.c

[Xen-devel] [RESEND][PATCH V16 4/6] libxl: add pvusb API

2016-03-07 Thread Chunyan Liu
; Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * Address George's comments tools/libxl/Makefile |3 +- tools/libxl/libxl.c | 18 + tools/libxl/libxl.h | 77 ++ tools/libxl/libxl_device.c |5 +- tools/libx

[Xen-devel] [RESEND][PATCH V16 5/6] domcreate: support pvusb in configuration file

2016-03-07 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> Acked-by: Ian

[Xen-devel] [RESEND][PATCH V16 2/6] libxl_utils: add internal function to read sysfs file contents

2016-03-07 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [RESEND][PATCH V16 0/6] xen pvusb toolstack work

2016-03-07 Thread Chunyan Liu
interfaces could be rebind to their original drivers, so there should some place to get the original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "&quo

[Xen-devel] [RESEND][PATCH V16 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-03-07 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl.c | 18 +-

[Xen-devel] [RESEND][PATCH V16 6/6] xl: add pvusb commands

2016-03-07 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [RESEND][PATCH V16 1/6] libxl: export some functions for pvusb use

2016-03-07 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V16 5/6] domcreate: support pvusb in configuration file

2016-03-03 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> Acked-by: Ian

[Xen-devel] [PATCH V16 6/6] xl: add pvusb commands

2016-03-03 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V16 4/6] libxl: add pvusb API

2016-03-03 Thread Chunyan Liu
; Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * Address George's comments tools/libxl/Makefile |3 +- tools/libxl/libxl.c | 18 + tools/libxl/libxl.h | 77 ++ tools/libxl/libxl_device.c |5 +- tools/libx

[Xen-devel] [PATCH V16 2/6] libxl_utils: add internal function to read sysfs file contents

2016-03-03 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V16 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-03-03 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl.c | 18 +-

[Xen-devel] [PATCH V16 0/6] xen pvusb toolstack work

2016-03-03 Thread Chunyan Liu
bxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In this example, USB device (busid is 3-11, /sys/bus/usb/devices/3-11).

[Xen-devel] [PATCH V16 1/6] libxl: export some functions for pvusb use

2016-03-03 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V16 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-03-03 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl.c | 18 +-

[Xen-devel] [PATCH V16 2/6] libxl_utils: add internal function to read sysfs file contents

2016-03-03 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V16 1/6] libxl: export some functions for pvusb use

2016-03-03 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V16 0/6] xen pvusb toolstack work

2016-03-03 Thread Chunyan Liu
bxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In this example, USB device (busid is 3-11, /sys/bus/usb/devices/3-11).

[Xen-devel] [PATCH V15 1/6] libxl: export some functions for pvusb use

2016-03-01 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V15 0/6] xen pvusb toolstack work

2016-03-01 Thread Chunyan Liu
for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In this example, USB device (busid is 3-11, /sys/bus/usb/devices/3-11). It has

[Xen-devel] [PATCH V15 4/6] libxl: add pvusb API

2016-03-01 Thread Chunyan Liu
; Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: reorder usbdev_remove to following three steps: 1. Unassign all interfaces from usbback, stopping and returning an error as soon as one attempt fails 2. Remove the pvusb xenstore nodes, stopping and returning an error

[Xen-devel] [PATCH V15 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-03-01 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl.c | 18 +-

[Xen-devel] [PATCH V15 5/6] domcreate: support pvusb in configuration file

2016-03-01 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> Acked-by: Ian

[Xen-devel] [PATCH V15 2/6] libxl_utils: add internal function to read sysfs file contents

2016-03-01 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V15 6/6] xl: add pvusb commands

2016-03-01 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V14 4/6] libxl: add pvusb API

2016-02-19 Thread Chunyan Liu
; Signed-off-by: Chunyan Liu <cy...@suse.com> --- changes: Address Olaf's comments: * move DEFINE_DEVICE_REMOVE changes to a separate patch Address Ian's comments: * adjust order of removing xenstore and bind/unbind driver in usb_remove. * reuse libxl_write_exactly in usbintf_bind/

[Xen-devel] [PATCH V14 6/6] xl: add pvusb commands

2016-02-19 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- changes

[Xen-devel] [PATCH V14 5/6] domcreate: support pvusb in configuration file

2016-02-19 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> Acked-by: Ian

[Xen-devel] [PATCH V14 0/6] xen pvusb toolstack work

2016-02-19 Thread Chunyan Liu
libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In this example, USB device (busid is 3-11, /sys/bus/usb/devices/3-11). It has interface

[Xen-devel] [PATCH V14 1/6] libxl: export some functions for pvusb use

2016-02-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V14 2/6] libxl_utils: add internal function to read sysfs file contents

2016-02-19 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V14 3/6] refactor DEFINE_DEVICE_REMOVE to fit for more device types

2016-02-19 Thread Chunyan Liu
, it requires user defined libxl__initiate_device_##type##_remove. Otherwise, just call DEFINE_DEVICE_REMOVE as before. Signed-off-by: George Dunlap <george.dun...@citrix.com> Signed-off-by: Chunyan Liu <cy...@suse.com> --- Address Olaf's suggestion: * split from "libxl: add

[Xen-devel] [PATCH V13 5/5] xl: add pvusb commands

2016-01-19 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- chan

[Xen-devel] [PATCH V13 3/5] libxl: add pvusb API

2016-01-19 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Signed-of

[Xen-devel] [PATCH V13 2/5] libxl_utils: add internal function to read sysfs file contents

2016-01-19 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_uti

[Xen-devel] [PATCH V13 0/5] xen pvusb toolstack work

2016-01-19 Thread Chunyan Liu
device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/driver

[Xen-devel] [PATCH V13 4/5] domcreate: support pvusb in configuration file

2016-01-19 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- Changes: *

[Xen-devel] [PATCH V13 1/5] libxl: export some functions for pvusb use

2016-01-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> Acked-by: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 fil

[Xen-devel] [PATCH V12 0/5] xen pvusb toolstack work

2015-12-22 Thread Chunyan Liu
original drivers, so there should some place to get the original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen&q

[Xen-devel] [PATCH V12 3/5] libxl: add pvusb API

2015-12-22 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Signed-of

[Xen-devel] [PATCH V12 1/5] libxl: export some functions for pvusb use

2015-12-22 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff -

[Xen-devel] [PATCH V12 4/5] xl: add pvusb commands

2015-12-22 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V12 5/5] domcreate: support pvusb in configuration file

2015-12-22 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- doc

[Xen-devel] [PATCH V12 2/5] libxl_utils: add internal function to read sysfs file contents

2015-12-22 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * remove unnecessary null pointer check after libxl__alloc and libxl__realloc tools/libxl/libxl_internal.

[Xen-devel] [PATCH V12 1/5] libxl: export some functions for pvusb use

2015-12-21 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff -

[Xen-devel] [PATCH V12 2/5] libxl_utils: add internal function to read sysfs file contents

2015-12-21 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * remove unnecessary null pointer check after libxl__alloc and libxl__realloc tools/libxl/libxl_internal.

[Xen-devel] [PATCH V12 5/5] domcreate: support pvusb in configuration file

2015-12-21 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- doc

[Xen-devel] [PATCH V12 4/5] xl: add pvusb commands

2015-12-21 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V12 0/5] xen pvusb toolstack work

2015-12-21 Thread Chunyan Liu
original drivers, so there should some place to get the original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen&q

[Xen-devel] [PATCH V12 3/5] libxl: add pvusb API

2015-12-21 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Signed-of

[Xen-devel] [PATCH V11 3/5] libxl: add pvusb API

2015-12-14 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Signed-of

[Xen-devel] [PATCH V11 2/5] libxl_utils: add internal function to read sysfs file contents

2015-12-14 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 77 2

[Xen-devel] [PATCH V11 5/5] domcreate: support pvusb in configuration file

2015-12-14 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> --- doc

[Xen-devel] [PATCH V11 1/5] libxl: export some functions for pvusb use

2015-12-14 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff -

[Xen-devel] [PATCH V11 4/5] xl: add pvusb commands

2015-12-14 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: George Dunlap <george.dun...@citrix.com> ---

[Xen-devel] [PATCH V11 0/5] xen pvusb toolstack work

2015-12-14 Thread Chunyan Liu
original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 =

[Xen-devel] [RFC PATCH] libxl: add screendump API

2015-11-30 Thread Chunyan Liu
Currently libvirt kvm can support domain screenshot but libxl cannot. This patch is trying to add screendump API in libxl by calling qmp 'screendump' command, so to support screenshot for domains. Signed-off-by: Chunyan Liu <cy...@suse.com> --- tools/libxl/libxl.c

[Xen-devel] [RESEND][PATCH V9 0/7] xen pvusb toolstack work

2015-11-25 Thread Chunyan Liu
for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "/sys/bus/usb/drivers/btusb" In this example, USB device (busid is 3-11, /sys/bus/usb/devices/3-11). It ha

[Xen-devel] [RESEND][PATCH V9 3/7] libxl: add pvusb API

2015-11-25 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com>

[Xen-devel] [RESEND][PATCH V9 4/7] libxl: add libxl_device_usbdev_assignable_list API

2015-11-25 Thread Chunyan Liu
Add API for listing assignable USB devices info. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- This could be squashed with previous patch. Split because there is some d

[Xen-devel] [RESEND][PATCH V9 5/7] xl: add pvusb commands

2015-11-25 Thread Chunyan Liu
usbctrl-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- Changes: - use libxl_usbdev/usbctrl_type_from_string instead of

[Xen-devel] [RESEND][PATCH V9 6/7] xl: add usbdev-assignable-list command

2015-11-25 Thread Chunyan Liu
Add xl usbdev-assignable-list command to list assignable USB devices. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Same as "libxl: add libxl_device_usbdev_assignable_list

[Xen-devel] [RESEND][PATCH V9 2/7] libxl_utils: add internal function to read sysfs file contents

2015-11-25 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: - write a separate function libxl__read_sysfs_file_contents, no longer mix with libxl_read_file_contents

[Xen-devel] [RESEND][PATCH V9 7/7] domcreate: support pvusb in configuration file

2015-11-25 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- changes: - update docs - update usb device naming docs/man/

[Xen-devel] [RESEND][PATCH V9 1/7] libxl: export some functions for pvusb use

2015-11-25 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- Changes: - fix indentation tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertio

[Xen-devel] [PATCH V9 6/7] xl: add usb-assignable-list command

2015-11-24 Thread Chunyan Liu
Add xl usb-assignable-list command to list assignable USB devices. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Same as "libxl: add libxl_device_usb_assignable_list API" pat

[Xen-devel] [PATCH V9 1/7] libxl: export some functions for pvusb use

2015-11-24 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- Changes: * fix indentation tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertio

[Xen-devel] [PATCH V9 5/7] xl: add pvusb commands

2015-11-24 Thread Chunyan Liu
-detach test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- Changes: - use libxl_usbdev/usbctrl_type_from_string instead of com

[Xen-devel] [PATCH V9 7/7] domcreate: support pvusb in configuration file

2015-11-24 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- changes: - doc update Not changed in this version: - naming 'usb

[Xen-devel] [PATCH V9 4/7] libxl: add libxl_device_usb_assignable_list API

2015-11-24 Thread Chunyan Liu
Add API for listing assignable USB devices info. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- This could be squashed with previous patch. Split because there is some d

[Xen-devel] [PATCH V9 3/7] libxl: add pvusb API

2015-11-24 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com>

[Xen-devel] [PATCH V9 0/7] xen pvusb toolstack work

2015-11-24 Thread Chunyan Liu
device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = "" 3-11@1_0 = "" driver_path = "

[Xen-devel] [PATCH V9 2/7] libxl_utils: add internal function to read sysfs file contents

2015-11-24 Thread Chunyan Liu
Add a new function libxl_read_sysfs_file_contents to handle sysfs file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: - write a separate function libxl__read_sysfs_file_contents, no longer mix with libxl_read_file_contents

[Xen-devel] [PATCH V8 2/7] libxl_read_file_contents: add new entry to read sysfs file

2015-10-21 Thread Chunyan Liu
file specially. It would be used in later pvusb work. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: - Update libxl_read_sysfs_file_contents to follow internal function definition rules, and adjust related implementation. tools/libxl/libxl_internal.h | 4 +++ tools

[Xen-devel] [PATCH V8 3/7] libxl: add pvusb API

2015-10-21 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controller and usb devices - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com>

[Xen-devel] [PATCH V8 5/7] xl: add pvusb commands

2015-10-21 Thread Chunyan Liu
test_vm dev_id will destroy the controller with specified dev_id. Dev_id can be traced in usb-list info. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- Changes: - change usb-attach parameter from hostbus.hostaddr to hostbus

[Xen-devel] [PATCH V8 7/7] domcreate: support pvusb in configuration file

2015-10-21 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- changes: - change parse_usb_config and parse_usbctrl_confi

[Xen-devel] [PATCH V8 6/7] xl: add usb-assignable-list command

2015-10-21 Thread Chunyan Liu
Add xl usb-assignable-list command to list assignable USB devices. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Same as "libxl: add libxl_device_usb_assignable_list API" pat

[Xen-devel] [PATCH V8 4/7] libxl: add libxl_device_usb_assignable_list API

2015-10-21 Thread Chunyan Liu
Add API for listing assignable USB devices info. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- This could be squashed with previous patch. Split because there is some d

[Xen-devel] [PATCH V8 1/7] libxl: export some functions for pvusb use

2015-10-21 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> Reviewed-by: Wei Liu <wei.l...@citrix.com> --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff -

[Xen-devel] [PATCH V8 0/7] xen pvusb toolstack work

2015-10-21 Thread Chunyan Liu
ace to get the original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-version = "qemu_xen" usbback = "" 3-11 = &quo

[Xen-devel] [PATCH V7 4/7] libxl: add libxl_device_usb_assignable_list API

2015-09-24 Thread Chunyan Liu
Add API for listing assignable USB devices info. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- This could be squashed with previous patch. Split because there is some d

[Xen-devel] [PATCH V7 7/7] domcreate: support pvusb in configuration file

2015-09-24 Thread Chunyan Liu
this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['2.1,controller=0,port=1', ] Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Simon Cao <caobosi...@gmail.com> --- docs/man/xl.cfg.pod.5| 75 +++ tools/libxl/libxl_crea

[Xen-devel] [PATCH V7 3/7] libxl: add pvusb API

2015-09-24 Thread Chunyan Liu
Add pvusb APIs, including: - attach/detach (create/destroy) virtual usb controller. - attach/detach usb device - list usb controllers and usb devices - get information of usb controller and usb device - some other helper functions Signed-off-by: Chunyan Liu <cy...@suse.com> Sign

[Xen-devel] [PATCH V7 0/7] xen pvusb toolstack work

2015-09-24 Thread Chunyan Liu
could be rebind to their original drivers, so there should some place to get the original driver info. To support that, when attaching a USB device to guest, we'll save the original driver info in xenstore too, the place is /libxl/usbback, for example: libxl = "" 1 = "" dm-ve

[Xen-devel] [PATCH V7 6/7] xl: add usb-assignable-list command

2015-09-24 Thread Chunyan Liu
Add xl usb-assignable-list command to list assignable USB devices. Assignable USB device means the USB device type is assignable and it's not assigned to any guest yet. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Same as "libxl: add libxl_device_usb_assignable_list API" pat

  1   2   >