[libvirt] [PATCH] qemu: error out if PCI passthrough type is not supported

2014-07-28 Thread Hu Tao
type 'default' Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7f9357c..12d6354 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c

[libvirt] [PATCH] doc: add domain to address of hostdev pci

2014-07-18 Thread Hu Tao
libvirt supports pci domain already, so update the documentation. Otherwise users who lookup the documentation for how to use hostdev may miss the domain and encounter error when pass-through a pci device in a domain other than 0. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs

Re: [libvirt] [PATCH v3 3/4] qemu: add support for -device pvpanic

2013-12-12 Thread Hu Tao
On Thu, Dec 12, 2013 at 09:20:43PM -0700, Eric Blake wrote: On 12/09/2013 02:11 AM, Hu Tao wrote: Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_command.c

[libvirt] [PATCH v3 0/4] add support for panic device

2013-12-09 Thread Hu Tao
schemas for new elements - add tests for panic device - error out if panic device is requested but qemu is too old Hu Tao (4): conf: introduce generic ISA address conf: add support for panic device qemu: add support for -device pvpanic test: add test for panic device docs

[libvirt] [PATCH v3 4/4] test: add test for panic device

2013-12-09 Thread Hu Tao
--- tests/qemuxml2argvdata/qemuxml2argv-panic.args | 6 + tests/qemuxml2argvdata/qemuxml2argv-panic.xml | 31 ++ tests/qemuxml2argvtest.c | 3 +++ tests/qemuxml2xmltest.c| 2 ++ 4 files changed, 42 insertions(+) create

[libvirt] [PATCH v3 3/4] qemu: add support for -device pvpanic

2013-12-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_command.c | 16 tests/qemucapabilitiesdata/caps_1.5.3-1.caps | 1 + tests

[libvirt] [PATCH v3 1/4] conf: introduce generic ISA address

2013-12-09 Thread Hu Tao
--- docs/formatdomain.html.in | 5 docs/schemas/basictypes.rng | 17 docs/schemas/domaincommon.rng | 6 + src/conf/domain_conf.c| 63 ++- src/conf/domain_conf.h| 9 +++ 5 files changed, 99 insertions(+), 1

[libvirt] [PATCH v3 2/4] conf: add support for panic device

2013-12-09 Thread Hu Tao
panic device is a device that enables libvirt to receive notification of guest panic event. --- docs/formatdomain.html.in | 28 + docs/schemas/domaincommon.rng | 10 ++ src/conf/domain_conf.c| 72 +++ src/conf/domain_conf.h

Re: [libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-05 Thread Hu Tao
On Thu, Dec 05, 2013 at 10:07:40AM +, Daniel P. Berrange wrote: On Thu, Dec 05, 2013 at 10:41:13AM +0800, Hu Tao wrote: On Wed, Dec 04, 2013 at 03:53:17PM +, Daniel P. Berrange wrote: On Wed, Dec 04, 2013 at 08:46:53AM -0700, Eric Blake wrote: On 12/04/2013 08:42 AM, Daniel P

Re: [libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-04 Thread Hu Tao
On Wed, Dec 04, 2013 at 03:53:17PM +, Daniel P. Berrange wrote: On Wed, Dec 04, 2013 at 08:46:53AM -0700, Eric Blake wrote: On 12/04/2013 08:42 AM, Daniel P. Berrange wrote: Dan, do you have any thoughts on the best representation to use? Or is Hu's original proposal of:

Re: [libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-03 Thread Hu Tao
On Mon, Dec 02, 2013 at 02:34:44PM -0700, Eric Blake wrote: On 12/01/2013 11:11 PM, Hu Tao wrote: This patch adds a new xml element devices/pvpanic to support qemu device pvpanic. It can be used to receive guest panic notification. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs

Re: [libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-02 Thread Hu Tao
On Mon, Dec 02, 2013 at 11:13:33AM +0100, Peter Krempa wrote: On 12/02/13 07:11, Hu Tao wrote: This patch adds a new xml element devices/pvpanic to support qemu device pvpanic. It can be used to receive guest panic notification. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs

Re: [libvirt] [PATCH v2 2/2] qemu: add support for -device pvpanic

2013-12-02 Thread Hu Tao
On Mon, Dec 02, 2013 at 11:15:17AM +0100, Peter Krempa wrote: On 12/02/13 07:11, Hu Tao wrote: This patch will add -device pvpanic to qemu command line if user enables pvpanic in domain xml and the qemu version supports pvpanic. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src

Re: [libvirt] [PATCH v2 2/2] qemu: add support for -device pvpanic

2013-12-02 Thread Hu Tao
On Mon, Dec 02, 2013 at 02:38:09PM -0700, Eric Blake wrote: On 12/01/2013 11:11 PM, Hu Tao wrote: This patch will add -device pvpanic to qemu command line if user enables pvpanic in domain xml and the qemu version supports pvpanic. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src

Re: [libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-02 Thread Hu Tao
On Mon, Dec 02, 2013 at 02:34:44PM -0700, Eric Blake wrote: On 12/01/2013 11:11 PM, Hu Tao wrote: This patch adds a new xml element devices/pvpanic to support qemu device pvpanic. It can be used to receive guest panic notification. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs

[libvirt] [PATCH v2 2/2] qemu: add support for -device pvpanic

2013-12-01 Thread Hu Tao
This patch will add -device pvpanic to qemu command line if user enables pvpanic in domain xml and the qemu version supports pvpanic. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 2 ++ src/qemu/qemu_command.c | 10

[libvirt] [PATCH v2 1/2] conf: add xml element devices/pvpanic

2013-12-01 Thread Hu Tao
This patch adds a new xml element devices/pvpanic to support qemu device pvpanic. It can be used to receive guest panic notification. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- docs/formatdomain.html.in | 25 + src/conf/domain_conf.c| 68

Re: [libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-28 Thread Hu Tao
On Wed, Nov 27, 2013 at 11:39:49AM +0100, Peter Krempa wrote: On 11/27/13 09:41, Hu Tao wrote: qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command line. Signed-off-by: Hu Tao hu

Re: [libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-28 Thread Hu Tao
On Wed, Nov 27, 2013 at 06:15:27AM -0700, Eric Blake wrote: On 11/27/2013 03:39 AM, Peter Krempa wrote: On 11/27/13 09:41, Hu Tao wrote: qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command

[libvirt] [PATCH] qemu: add support for -device pvpanic

2013-11-27 Thread Hu Tao
qemu removes the builtin pvpanic device for all qemu versions since 1.7, in order to support on_crash, '-device pvpanic' has to be added to qemu command line. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_capabilities.h | 2 ++ src/qemu

Re: [libvirt] pvpanic plans?

2013-10-23 Thread Hu Tao
Hi All, I know it's been a long time since this thread. But qemu 1.7 is releasing, do you have any consensus on this? Thanks. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v7 6/6] qemu: Implement oncrash 'rename-resart' event when guest panicked

2013-06-18 Thread Hu Tao
On Fri, Jun 14, 2013 at 06:14:40PM +0800, Chen Fan wrote: Implements 'rename-restart' behavior of the 'on_crash' in the XML when domain crashed. --- src/qemu/qemu_driver.c | 67 ++ 1 file changed, 67 insertions(+) diff --git

Re: [libvirt] [RFC PATCH 8/8] qemu: Set cpuset.mems even if the numatune mode is not strict

2013-05-13 Thread Hu Tao
On Thu, May 09, 2013 at 06:22:17PM +0800, Osier Yang wrote: When the numatune memory mode is not strict, the cpuset.mems inherits the parent's setting, which causes problem like: % virsh dumpxml rhel6_local | grep interleave -2 vcpu placement='static'2/vcpu numatune memory

[libvirt] [PATCH] build: fix build error of src/libvirt.c

2013-05-02 Thread Hu Tao
of 'virFileAbsPath' [-Werror=nested-externs] Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/libvirt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt.c b/src/libvirt.c index 15b37a3..467f6dd 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -63,6 +63,7 @@ #include viruri.h

Re: [libvirt] [PATCH] build: fix build error of src/libvirt.c

2013-05-02 Thread Hu Tao
On Thu, May 02, 2013 at 10:08:11PM -0600, Eric Blake wrote: On 05/02/2013 09:44 PM, Hu Tao wrote: Following build error caused by commit 7c9a2d88: libvirt.c: In function 'virConnectGetConfigFilePath': libvirt.c:956:9: error: implicit declaration of function 'virGetUserConfigDirectory

Re: [libvirt] [PATCH v2.5 03/10] conf: Introduce scsi hostdev

2013-04-17 Thread Hu Tao
On Mon, Apr 15, 2013 at 08:27:10PM +0800, Han Cheng wrote: Thanks for your best efforts. I only have one problem. Please find it at the end. 于 2013/4/10 16:59, Osier Yang 写道: On 09/04/13 10:32, Han Cheng wrote: Add scsi hostdev, it looks like: hostdev mode='subsystem' type='scsi'

Re: [libvirt] [PATCH v2 05/10] utils: util functions for scsi hostdev

2013-04-02 Thread Hu Tao
On Mon, Apr 01, 2013 at 08:00:57PM +0800, Han Cheng wrote: This patch add util functions for scsi hostdev. Signed-off-by: Han Cheng hanc.f...@cn.fujitsu.com --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt_private.syms | 22 +++ src/util/virscsi.c

Re: [libvirt] [PATCH v2 01/10] conf: Introduce readonly to hostdev and change helper function

2013-04-01 Thread Hu Tao
On Mon, Apr 01, 2013 at 08:00:53PM +0800, Han Cheng wrote: The only parameter in -drive affect scsi-generic is readonly. Introduce readonly/ to hostdev. The helper function to look up disk controller model may be used by scsi hostdev. But it should be changed to use info. Signed-off-by: Han

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev

2013-04-01 Thread Hu Tao
On Mon, Apr 01, 2013 at 08:00:55PM +0800, Han Cheng wrote: Adding scsi hostdev, it should like: hostdev mode='subsystem' type='scsi' source adapter name='scsi_host0'/ address bus='0' target='0' unit='0'/ /source address type='drive' controller='0'

Re: [libvirt] [PATCH] net: use newer iptables syntax

2013-03-25 Thread Hu Tao
On Mon, Mar 25, 2013 at 08:39:40PM +0100, Stefan Seyfried wrote: Hi all, iptables-1.4.18 removed the long deprecated state match. Use conntrack instead in forwarding rules. Fixes openSUSE bug https://bugzilla.novell.com/811251 #811251. real patch is attached as I'm pretty sure that

Re: [libvirt] [PATCH] Remove the redundant parentheses in migrate help

2013-03-25 Thread Hu Tao
On Tue, Mar 26, 2013 at 11:02:17AM +0800, Yanbing Du wrote: Signed-off-by: Yanbing Du y...@redhat.com --- tools/virsh-domain.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 128e516..592a6e8 100644 ---

Re: [libvirt] failed to mount cgroup

2013-03-05 Thread Hu Tao
On Tue, Mar 05, 2013 at 05:29:02PM +0800, Gao feng wrote: On 2013/03/05 14:43, Yin Olivia-R63875 wrote: Hi, I tried to run libvirt-1.0.2 with LXC as below, but it failed to mount cgroup. You should change your cgroup configuration as below cgroup on /sys/fs/cgroup/cpuset type

Re: [libvirt] [PATCH v2 RESEND 0/2] cgroup refactor

2013-02-19 Thread Hu Tao
ping... On Fri, Feb 08, 2013 at 10:16:25AM +0800, Hu Tao wrote: This series is for early review. This series refactors cgroup code to: - provide lazy creation of cgroup directories, despite of what level they are. - remove cgroup directories if no one is using the corresponding

Re: [libvirt] [PATCH v2 2/5] cgroup: refactor virCgroup

2013-02-07 Thread Hu Tao
On Thu, Feb 07, 2013 at 03:33:46PM +, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 03:40:58PM +0800, Hu Tao wrote: This patch adds a new structure, virCgroupItem, to represent a cgroup directory(named cgroup item). cgroup directory is created when needed and removed if no one

[libvirt] [PATCH v2 RESEND 0/2] cgroup refactor

2013-02-07 Thread Hu Tao
patches 2-5 in v2 into one. Hu Tao (2): refactor virCgroupDetectMounts and virCgroupDetectPlacement cgroup: refactor virCgroup src/conf/domain_conf.h|5 + src/libvirt_private.syms |7 +- src/lxc/lxc_cgroup.c | 40 +- src/lxc/lxc_cgroup.h |2 +- src/lxc

[libvirt] [PATCH v2 RESEND 1/2] refactor virCgroupDetectMounts and virCgroupDetectPlacement

2013-02-07 Thread Hu Tao
--- src/util/vircgroup.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 48cba93..71d46c5 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -113,7 +113,7 @@ bool virCgroupMounted(virCgroupPtr

[libvirt] [PATCH] fix build erro when building with --without-libvirtd

2013-02-04 Thread Hu Tao
--- src/driver.h | 4 --- src/libvirt.c | 70 +- src/libvirt_internal.h | 2 -- 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/src/driver.h b/src/driver.h index 02ddd83..dab7495 100644 --- a/src/driver.h +++

Re: [libvirt] [PATCH] fix build erro when building with --without-libvirtd

2013-02-04 Thread Hu Tao
On Mon, Feb 04, 2013 at 11:43:59AM +, Daniel P. Berrange wrote: On Mon, Feb 04, 2013 at 04:23:30PM +0800, Hu Tao wrote: --- src/driver.h | 4 --- src/libvirt.c | 70 +- src/libvirt_internal.h | 2 -- 3 files

Re: [libvirt] [PATCH] fix build erro when building with --without-libvirtd

2013-02-04 Thread Hu Tao
On Mon, Feb 04, 2013 at 12:25:48PM +0100, Martin Kletzander wrote: On 02/04/2013 09:23 AM, Hu Tao wrote: --- src/driver.h | 4 --- src/libvirt.c | 70 +- src/libvirt_internal.h | 2 -- 3 files changed, 69

[libvirt] [PATCH] libvirtd: Don't check WITH_LIBVIRTD in C source files

2013-02-04 Thread Hu Tao
Don't check WITH_LIBVIRTD in C source files because we will build the sources even without libvirtd. --- src/driver.h | 4 src/libvirt.c | 7 --- src/libvirt_internal.h | 2 -- src/remote/remote_driver.c | 6 -- src/xen/xen_driver.c | 6 +- 5

Re: [libvirt] [PATCH] libvirtd: Don't check WITH_LIBVIRTD in C source files

2013-02-04 Thread Hu Tao
On Mon, Feb 04, 2013 at 10:08:42PM -0600, Doug Goldstein wrote: On Mon, Feb 4, 2013 at 8:20 PM, Hu Tao hu...@cn.fujitsu.com wrote: Don't check WITH_LIBVIRTD in C source files because we will build the sources even without libvirtd. --- src/driver.h | 4 src/libvirt.c

Re: [libvirt] [PATCH] libvirtd: Don't check WITH_LIBVIRTD in C source files

2013-02-04 Thread Hu Tao
Please add one more line to commit msg: On Tue, Feb 05, 2013 at 10:20:37AM +0800, Hu Tao wrote: Don't check WITH_LIBVIRTD in C source files because we will build the sources even without libvirtd. This patch also fix the build failure when buliding with --without-libvirtd. --- src

Re: [libvirt] [PATCH] build: Add libcurl dependency to libvirt_driver.la

2013-02-03 Thread Hu Tao
link with libcurl just because user wants it. How about not exposing --with-curl but define WITH_CURL when needs to(xenapi or esx driver is enabled, or both)? -- Regards, Hu Tao -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 0/5] cgroup refactor

2013-02-03 Thread Hu Tao
. Patch 3, 4, 5 should have been squashed into one in order to build, but harder to review. Hu Tao (5): refactor virCgroupDetectMounts and virCgroupDetectPlacement cgroup: refactor virCgroup cgroup: replace old cgroup qemu: replace old cgroup lxc: replace old cgroup src/conf/domain_conf.h

[libvirt] [PATCH v2 5/5] lxc: replace old cgroup

2013-02-03 Thread Hu Tao
--- src/lxc/lxc_cgroup.c | 40 +++ src/lxc/lxc_cgroup.h | 2 +- src/lxc/lxc_controller.c | 31 - src/lxc/lxc_driver.c | 177 +-- src/lxc/lxc_process.c| 19 +++-- 5 files changed, 111 insertions(+), 158 deletions(-)

[libvirt] [PATCH v2 3/5] cgroup: replace old cgroup

2013-02-03 Thread Hu Tao
--- src/libvirt_private.syms | 9 +- src/util/vircgroup.c | 812 +++ src/util/vircgroup.h | 25 +- 3 files changed, 112 insertions(+), 734 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index f5138af..78e387d

[libvirt] [PATCH v2 1/5] refactor virCgroupDetectMounts and virCgroupDetectPlacement

2013-02-03 Thread Hu Tao
This patch prepares for the next one. --- src/util/vircgroup.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 48cba93..71d46c5 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -113,7 +113,7 @@

[libvirt] [PATCH v2 2/5] cgroup: refactor virCgroup

2013-02-03 Thread Hu Tao
This patch adds a new structure, virCgroupItem, to represent a cgroup directory(named cgroup item). cgroup directory is created when needed and removed if no one is using it. --- src/libvirt_private.syms | 2 + src/util/vircgroup.c | 541 ++-

Re: [libvirt] [RFC PATCH v1 1/7] call virstateCleanup to do the cleanup before libvirtd exits

2013-01-23 Thread Hu Tao
On Thu, Jan 17, 2013 at 05:28:28PM +, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 10:53:03AM +0800, Hu Tao wrote: --- daemon/libvirtd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 9cdf4d9..7cb99b1 100644 --- a/daemon

Re: [libvirt] [RFC PATCH v1 6/7] deploy the newly introduced virCgroupItem.

2013-01-16 Thread Hu Tao
On Wed, Jan 16, 2013 at 10:10:50AM +, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 10:53:08AM +0800, Hu Tao wrote: diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 7cb99b1..92e3292 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1442,6 +1442,9 @@ int main(int

[libvirt] [RFC PATCH v1 7/7] tests for virCgroup.

2013-01-15 Thread Hu Tao
--- tests/Makefile.am | 5 +++ tests/vircgrouptest.c | 103 ++ 2 files changed, 108 insertions(+) create mode 100644 tests/vircgrouptest.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 61b0a0c..b2ccdc1 100644 ---

[libvirt] [RFC PATCH v1 5/7] cgroup: refactor virCgroup

2013-01-15 Thread Hu Tao
This patch adds a new structure, virCgroupItem, to represent a cgroup directory(named cgroup item). cgroup directory is created when needed and removed if no one is using it. --- src/libvirt_private.syms | 7 + src/util/vircgroup.c | 411 ++-

[libvirt] [RFC PATCH v1 2/7] include util.h in cgroup.h

2013-01-15 Thread Hu Tao
required by VIR_ENUM_DECL. --- src/util/vircgroup.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 8b6d3b2..05f2e54 100644 --- a/src/util/vircgroup.h +++ b/src/util/vircgroup.h @@ -25,6 +25,8 @@ #ifndef __VIR_CGROUP_H__ # define

[libvirt] [RFC PATCH v1 4/7] refactor virCgroupDetectMounts and virCgroupDetectPlacement

2013-01-15 Thread Hu Tao
--- src/util/vircgroup.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 48cba93..71d46c5 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -113,7 +113,7 @@ bool virCgroupMounted(virCgroupPtr

[libvirt] [RFC PATCH v1 0/7] virCgroup refactor

2013-01-15 Thread Hu Tao
and maintains their lifetime. Please focus on patch #5, which brings the main change(virCgroupItem), and qemu part in patch #6, which shows the usage of virCgroupItem(I've not tested lxc part yet). Hu Tao (7): call virstateCleanup to do the cleanup before libvirtd exits include util.h

[libvirt] [RFC PATCH v1 1/7] call virstateCleanup to do the cleanup before libvirtd exits

2013-01-15 Thread Hu Tao
--- daemon/libvirtd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 9cdf4d9..7cb99b1 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1500,5 +1500,7 @@ cleanup: daemonConfigFree(config); +virStateCleanup(); + return

[libvirt] [RFC PATCH v1 3/7] include virterror_internal.h in threads.h

2013-01-15 Thread Hu Tao
required by virSetError. --- src/util/virthread.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virthread.h b/src/util/virthread.h index b11a251..c209440 100644 --- a/src/util/virthread.h +++ b/src/util/virthread.h @@ -23,6 +23,7 @@ # define __THREADS_H_ # include internal.h +#

Re: [libvirt] [PATCH v1 rebase 1/6] cgroup: Add a flag VIR_CGROUP_DISABLE_CPUSET

2012-12-13 Thread Hu Tao
On Thu, Dec 13, 2012 at 05:10:47PM +0800, Osier Yang wrote: On 2012年12月13日 15:01, Hu Tao wrote: Add a flag VIR_CGROUP_DISABLE_CPUSET to disable cgroup cpuset. This flag inhibits making of directory under cpuset. --- src/util/cgroup.c | 7 +++ 1 file changed, 7 insertions(+) diff

Re: [libvirt] [PATCH v1 0/6] disable cgroup cpuset

2012-12-12 Thread Hu Tao
ping... On Wed, Nov 07, 2012 at 06:38:40PM +0800, Hu Tao wrote: The reason to disable cgroup cpuset by default is: currently, sub-directories of cgroup cpuset won't be auto-updated if cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus online, the value of /sys/fs/cgroup/cpuset

Re: [libvirt] [PATCH v1 0/6] disable cgroup cpuset

2012-12-12 Thread Hu Tao
On Thu, Dec 13, 2012 at 12:21:29PM +0800, Osier Yang wrote: On 2012年11月07日 18:38, Hu Tao wrote: The reason to disable cgroup cpuset by default is: currently, sub-directories of cgroup cpuset won't be auto-updated if cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus online

[libvirt] [PATCH v1 rebase 0/6] disable cgroup cpuset

2012-12-12 Thread Hu Tao
/qemu/mydom/cpuset.cpus is 0-3,5-7, then pcpu 4 is hot-plugged, but the value of cpuset.cpus is still 0-3,5-7. This will cause a problem that we can't pin to a hot-plugged pcpu. Users can still enable cpuset by editing qemu.conf. Hu Tao (6): cgroup: Add a flag VIR_CGROUP_DISABLE_CPUSET create

[libvirt] [PATCH v1 rebase 1/6] cgroup: Add a flag VIR_CGROUP_DISABLE_CPUSET

2012-12-12 Thread Hu Tao
Add a flag VIR_CGROUP_DISABLE_CPUSET to disable cgroup cpuset. This flag inhibits making of directory under cpuset. --- src/util/cgroup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index f867fb7..e955a22 100644 --- a/src/util/cgroup.c +++

[libvirt] [PATCH v1 rebase 5/6] create cgroup controllers for emulator according to config

2012-12-12 Thread Hu Tao
Add a parameter to virCgroupForEmulator to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/qemu/qemu_cgroup.c | 2 +- src/qemu/qemu_driver.c | 9 ++--- src/util/cgroup.c | 12 +--- src/util/cgroup.h | 3 ++- 4

[libvirt] [PATCH v1 rebase 2/6] create cgroup controllers for driver according to config

2012-12-12 Thread Hu Tao
Add a parameter to virCgroupForDriver to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_driver.c | 2 +- src/qemu/qemu_driver.c | 13 +++-- src/util/cgroup.c | 12 +---

[libvirt] [PATCH v1 rebase 4/6] create cgroup controllers for vcpu according to config

2012-12-12 Thread Hu Tao
Add a parameter to virCgroupForVcpu to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/qemu/qemu_cgroup.c | 3 ++- src/qemu/qemu_driver.c | 18 -- src/util/cgroup.c | 9 +++-- src/util/cgroup.h | 3 ++- 4

[libvirt] [PATCH v1 rebase 6/6] disable cgroup cpuset by default

2012-12-12 Thread Hu Tao
The reason ti disable cgroup cpuset by default is: currently, sub-directories of cgroup cpuset won't be auto-updated if cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus online, the value of /sys/fs/cgroup/cpuset/libvirt/qemu/mydom/cpuset.cpus is 0-3,5-7, then pcpu 4 is hot-plugged,

[libvirt] [PATCH v1 rebase 3/6] create cgroup controllers for domain according to config

2012-12-12 Thread Hu Tao
Add a parameter to virCgroupForDomain to indicate which cgroup controllers to create for domain. The value of the parameter is read from user config. --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_driver.c | 20 +- src/lxc/lxc_process.c | 4 ++--

Re: [libvirt] [PATCH v3] bitmap: fix typo to use UL type of integer constant in virBitmapIsAllSet

2012-11-28 Thread Hu Tao
OK to me. -- Hu Tao -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2] build: more fix to avoid C99 for loop (Re: [PATCH] build: more fix to avoid C99 for loop (Re: [PATCH] build: avoid C99 for loop))

2012-11-28 Thread Hu Tao
On Wed, Nov 28, 2012 at 10:41:34AM +0100, Martin Kletzander wrote: On 11/28/2012 04:37 AM, Hu Tao wrote: On Mon, Nov 26, 2012 at 03:25:04PM -0700, Eric Blake wrote: Although we require various C99 features, we don't yet require a complete C99 compiler. On RHEL 5, compilation complained

Re: [libvirt] [PATCH 3/3] Add support for shutdown / reboot APIs in LXC driver

2012-11-28 Thread Hu Tao
... +static int +lxcDomainReboot(virDomainPtr dom, +unsigned int flags) +{ +virLXCDriverPtr driver = dom-conn-privateData; +virLXCDomainObjPrivatePtr priv; +virDomainObjPtr vm; +char *vroot = NULL; +int ret = -1; +int rc; + +

Re: [libvirt] [PATCH v2] bitmap: fix typo to use UL type of integer constant in virBitmapIsAllSet

2012-11-27 Thread Hu Tao
On Mon, Nov 26, 2012 at 01:36:00PM +0800, Guannan Ren wrote: This bug leads to get incorrect vcpupin information via qemudDomainGetVcpuPinInfo() API when the number of maximum cpu on a host falls into a range such as 31 ncpus 64. gcc warning: left shift count = width of type The

[libvirt] [PATCH] build: more fix to avoid C99 for loop (Re: [PATCH] build: avoid C99 for loop)

2012-11-27 Thread Hu Tao
9f5f9112108c5ab42e56c1e4e9db185d7dfb6cf4 Mon Sep 17 00:00:00 2001 From: Hu Tao hu...@cn.fujitsu.com Date: Wed, 28 Nov 2012 11:31:26 +0800 Subject: [PATCH] build: more fix to avoid C99 for loop see commit 7e5aa78d0f7f4cbf1c8 * src/interface/interface_backend_udev.c: Declare variable sooner. --- src

Re: [libvirt] [PATCH v1 0/6] disable cgroup cpuset

2012-11-21 Thread Hu Tao
ping... On Wed, Nov 07, 2012 at 06:38:40PM +0800, Hu Tao wrote: The reason to disable cgroup cpuset by default is: currently, sub-directories of cgroup cpuset won't be auto-updated if cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus online, the value of /sys/fs/cgroup/cpuset

Re: [libvirt] [PATCH] run bootstrap if .gnulib is not present

2012-11-21 Thread Hu Tao
ping... On Fri, Nov 09, 2012 at 04:47:04PM +0800, Hu Tao wrote: If .gnulib is deleted unexpectedly, autogen.sh will fail with message: fatal: ambiguous argument '.gnulib': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git command

Re: [libvirt] [PATCH] run bootstrap if .gnulib is not present

2012-11-21 Thread Hu Tao
On Wed, Nov 21, 2012 at 07:08:54AM -0700, Eric Blake wrote: On 11/09/2012 01:47 AM, Hu Tao wrote: If .gnulib is deleted unexpectedly, autogen.sh will fail with message: fatal: ambiguous argument '.gnulib': unknown revision or path not in the working tree. Use '--' to separate paths

[libvirt] [PATCH] run bootstrap if .gnulib is not present

2012-11-09 Thread Hu Tao
If .gnulib is deleted unexpectedly, autogen.sh will fail with message: fatal: ambiguous argument '.gnulib': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git command [revision...] -- [file...]' which is actually given by git diff

[libvirt] [PATCH v1 1/6] cgroup: Add a flag VIR_CGROUP_DISABLE_CPUSET

2012-11-07 Thread Hu Tao
Add a flag VIR_CGROUP_DISABLE_CPUSET to disable cgroup cpuset. This flag inhibits making of directory under cpuset. --- src/util/cgroup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index 3f7b5f7..2f64f5d 100644 --- a/src/util/cgroup.c +++

[libvirt] [PATCH v1 0/6] disable cgroup cpuset

2012-11-07 Thread Hu Tao
, but the value of cpuset.cpus is still 0-3,5-7. This will cause a problem that we can't pin to a hot-plugged pcpu. Users can still enable cpuset by editing qemu.conf. Hu Tao (6): cgroup: Add a flag VIR_CGROUP_DISABLE_CPUSET create cgroup controllers for driver according to config create

[libvirt] [PATCH v1 2/6] create cgroup controllers for driver according to config

2012-11-07 Thread Hu Tao
Add a parameter to virCgroupForDriver to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_driver.c | 2 +- src/qemu/qemu_driver.c | 12 ++-- src/util/cgroup.c | 12 +---

[libvirt] [PATCH v1 3/6] create cgroup controllers for domain according to config

2012-11-07 Thread Hu Tao
Add a parameter to virCgroupForDomain to indicate which cgroup controllers to create for domain. The value of the parameter is read from user config. --- src/lxc/lxc_cgroup.c | 2 +- src/lxc/lxc_driver.c | 20 +- src/lxc/lxc_process.c | 4 ++--

[libvirt] [PATCH v1 6/6] disable cgroup cpuset by default

2012-11-07 Thread Hu Tao
The reason to disable cgroup cpuset by default is: currently, sub-directories of cgroup cpuset won't be auto-updated if cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus online, the value of /sys/fs/cgroup/cpuset/libvirt/qemu/mydom/cpuset.cpus is 0-3,5-7, then pcpu 4 is hot-plugged,

[libvirt] [PATCH v1 4/6] create cgroup controllers for vcpu according to config

2012-11-07 Thread Hu Tao
Add a parameter to virCgroupForVcpu to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/qemu/qemu_cgroup.c | 3 ++- src/qemu/qemu_driver.c | 18 -- src/util/cgroup.c | 9 +++-- src/util/cgroup.h | 3 ++- 4

[libvirt] [PATCH v1 5/6] create cgroup controllers for emulator according to config

2012-11-07 Thread Hu Tao
Add a parameter to virCgroupForEmulator to indicate which cgroup controllers to create. The value of the parameter is read from user config. --- src/qemu/qemu_cgroup.c | 2 +- src/qemu/qemu_driver.c | 9 ++--- src/util/cgroup.c | 12 +--- src/util/cgroup.h | 3 ++- 4

Re: [libvirt] [PATCHv2 3/3] virsh: Use virNodeGetCPUMap if possible

2012-10-31 Thread Hu Tao
, NULL, 0)) 0) { +/* fall back to nodeinfo */ +if (virNodeGetInfo(conn, nodeinfo) == 0) { +ret = VIR_NODEINFO_MAXCPUS(nodeinfo); +} Isn't VIR_NODEINFO_MAXCPUS buggy? Either don't fall back to nodeinfo or fix it. -- Thanks, Hu Tao -- libvir-list mailing

[libvirt] [PATCH] [DRAFT] handle qemu event GUEST_PANICKED

2012-10-25 Thread Hu Tao
This is for early review, comments are welcome! qemu is adding a method to detect guest panic, and a new event GUEST_PANICKED[1]. This patch adds support for GUEST_PANICKED. But I have two questions: - to react to GUEST_PANICKED, can xml element on_crash be used as the action to take,

[libvirt] [RFC][PATCH] change the meaning of vnc port in xml

2012-10-16 Thread Hu Tao
Now the vnc port in xml file reflects the REAL port hypervisor will listen on for vnc connection. But vnc ports usually start from 5900, it's common to say 0 for 5900, 1 for 5901, and so on. This patch forbids negative vnc port number in xml, and maps port number below 5900 to 5900+port, but no

Re: [libvirt] [PATCH] RFC: Clarify the relationship between vcpu, vcpupin, and emulatorpin

2012-10-15 Thread Hu Tao
dtcodeshares/code/dt dd -- 1.7.7.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list -- Thanks, Hu Tao -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v4 9/9] remove virDomainCpuSetFormat and virDomainCpuSetParse

2012-09-17 Thread Hu Tao
On Mon, Sep 17, 2012 at 03:04:40PM -0400, Laine Stump wrote: On 09/14/2012 07:24 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 03:47:04PM +0800, Hu Tao wrote: virBitmap is recommanded to store cpuset info, and virBitmapFormat/virBitmapParse can do the format/parse jobs

Re: [libvirt] [PATCH v3 2/9] New functions for virBitmap

2012-09-14 Thread Hu Tao
On Thu, Sep 13, 2012 at 02:35:03PM +0100, Daniel P. Berrange wrote: On Thu, Sep 13, 2012 at 02:03:20PM +0800, Hu Tao wrote: In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert

[libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Hu Tao
memset before virResetError will cause memory leak. virResetError and virCopyError, which calls virResetError, will do memset properly, so we don't have to worry about it here. --- src/util/virterror.c |2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/virterror.c

[libvirt] [PATCH v4 1/9] bitmap: new member variable and function renaming

2012-09-14 Thread Hu Tao
Add a new member variable map_len to store map len of bitmap. and rename size to max_bit accordingly. rename virBitmapAlloc to virBitmapNew. --- src/conf/domain_conf.c |2 +- src/conf/snapshot_conf.c |2 +- src/libvirt_private.syms |2 +- src/qemu/qemu_capabilities.c |

[libvirt] [PATCH v4 0/9] improve virBitmap

2012-09-14 Thread Hu Tao
- virBitmapEqual - virBitmap: store bits in little endian format - some improvements of virBitmap - fix some memory leaks Hu Tao (9): bitmap: new member variable and function renaming New functions for virBitmap use virBitmap to store cpupin info use virBitmap to store cpu affinity info use

Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Hu Tao
On Fri, Sep 14, 2012 at 03:10:13PM +0800, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: memset before virResetError will cause memory leak. virResetError and virCopyError, which calls virResetError, will do memset properly, so we don't have to worry about

[libvirt] [PATCH v4 3/9] use virBitmap to store cpupin info

2012-09-14 Thread Hu Tao
--- src/conf/domain_conf.c | 148 +++--- src/conf/domain_conf.h |6 +- src/libvirt_private.syms |1 + src/qemu/qemu_cgroup.c |3 +- src/qemu/qemu_driver.c | 29 + src/qemu/qemu_process.c | 20 --- 6 files changed, 80

[libvirt] [PATCH v4 4/9] use virBitmap to store cpu affinity info

2012-09-14 Thread Hu Tao
--- src/lxc/lxc_controller.c | 23 + src/qemu/qemu_driver.c | 62 - src/qemu/qemu_process.c | 85 -- src/util/processinfo.c | 36 +++- src/util/processinfo.h |9 ++--- 5

[libvirt] [PATCH v4 6/9] use virBitmap to store cpumask info.

2012-09-14 Thread Hu Tao
--- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h |3 +-- src/lxc/lxc_controller.c | 14 ++ src/parallels/parallels_driver.c |3 +-- src/qemu/qemu_process.c | 12 +--- src/test/test_driver.c

[libvirt] [PATCH v4 2/9] New functions for virBitmap

2012-09-14 Thread Hu Tao
In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert those codes to use virBitmap in subsequent patches. --- .gitignore |1 + src/libvirt_private.syms | 11 ++

[libvirt] [PATCH v4 5/9] use virBitmap to store numa nodemask info.

2012-09-14 Thread Hu Tao
--- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h |2 +- src/lxc/lxc_controller.c | 25 src/parallels/parallels_driver.c |2 +- src/qemu/qemu_cgroup.c |7 ++--- src/qemu/qemu_cgroup.h |2 +-

[libvirt] [PATCH v4 7/9] use virBitmap to store cells' cpumask info.

2012-09-14 Thread Hu Tao
--- src/conf/cpu_conf.c | 17 ++--- src/conf/cpu_conf.h |3 ++- src/qemu/qemu_command.c | 43 +++ 3 files changed, 15 insertions(+), 48 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 87e9540..48d5740

[libvirt] [PATCH v4 8/9] use virBitmap to store nodeinfo.

2012-09-14 Thread Hu Tao
--- src/nodeinfo.c | 26 +++--- src/nodeinfo.h |6 +++--- src/qemu/qemu_driver.c | 19 --- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index e3d4a24..803b261 100644 ---

  1   2   3   4   5   6   7   >