[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 14 +++--- 1 file changed, 7 insert

[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 6 +++--- 1 file c

[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 6 +++--- 1 file changed, 3 insertions

[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools

[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c index 45117cf..02d3e55 100644

[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 CC: Simon Cao CC: George Dunlap CC: Ian Jackson CC: Juergen Gross --- This affects Juergen's qusb patch too. Fix that together. This patch could be applied on top of Juergen's qusb backend patch. tools/libxl/libxl_p

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

2016-03-08 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap Acked-by: Ian Jackson ---

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 37 + tools/libxl/xl.h | 5 ++ tools/libxl

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

2016-03-08 Thread Chunyan Liu
iginal 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 = "

[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 Signed-off-by: Chunyan Liu Reviewed-by: George Dunlap --- tools/libxl/libxl.c | 18 +- tools/libxl/libxl_device.c | 10

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

2016-03-08 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

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

2016-03-08 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: Simon Cao Signed-off-by: George Dunlap Signed-off-by: Chunyan Liu Reviewed-by: George Dunlap

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

2016-03-07 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap Acked-by: Ian Jackson ---

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

2016-03-07 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: Simon Cao Signed-off-by: George Dunlap Signed-off-by: Chunyan Liu --- Changes: * Address

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

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

2016-03-07 Thread Chunyan Liu
s and bind them to usbback. After detaching this USB device from guest, one would hope the USB 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

[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 Signed-off-by: Chunyan Liu --- tools/libxl/libxl.c | 18 +- tools/libxl/libxl_device.c | 10 +- tools/libxl

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 37 + tools/libxl/xl.h | 5 ++ tools/libxl

[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 Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

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

2016-03-03 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap Acked-by: Ian Jackson ---

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 37 + tools/libxl/xl.h | 5 ++ tools/libxl

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

2016-03-03 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: Simon Cao Signed-off-by: George Dunlap Signed-off-by: Chunyan Liu --- Changes: * Address

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

[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 Signed-off-by: Chunyan Liu --- tools/libxl/libxl.c | 18 +- tools/libxl/libxl_device.c | 10 +- tools/libxl

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

2016-03-03 Thread Chunyan Liu
evice 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/dri

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

2016-03-03 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

[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 Signed-off-by: Chunyan Liu --- tools/libxl/libxl.c | 18 +- tools/libxl/libxl_device.c | 10 +- tools/libxl

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

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

2016-03-03 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

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

2016-03-03 Thread Chunyan Liu
evice 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/dri

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

2016-03-01 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

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

2016-03-01 Thread Chunyan Liu
e'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/drivers/btusb&q

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

2016-03-01 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: Simon Cao Signed-off-by: George Dunlap Signed-off-by: Chunyan Liu --- Changes: reorder

[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 Signed-off-by: Chunyan Liu --- tools/libxl/libxl.c | 18 +- tools/libxl/libxl_device.c | 10 +- tools/libxl

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

2016-03-01 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap Acked-by: Ian Jackson ---

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 37 + tools/libxl/xl.h | 5 ++ tools/libxl

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

2016-02-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: Simon Cao Signed-off-by: George Dunlap Signed-off-by: Chunyan Liu --- changes: Address Olaf&#

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- changes: * update usbctrl-attach and usbdev-attach device_string description. docs/man

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

2016-02-19 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap Acked-by: Ian Jackson ---

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

2016-02-19 Thread Chunyan Liu
e 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/drivers/btusb" In t

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

2016-02-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

[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 Signed-off-by: Chunyan Liu --- Address Olaf's suggestion: * split from "libxl: add pvusb API" patch, since it is common refactor

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- changes: * update docs to reuse documentation in xl.cfg * remove backend patch information

[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 Signed-off-by: Simon Cao Signed-off-by: George Dunlap --- changes: * address error

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

2016-01-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index

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

2016-01-19 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- Changes: * adjust patch order of this patch and next patch

[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 Acked-by: Ian Jackson --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 74 2

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

2016-01-19 Thread Chunyan Liu
me 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" usbback = "" 3-11

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 41 tools/libxl/xl.h | 5 + tools/libxl

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

2015-12-22 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.cfg.pod.5| 84 ++

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

2015-12-22 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 00d9ec4..43d5709 100644

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

2015-12-22 Thread Chunyan Liu
B device from guest, one would hope the USB 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

[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 Signed-off-by: Simon Cao Signed-off-by: George Dunlap Reviewed-by: George Dunlap

[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 --- Changes: * remove unnecessary null pointer check after libxl__alloc and libxl__realloc tools/libxl/libxl_internal.h | 4 +++ tools/libxl

[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 --- Changes: * remove unnecessary null pointer check after libxl__alloc and libxl__realloc tools/libxl/libxl_internal.h | 4 +++ tools/libxl

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

2015-12-21 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.cfg.pod.5| 84 ++

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 41 tools/libxl/xl.h | 5 + tools/libxl

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

2015-12-21 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 00d9ec4..43d5709 100644

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

2015-12-21 Thread Chunyan Liu
B device from guest, one would hope the USB 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

[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 Signed-off-by: Simon Cao Signed-off-by: George Dunlap Reviewed-by: George Dunlap

[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 --- tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 77 2 files changed, 81

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

2015-12-14 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.cfg.pod.5| 84 ++

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

2015-12-14 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 712ea5a..e10242d 100644

[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 Signed-off-by: Simon Cao Reviewed-by: George Dunlap --- docs/man/xl.pod.1 | 41 tools/libxl/xl.h | 5 + tools/libxl

[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 Signed-off-by: Simon Cao Signed-off-by: George Dunlap --- changes: * format fix

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

2015-12-14 Thread Chunyan Liu
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-versio

[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 --- tools/libxl/libxl.c

[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 --- This could be squashed with previous patch. Split because there is some dispute on this. If this is accep

[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 Signed-off-by: Simon Cao --- Changes: - use libxl_usbdev/usbctrl_type_from_string instead of comparing oparg string mannually. - update docs

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

2015-11-25 Thread Chunyan Liu
e'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/drivers/btusb

[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 Signed-off-by: Simon Cao --- changes: - update naming, all places indicating usb

[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 --- Same as "libxl: add libxl_device_usbdev_assignable_list API" patch, this

[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 --- Changes: - write a separate function libxl__read_sysfs_file_contents, no longer mix with libxl_read_file_contents tools/libxl

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

2015-11-25 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao --- changes: - update docs - update usb device naming

[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 Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- Changes: - fix indentation tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c

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

2015-11-24 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao --- changes: - doc update Not changed in this version: - naming 'usbdev' or &#x

[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 --- This could be squashed with previous patch. Split because there is some dispute on this. If this is accep

[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 Signed-off-by: Simon Cao --- changes: - update DEFINE_DEVICE_REMOVE instead of

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

2015-11-24 Thread Chunyan Liu
e 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 =

[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 --- Changes: - write a separate function libxl__read_sysfs_file_contents, no longer mix with libxl_read_file_contents tools/libxl

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

2015-11-24 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- Changes: * fix indentation tools/libxl/libxl.c | 5 ++--- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c

[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 --- Same as "libxl: add libxl_device_usb_assignable_list API" patch, this

[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 Signed-off-by: Simon Cao --- Changes: - use libxl_usbdev/usbctrl_type_from_string instead of comparing oparg string mannually. - update docs as George

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

2015-10-21 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['hostbus=2, hostaddr=1, controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao --- changes: - change parse_usb_config and parse_usbctrl_config, following parse_n

[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 Signed-off-by: Simon Cao --- changes: - update COMPARE_USB to compare ctrl and

[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 Signed-off-by: Simon Cao --- Changes: - change usb-attach parameter from hostbus.hostaddr to hostbus=xx hostaddr= - since we get rid of

[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 --- Same as "libxl: add libxl_device_usb_assignable_list API" patch, this

[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 --- Changes: - Update libxl_read_sysfs_file_contents to follow internal function definition rules, and adjust related implementation. tools/libxl/libxl_internal.h | 4 +++ tools/libxl/libxl_utils.c| 61

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

2015-10-21 Thread Chunyan Liu
Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao Reviewed-by: Wei Liu --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 22bbc29..dacfaae 100644 --- a

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

2015-10-21 Thread Chunyan Liu
SB 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] [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 --- This could be squashed with previous patch. Split because there is some dispute on this. If this is accep

[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 --- Same as "libxl: add libxl_device_usb_assignable_list API" patch, this

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

2015-09-24 Thread Chunyan Liu
usb-ctrl-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 Signed-off-by: Simon Cao --- docs/man/xl.pod.1 | 40 tools/libxl/xl.h | 5 + tools/libxl/xl_cmdimpl.c | 232

[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 --- This could be squashed with previous patch. Split because there is some dispute on this. If this is accep

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

2015-09-24 Thread Chunyan Liu
like this: usbctrl=['version=2,ports=4', 'version=1, ports=4', ] usbdev=['2.1,controller=0,port=1', ] Signed-off-by: Chunyan Liu Signed-off-by: Simon Cao --- docs/man/xl.cfg.pod.5| 75 +++ tools/libxl/libxl_create.c | 73 ++

[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 Signed-off-by: Simon Cao

  1   2   >