[libvirt] [PATCH V2 3/7] libxl: support usb controller hotplug

2016-06-15 Thread Chunyan Liu
Support USB controller hot-plug and hot-unplug. #virsh attach-device dom usbctrl.xml #virsh detach-device dom usbctrl.xml usbctrl.xml example: Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 144 +++ 1 file change

[libvirt] [PATCH V2 4/7] libxl: check available controller and port when hotplugging USB device

2016-06-15 Thread Chunyan Liu
When hotplug a USB device, check if there is available controller and port, if not, automatically create a USB controller of version 2.0 and 8 ports. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 32 1 file changed, 32 inse

[libvirt] [PATCH V2 5/7] xenconfig: add conversion of usb controller config to and from xml

2016-06-15 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: drop pvusb1 and pvusb2 models src/xenconfig/xen_xl.c | 190 + 1 file changed, 190 insertions(+) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 5879c66..90213ec

[libvirt] [PATCH V2 6/7] xlconfigtest: add test for usb controller conversion

2016-06-15 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: drop pvusb items tests/xlconfigdata/test-usbctrl.cfg | 13 + tests/xlconfigdata/test-usbctrl.xml | 31 +++ tests/xlconfigtest.c| 1 + 3 files changed, 45 insertions(+) creat

[libvirt] [PATCH V2 2/7] libxl: support USB controllers in creation time

2016-06-15 Thread Chunyan Liu
To support USB Controller in xen guest domains, just add USB controller in domain config xml as following: Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: drop pvusb1 and pvusb2 models src/libxl/libxl_conf.c | 84 ++ src

[libvirt] [PATCH V2 1/7] extend usb controller model to support xen pvusb

2016-06-15 Thread Chunyan Liu
to support two more models: qusb1 (qusb, version 1.1) and 'qusb2' (qusb version 2.0). Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: drop pvusb1 and pvusb2 definition docs/formatdomain.html.in | 4 +++- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c| 2 ++ sr

[libvirt] [PATCH V2 0/7] libxl: add support of pvusb controller

2016-06-15 Thread Chunyan Liu
This patch series is to add pvusb controller support in libxl driver. It should be applied on previous pvusb device support patch series. --- Changes: * drop pvusb1 and pvusb2 model * add check in qemu device post-parse to report error of unsupported 'qusb1' and 'qusb2' model Chunyan Liu

[libvirt] [PATCH V2 7/7] qemuDomainDeviceDefPostParse: add USB controller model check

2016-06-15 Thread Chunyan Liu
To sync with virDomainControllerModelUSB, we add two models in qemuControllerModelUSB 'qusb1' and 'qusb2', but those models are not supported in qemu driver. So add check in device post parse to report errors if 'qusb1' and 'qusb2' are specified. Signed-off-by: Chunyan Liu <cy...@suse.

[libvirt] [PATCH 1/6] extend usb controller model to support xen pvusb

2016-06-12 Thread Chunyan Liu
(pvusb, version 2.0), qusb1 (qusb, version 1.1) and 'qusb2' (qusb version 2.0). Signed-off-by: Chunyan Liu <cy...@suse.com> --- docs/formatdomain.html.in | 6 +- docs/schemas/domaincommon.rng | 4 src/conf/domain_conf.c| 4 src/conf/domain_conf.h| 4 sr

[libvirt] [PATCH 3/6] libxl: support usb controller hotplug

2016-06-12 Thread Chunyan Liu
Support USB controller hot-plug and hot-unplug. #virsh attach-device dom usbctrl.xml #virsh detach-device dom usbctrl.xml usbctrl.xml example: Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 144 +++ 1 file change

[libvirt] [PATCH 5/6] xenconfig: add conversion of usb controller config to and from xml

2016-06-12 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/xenconfig/xen_xl.c | 203 + 1 file changed, 203 insertions(+) diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index c11cd1b..36d352c 100644 --- a/src/xenconfig/xen_xl.c +++

[libvirt] [PATCH 0/6] libxl: add support of pvusb controller

2016-06-12 Thread Chunyan Liu
This patch series is to add pvusb controller support in libxl driver. It should be applied on previous pvusb device support patch series. Chunyan Liu (6): extend usb controller model to support xen pvusb libxl: support USB controllers in creation time libxl: support usb controller hotplug

[libvirt] [PATCH 6/6] xlconfigtest: add test for usb controller conversion

2016-06-12 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- tests/xlconfigdata/test-usbctrl.cfg | 13 + tests/xlconfigdata/test-usbctrl.xml | 32 tests/xlconfigtest.c| 1 + 3 files changed, 46 insertions(+) create mode 100644 tests/xlconf

[libvirt] [PATCH 4/6] libxl: check available controller and port when hotplugging USB device

2016-06-12 Thread Chunyan Liu
When hotplug a USB device, check if there is available controller and port, if not, automatically create a USB controller of version 2.0 and 8 ports. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 32 1 file changed, 32 inse

[libvirt] [PATCH 2/6] libxl: support USB controllers in creation time

2016-06-12 Thread Chunyan Liu
To support USB Controller in xen guest domains, just add USB controller in domain config xml as following: Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_conf.c | 94 ++ src/libxl/libxl_conf.h | 4 +++ 2 files chang

[libvirt] [PATCH V2 2/4] libxl: support hotplug USB host device

2016-05-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * add LIBXL_HAVE_PVUSB check * fix Jim's comments src/libxl/libxl_driver.c | 136 ++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src

[libvirt] [PATCH V2 3/4] Add convertion domxml USB config to/from xl.cfg

2016-05-19 Thread Chunyan Liu
xl.cfg: usbdev = [ "hostbus=1,hostaddr=3" ] usb.xml: Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/xenconfig/xen_xl.c | 151 + 1 file changed, 151 insertions(+) diff --git a/src/xenconfig/xen_xl.c

[libvirt] [PATCH V2 0/4] libxl: support pvusb

2016-05-19 Thread Chunyan Liu
This patch series is to support pvusb in libxl driver. --- Changes in v2: * add LIBXL_HAVE_PVUSB check * add convertion of domxml USB config to/from xl.cfg * address other comments Chunyan Liu (4): libxl: support creating guest with USB hostdev libxl: support hotplug USB host device

[libvirt] [PATCH V2 4/4] xlconfigtest: add test on USB convertion

2016-05-19 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- tests/xlconfigdata/test-usb.cfg | 13 + tests/xlconfigdata/test-usb.xml | 35 +++ tests/xlconfigtest.c| 1 + 3 files changed, 49 insertions(+) create mode 100644 tests/xlconfigdat

[libvirt] [PATCH V2 1/4] libxl: support creating guest with USB hostdev

2016-05-19 Thread Chunyan Liu
Support creating guest with USB host device in config file. Currently libxl only supports xen PV guest, and only supports specifying USB host device by 'bus number' and 'device number', for example: Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes:

[libvirt] [PATCH V2 1/3] extract XEN_CONFIG_FORMAT_XM/XL to xen_common.h

2016-05-17 Thread Chunyan Liu
Unify XEN_CONFIG_FORMAT_x and LIBXL_CONFIG_FORMAT_x to XEN_CONFIG_FORMAT_x, and move to xen_common.h. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 14 +- src/xen/xen_driver.h | 3 --- src/xenconfig/xen_common.h | 4 3 files chan

[libvirt] [PATCH V2 3/3] xlconfigtest: add test case for type=vif in xl format

2016-05-17 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- tests/xlconfigdata/test-vif-typename.cfg | 25 ++ tests/xlconfigdata/test-vif-typename.xml | 45 tests/xlconfigtest.c | 1 + 3 files changed, 71 insertions(+) create mode

[libvirt] [PATCH V2 0/3] correct libxl config file convert

2016-05-17 Thread Chunyan Liu
Correct libxl config file type=vif handling. --- Changes in v2: * update xen{Parse,Format}ConfigCommon parameter vif_typename to nativeFomat. To reuse XEN_CONFIG_FORMAT_{XM,XL}, first extract XEN_CONFIG_FORMAT_{XM,XL} to xen_common.h Chunyan Liu (3): extract XEN_CONFIG_FORMAT_XM/XL

[libvirt] [PATCH V2 2/3] xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl

2016-05-17 Thread Chunyan Liu
`type'. Correct the convertion in libvirt, so that it matchs libxl codes and also xl.cfg. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/xenconfig/xen_common.c | 43 --- src/xenconfig/xen_common.h | 6 -- src/xenconfig/xen_xl.c | 4 ++-

[libvirt] [PATCH] libxl: add .domainInterfaceAddresses

2016-05-13 Thread Chunyan Liu
Add .domainInterfaceAddresses so that user can have a way to get domain interface address by 'virsh domifaddr'. Currently it only supports '--source lease'. Signed-off: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 140 +++ 1 file c

[libvirt] [PATCH 2/2] xlconfigtest: add test case for type=vif in xl format

2016-04-21 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- tests/xlconfigdata/test-vif-typename.cfg | 25 +++ tests/xlconfigdata/test-vif-typename.xml | 42 tests/xlconfigtest.c | 1 + 3 files changed, 68 insertions(+) create mode

[libvirt] [PATCH 1/2] xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl

2016-04-21 Thread Chunyan Liu
`type'. Correct the convertion in libvirt, so that it matchs libxl codes and also xl.cfg. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/xenconfig/xen_common.c | 38 -- src/xenconfig/xen_common.h | 7 --- src/xenconfig/xen_xl.c | 4 ++-

[libvirt] [PATCH 0/2] correct libxl config file convert

2016-04-21 Thread Chunyan Liu
Correct libxl config file type=vif handling. Chunyan Liu (2): xenFormatNet: correct `type=netfront' to 'type=vif' to match libxl xlconfigtest: add test case for type=vif in xl format src/xenconfig/xen_common.c | 38 ++--- src/xenconfig/xen_common.h

[libvirt] [PATCH 1/2] libxl: support creating guest with USB hostdev

2016-04-21 Thread Chunyan Liu
Support creating guest with USB host device in config file. Currently libxl only supports xen PV guest, and only supports specifying USB host device by 'bus number' and 'device number'. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_conf.c

[libvirt] [PATCH 0/2] libxl: support pvusb

2016-04-21 Thread Chunyan Liu
This patch series is to support pvusb in libxl driver. Chunyan Liu (2): libxl: support creating guest with USB hostdev libxl: support hotplug USB host device src/libxl/libxl_conf.c | 71 + src/libxl/libxl_conf.h | 3 ++ src/libxl/libxl_domain.c | 4 +- src

[libvirt] [PATCH 2/2] libxl: support hotplug USB host device

2016-04-21 Thread Chunyan Liu
Support hot attach/detach a USB host device to guest. Curretnly libxl only supports xen PV guest, and only supports specifying USB host device by 'bus number' and 'device number'. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c

[libvirt] [PATCH] libxl config file convertion: correct `type=netfront' to 'type=vif'

2016-04-08 Thread Chunyan Liu
`type'. Correct the convertion in libvirt, so that it matchs libxl codes and also xl.cfg. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Since type=netfront config has been used for a very long time, at lease for xm/xend, it has no problem. I'm not sure if we need to split into xenParseXL

[libvirt] [PATCH V5] libxl: support creating domain with VF assignment from a pool

2016-04-07 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. Signed-off-by: Chunyan Liu <cy...@suse.com> Signed-off-by: Jim Fehlig <jfeh...@suse.com> --- Rebase and send a new version. src/libxl/libxl_d

[libvirt] [PATCH V4 0/6] libxl: support assign VF to guest from SRIOV pool

2016-03-21 Thread Chunyan Liu
This patch series is to support assign VF to guest from SRIOV pool, including fixes to network attach/detach and fix to libxlDomainstart. Chunyan Liu (6): libxlDomainAttachNetDevice: release actual deivce and remove hostdev when fail libxlDomainDetachNetDevice: cleanup codes

[libvirt] [PATCH V4 2/6] libxlDomainDetachNetDevice: cleanup codes

2016-03-21 Thread Chunyan Liu
Adjust codes to make it cleaner. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 05ebe29..74ebea4 100644 --- a/src/libxl/libxl_dr

[libvirt] [PATCH V4 4/6] libxl: support creating domain with VF assignment from a pool

2016-03-21 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_domain.c | 50 tests/Makefile.am| 3 +++ 2 files changed, 53 insertions(+)

[libvirt] [PATCH V4 6/6] libxlDomainStart: correct cleanup after failure

2016-03-21 Thread Chunyan Liu
libxlDomainCleanup will call virDomainLockProcessPause, so we move virDomainLockProcessStart/Resume to earlier stage. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_domain.c | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff

[libvirt] [PATCH V4 5/6] libxl: fix hot add/remove VF from a pool

2016-03-21 Thread Chunyan Liu
For those VF allocated from a network pool, we need to set its backend to be VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN so that later work can be correct. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-)

[libvirt] [PATCH V4 1/6] libxlDomainAttachNetDevice: release actual deivce and remove hostdev when fail

2016-03-21 Thread Chunyan Liu
When AttachNetDevice failed, should call networkReleaseActualDevice to release actual device, and if actual device is hostdev, should remove the hostdev from vm->def->hostdevs. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 18 +++--- 1 file

[libvirt] [PATCH V4 3/6] libxlDomainDetachDeviceLive: handle hostdev parent is network device

2016-03-21 Thread Chunyan Liu
When hostdev parent is network device, should call libxlDomainDetachNetDevice to detach the device from a higher level. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_driver.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src

[libvirt] [PATCH V3 0/2] libxl: support assignment VF to guest from a pool of SRIOV VFs

2016-03-09 Thread Chunyan Liu
This patch series is to support assigning VF to guest from a pool of SRIOV VFs in libxl driver, detailed usage can be referred to: http://wiki.libvirt.org/page/Networking#Assignment_from_a_pool_of_SRIOV_VFs_in_a_libvirt_.3Cnetwork.3E_definition Chunyan Liu (2): libxl_conf: reuse

[libvirt] [PATCH V3 2/2] libxl: support assignment from a pool of SRIOV VFs

2016-03-09 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. And fix hot plug and unplug SRIOV VF under this kind of network defition. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * move a common change in libxl_conf.c into separate patch src

[libvirt] [PATCH V3 1/2] libxl_conf: reuse virDomainNetGetActualtype in libxlMakeNicList

2016-03-09 Thread Chunyan Liu
Reuse existing helper function virDomainNetGetActualtype. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 93c943b..2b77c59 100644 --- a/src

[libvirt] [PATCH V2] libxl: support assignment from a pool of SRIOV VFs

2016-02-23 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. And fix hot plug and unplug SRIOV VF under this kind of network defition. Signed-off-by: Chunyan Liu <cy...@suse.com> --- Changes: * move bug fix to another patch * use virDomainNetGetActualType i

[libvirt] [PATCH] libxl: small fix in parsing network

2016-02-23 Thread Chunyan Liu
Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_conf.c | 2 +- src/libxl/libxl_domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 5133299..48b8826 100644 --- a/src/libxl/libxl_conf.c +++

[libvirt] [PATCH] libxl: support assignment from a pool of SRIOV VFs

2016-01-25 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. And fix hot plug and unplug SRIOV VF under this kind of network defition. Signed-off-by: Chunyan Liu <cy...@suse.com> --- src/libxl/libxl_conf.c | 5 +++-- src/libxl/libxl_domain.

[libvirt] [PATCH] libxl: fix AttachDeviceConfig on hostdev type

2015-09-16 Thread Chunyan Liu
After attach-device a with --config, new device doesn't show up in dumpxml and in guest. To fix that, set dev->data.hostdev = NULL after work so that the pointer is not freed, since vmdef has the pointer and still need it. Signed-off-by: Chunyan Liu <cy...@suse.com> ---

[libvirt] [PATCH] libxl: fix AttachDeviceConfig on hostdev type

2015-09-16 Thread Chunyan Liu
After attach-device a with --config, new device doesn't show up in dumpxml and in guest. To fix that, set dev->data.hostdev = NULL after work so that the pointer is not freed, since vmdef has the pointer and still need it. Signed-off-by: Chunyan Liu <cy...@suse.com> ---

[libvirt] [PATCH] fix vol-create when target allocation=0

2015-08-23 Thread Chunyan Liu
of this, installing xen pv guest with virt-manager fails. Reason is: posix_fallocate(int fd, off_t offset, off_t len) will return EINVAL when len is equal to 0. So, this patch adds a check before calling safezero(). Signed-off-by: Chunyan Liu cy...@suse.com --- src/storage/storage_backend.c | 2 +- 1 file

[libvirt] [PATCH V4 0/5] support sending sysrq key

2015-01-11 Thread Chunyan Liu
guests, it just sends the key blindly to guests. See: http://www.redhat.com/archives/libvir-list/2015-January/msg00132.html V3 is here: http://www.redhat.com/archives/libvir-list/2014-December/msg00882.html Chunyan Liu (5): Add public API virDomainSendSysrq implement remote protocol

[libvirt] [PATCH V4 1/5] Add public API virDomainSendSysrq

2015-01-11 Thread Chunyan Liu
Add public API virDomainSendSysrq for sending SysRequest key. Signed-off-by: Chunyan Liu cy...@suse.com --- include/libvirt/libvirt-domain.h | 3 +++ src/driver-hypervisor.h | 4 src/libvirt-domain.c | 39 +++ src

[libvirt] [PATCH V4 5/5] xen: add .domainSendSysrq method

2015-01-11 Thread Chunyan Liu
Support sending sysrq key to guest. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xen/xen_driver.c| 21 + src/xen/xend_internal.c | 30 ++ src/xen/xend_internal.h | 1 + 3 files changed, 52 insertions(+) diff --git a/src/xen/xen_driver.c

[libvirt] [PATCH V4 4/5] libxl: implement .domainSendSysrq method

2015-01-11 Thread Chunyan Liu
Support .domainSendSysrq in libxl driver. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 4135670..5ae565e 100644 --- a/src/libxl

[libvirt] [PATCH V4 3/5] virsh: add 'sysrq' command

2015-01-11 Thread Chunyan Liu
All domainSendSysrq related API should be manageable from the virsh command line. So, expose 'virsh sysrq' command. Signed-off-by: Chunyan Liu cy...@suse.com --- Changes: * adjust code to follow general format and fix a memory leak tools/virsh-domain.c | 57

[libvirt] [PATCH V4 2/5] implement remote protocol for domainSendSysrq

2015-01-11 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 14 +- src/remote_protocol-structs | 6 ++ src/rpc/gendispatch.pl | 12 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/remote

[libvirt] [PATCH V2 2/2] Add tests to xmconfigtest

2014-12-22 Thread Chunyan Liu
Add tests to testing HVM default features (pae, acpi, apic) conversion from xm config to libvirt xml. If no pae|acpi|apic specified in xm config, after conversion, libvirt xml should by default include: features pae/ apic/ acpi/ /features Signed-off-by: Chunyan Liu cy...@suse.com

[libvirt] [PATCH V2 0/2] fix xen HVM pae|apic|acpi features parser

2014-12-22 Thread Chunyan Liu
value to 1 to match xm config convension. Add tests data to test it. --- Changes to v1: * update xmconfigtest Chunyan Liu (2): xenconfig: set HVM pae/apic/acpi/ default to 1 Add tests to xmconfigtest src/xenconfig/xen_common.c | 6 +-- .../xmconfigdata/test

[libvirt] [PATCH V2 1/2] xenconfig: set HVM pae/apic/acpi/ default to 1

2014-12-22 Thread Chunyan Liu
value to 1 to match xm config convension. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xenconfig/xen_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 25bdf26..221509a 100644 --- a/src/xenconfig

[libvirt] [PATCH 0/2] fix xen HVM pae|apic|acpi features parser

2014-12-18 Thread Chunyan Liu
value to 1 to match xm config convension. Add tests data to test it. Chunyan Liu (2): xenconfig: set HVM pae/apic/acpi/ default to 1 Add tests to xmconfigtest src/xenconfig/xen_common.c | 6 +-- .../xmconfigdata/test-fullvirt-default-feature.cfg | 23

[libvirt] [PATCH 2/2] Add tests to xmconfigtest

2014-12-18 Thread Chunyan Liu
Add tests to testing HVM default features (pae, acpi, apic) conversion from xm config to libvirt xml and from libvirt xml to xm config. Signed-off-by: Chunyan Liu cy...@suse.com --- .../xmconfigdata/test-fullvirt-default-feature.cfg | 23 +++ .../test-fullvirt-default-feature.cfg.out

[libvirt] [PATCH 1/2] xenconfig: set HVM pae/apic/acpi/ default to 1

2014-12-18 Thread Chunyan Liu
value to 1 to match xm config convension. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xenconfig/xen_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 25bdf26..221509a 100644 --- a/src/xenconfig

[libvirt] [PATCH V3 1/5] Add public API virDomainSendSysrq

2014-12-17 Thread Chunyan Liu
Add public API virDomainSendSysrq for sending SysRequest key. Signed-off-by: Chunyan Liu cy...@suse.com --- changes: * add 'flags' to the new API * change parameter from 'const char *key' to 'char key' * change version number from 1.2.11 to 1.2.12 include/libvirt/libvirt-domain.h | 3

[libvirt] [PATCH V3 5/5] xen: add .domainSendSysrq method

2014-12-17 Thread Chunyan Liu
Support sending sysrq key to guest. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xen/xen_driver.c| 21 + src/xen/xend_internal.c | 26 ++ src/xen/xend_internal.h | 1 + 3 files changed, 48 insertions(+) diff --git a/src/xen/xen_driver.c b

[libvirt] [PATCH V3 2/5] implement remote protocol for domainSendSysrq

2014-12-17 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- Changes: * change args 'key' from 'remote_nonnull_string' to 'char' * add code to gendispatch.pl to handle 'char|unsigned char' type * update remote_protocol-strcuts src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 14

[libvirt] [PATCH V3 4/5] libxl: implement .domainSendSysrq method

2014-12-17 Thread Chunyan Liu
Support .domainSendSysrq in libxl driver. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 53c87ce..7c96bab 100644 --- a/src/libxl

[libvirt] [PATCH V3 0/5] support sending sysrq key

2014-12-17 Thread Chunyan Liu
. Changes to V2: * change parameter from 'const char *key' to 'char key'. * add 'flags' parameter to virDomainSendSysrq API. * update codes to fit for above changes. V2 is here: http://www.mail-archive.com/libvir-list@redhat.com/msg106106.html Chunyan Liu (5): Add public API

[libvirt] [PATCH V3 3/5] virsh: add 'sysrq' command

2014-12-17 Thread Chunyan Liu
All domainSendSysrq related API should be manageable from the virsh command line. So, expose 'virsh sysrq' command. Signed-off-by: Chunyan Liu cy...@suse.com --- tools/virsh-domain.c | 54 1 file changed, 54 insertions(+) diff --git a/tools

[libvirt] [PATCH V2 1/5] Add public API virDomainSendSysrq

2014-12-12 Thread Chunyan Liu
Add public API virDomainSendSysrq for sending SysRequest key. Signed-off-by: Chunyan Liu cy...@suse.com --- include/libvirt/libvirt-domain.h | 3 +++ src/driver-hypervisor.h | 4 src/libvirt-domain.c | 38 ++ src/libvirt_public.syms

[libvirt] [PATCH V2 3/5] virsh: add 'sysrq' command

2014-12-12 Thread Chunyan Liu
All domainSendSysrq related API should be manageable from the virsh command line. So, expose 'virsh sysrq' command. Signed-off-by: Chunyan Liu cy...@suse.com --- tools/virsh-domain.c | 54 1 file changed, 54 insertions(+) diff --git a/tools

[libvirt] [PATCH V2 5/5] xen: add .domainSendSysrq method

2014-12-12 Thread Chunyan Liu
Support .domainSendSysrq in xen driver. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xen/xen_driver.c| 19 +++ src/xen/xend_internal.c | 20 src/xen/xend_internal.h | 2 ++ 3 files changed, 41 insertions(+) diff --git a/src/xen/xen_driver.c b/src

[libvirt] [PATCH V2 2/5] implement remote protocol for domainSendSysrq

2014-12-12 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/remote/remote_driver.c | 2 +- src/remote/remote_protocol.x | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 999f16d..97ea64b 100644 --- a/src

[libvirt] [PATCH V2 4/5] libxl: implement .domainSendSysrq method

2014-12-12 Thread Chunyan Liu
Support .domainSendSysrq in libxl driver. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 53c87ce..0830d68 100644 --- a/src/libxl

[libvirt] [PATCH V2 0/5] support sending sysrq key

2014-12-12 Thread Chunyan Liu
. Changes: * add new API virDomainSendSysrq instead of hacking virDomainSendKey. * add related changes according to new API, including libvirt API, remote protocol, virsh and libxl/xen driver. v1 is here: https://www.redhat.com/archives/libvir-list/2014-December/msg00480.html Chunyan Liu

[libvirt] [PATCH 3/3] libxl: add .domainSendKey

2014-12-08 Thread Chunyan Liu
libxl supports sysrq. Add .domainSendKey function to support sending sysrq key. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 89 1 file changed, 89 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl

[libvirt] [PATCH 0/3] support sysrq in xen/libxl driver

2014-12-08 Thread Chunyan Liu
xm/xend and libxl already support sending sysrq key. Adding the equivalant to libvirt. Chunyan Liu (3): virkeycode: add virKeynameFromKeycode function xen: add .domainSendKey libxl: add .domainSendKey src/libvirt_private.syms | 1 + src/libxl/libxl_driver.c | 89

[libvirt] [PATCH 2/3] xen: add .domainSendKey

2014-12-08 Thread Chunyan Liu
xm/xend supports sysrq command. Add .domainSendKey function to support sending sysrq key. Signed-off-by: Chunyan Liu cy...@suse.com --- src/xen/xen_driver.c| 85 + src/xen/xend_internal.c | 21 src/xen/xend_internal.h | 1 + 3

[libvirt] [PATCH 1/3] virkeycode: add virKeynameFromKeycode function

2014-12-08 Thread Chunyan Liu
Add virKeynameFromKeycode for later xen/libxl sendkey usage. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms | 1 + src/util/virkeycode.c| 17 + src/util/virkeycode.h| 1 + 3 files changed, 19 insertions(+) diff --git a/src/libvirt_private.syms b

[libvirt] [PATCH V2] libxl: support hvm direct kernel boot

2014-09-16 Thread Chunyan Liu
of libxl_domain_build_info, so that libxl can handle. This patch is just to do this. Signed-off-by: Chunyan Liu cy...@suse.com --- Changes: - fix Jim's comments src/libxl/libxl_conf.c | 18 +++ src/xenconfig/xen_common.c | 57 ++ 2 files changed, 60

[libvirt] [PATCH] libxl: support hvm direct kernel boot

2014-09-14 Thread Chunyan Liu
of libxl_domain_build_info, so that libxl can handle. This patch is just to do this. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 18 src/xenconfig/xen_common.c | 51 +- 2 files changed, 55 insertions(+), 14 deletions(-) diff

[libvirt] [PATCH V2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-03 Thread Chunyan Liu
srwxr-xr-x 1 qemu qemu 0 21. Jul 14:19 /tmp/somefile.sock Other users in the same group (like real user, test engines, etc) cannot write to this socket. Signed-off-by: Chunyan Liu cy...@suse.com --- Changes: * set umask(002) to the whole qemu process instead of calling umask in qemu

[libvirt] [PATCH 0/2] fix: unix sockets created for virtio-serail has insufficient permissions

2014-09-02 Thread Chunyan Liu
and a libvirt patch: qemu patch: adds a new 'umask' option to -chardev, so that user can change the umask. libvirt patch: pass 'umask=0x002' paramter to qemu command line for virtio-serial device Chunyan Liu (2): qemu side: add 'umask' option to chardev libvirt side: qemu: add umask(002

[libvirt] [PATCH 2/2] qemu: add umask(002) to virtio-serial chardev commandline

2014-09-02 Thread Chunyan Liu
side, there is another patch to handle the 'umask' option to overwrite default umask(022). With these changes, unix socket created for virtio-serial device can have expected permissions. Signed-off-by: Chunyan Liu cy...@suse.com --- This is patch for libvirt. src/qemu/qemu_command.c | 12

[libvirt] [PATCH 1/2] add 'umask' option to -chardev

2014-09-02 Thread Chunyan Liu
), then create unix sockets with expected permissions. Signed-off-by: Chunyan Liu cy...@suse.com --- This is patch for qemu. qemu-char.c | 3 +++ qemu-options.hx | 9 +++-- util/qemu-sockets.c | 12 +++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b

[libvirt] [PATCH] cmdMigrate: move vshConnect before vshWatchJob

2014-08-08 Thread Chunyan Liu
time, in cmdMigrate main process, poll() is listening to stdin, that probably affect poll() to get pipe_fd event. Better to move authentication before vshWatchJob. With this change, above problem does not exist. Signed-off-by: Chunyan Liu cy...@suse.com --- tools/virsh-domain.c | 26

[libvirt] [PATCH] blockcopy: check dst = identical device

2014-07-29 Thread Chunyan Liu
with block device whose source path is /dev/sdaX, after blockcopy, shutdown VM and then create VM from xml again, the VM cannot be started.) This case should not be allowed. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src

[libvirt] [PATCH V3 2/2] add nocow test case

2014-07-15 Thread Chunyan Liu
Add file in storagevolxml2xmlin and storagevolxml2xmlout, let storagevolxml2xmltest and storagevolschematest cover 'nocow'. Add test case to storagevolxml2argvtest to cover 'nocow'. Signed-off-by: Chunyan Liu cy...@suse.com --- .../storagevolxml2argvdata/qcow2-nocow-compat.argv | 3 ++ tests

[libvirt] [PATCH V3 0/2] storagevol: add 'nocow' option to vol xml

2014-07-15 Thread Chunyan Liu
is here: http://www.redhat.com/archives/libvir-list/2014-July/msg00361.html Chunyan Liu (2): storagevol: add nocow to vol xml add nocow test case docs/formatstorage.html.in | 7 + docs/schemas/storagevol.rng| 5 src/conf/storage_conf.c

[libvirt] [PATCH V3 1/2] storagevol: add nocow to vol xml

2014-07-15 Thread Chunyan Liu
-by: Chunyan Liu cy...@suse.com --- Changes: * fix typo docs/formatstorage.html.in| 7 +++ docs/schemas/storagevol.rng | 5 + src/conf/storage_conf.c | 3 +++ src/storage/storage_backend.c | 22 ++ src/util/virstoragefile.h | 1 + 5 files changed, 38

[libvirt] [PATCH 0/3] libxl: support hotplug of interface device

2014-07-14 Thread Chunyan Liu
This patch series is to add support for attach/detaching an interface device. At the same time, add two fixes (1/3 and 3/3) Chunyan Liu (3): libxl: add HOSTDEV type in libxlDomainDetachDeviceConfig libxl: support hotplug of interface libxl: fix return value error Attach|DetachDeviceFlags

[libvirt] [PATCH 1/3] libxl: add HOSTDEV type in libxlDomainDetachDeviceConfig

2014-07-14 Thread Chunyan Liu
Missing HOSTDEV type in libxlDomainDetachDeviceConfig. Add it. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index b27581e

[libvirt] [PATCH 2/3] libxl: support hotplug of interface

2014-07-14 Thread Chunyan Liu
Add code to support attach/detaching a network device. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_domain.c | 12 +++- src/libxl/libxl_driver.c | 146 --- 2 files changed, 149 insertions(+), 9 deletions(-) diff --git a/src/libxl

[libvirt] [PATCH 3/3] libxl: fix return value error Attach|DetachDeviceFlags

2014-07-14 Thread Chunyan Liu
, the error would be reported but the function would return success. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index

[libvirt] [PATCH V2] storagevol: add nocow to vol xml

2014-07-08 Thread Chunyan Liu
-by: Chunyan Liu cy...@suse.com --- Changes: - now qemu-img can handle 'nocow=on' option, just pass 'nocow=on' to qemu-img for non-raw file images. No need to handle all file type in libvirt code. Pervious version is here: http://www.redhat.com/archives/libvir-list/2013-December/msg01257.html

[libvirt] [PATCH 1/2] libxl: support syntax interface type=hostdev

2014-05-08 Thread Chunyan Liu
Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 298c8a1..b7fed7f 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c

[libvirt] [PATCH 2/2] update documentation of interface type='hostdev'

2014-05-08 Thread Chunyan Liu
interface type='hostdev' managed='yes' is supported, but nowhere mentions 'managed' in interface type='hostdev' syntax. Update documentation to cover it. Signed-off-by: Chunyan Liu cy...@suse.com --- docs/formatdomain.html.in | 14 +- 1 file changed, 13 insertions(+), 1 deletion

[libvirt] [PATCH] libxl_driver.c: cleanup code

2014-03-18 Thread Chunyan Liu
Following Jim's comments about add pci passthrough to libxl patch: https://www.redhat.com/archives/libvir-list/2014-March/msg00170.html Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_driver.c | 47 +++ 1 file changed, 19 insertions

[libvirt] [PATCH] virhostdev.h: remove ATTRIBUTE_NONNULL to oldStateDir

2014-03-18 Thread Chunyan Liu
For libxl driver usage, it didn't support hostdev passthrough before, oldStateDir is NULL when calling virHostdevReAttachDomainHostdevs. That is allowed. Remove ATTRIBUTE_NONNULL setting to oldStateDir. Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virhostdev.h | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH v14 42/49] rename some function names to keep consistency

2014-03-12 Thread Chunyan Liu
2014-03-12 23:12 GMT+08:00 Daniel P. Berrange berra...@redhat.com: On Fri, Mar 07, 2014 at 06:53:09PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/libvirt_private.syms | 8 src/qemu/qemu_hostdev.c | 16 +++ src/util/virhostdev.c

Re: [libvirt] [PATCH v14 45/49] add parameter checks to common interfaces

2014-03-12 Thread Chunyan Liu
2014-03-12 23:11 GMT+08:00 Daniel P. Berrange berra...@redhat.com: On Fri, Mar 07, 2014 at 06:53:12PM +0800, Chunyan Liu wrote: Check NULL parameter inputs Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virhostdev.c | 57

[libvirt] [PATCH v14 03/49] update qemuPrepareHostUSBDevices parameters to keep consistency

2014-03-07 Thread Chunyan Liu
Update parameters from vm-def to specific name, hostdevs, nhostdevs to keep consistentcy with PreparePCIDevices and PrepareSCSIDevices. And, at the same time, make it reusable in later patch. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 11 ++- 1 file changed

  1   2   3   >