Re: [libvirt] [PATCH v8 1/4] add new virDomainCoreDumpWithFormat API

2014-03-22 Thread Wen Congyang
you please rebase and repost them in a way that is not whitespace munged by your mailer? I guess it is our new mailserver problem. I will resend them via old mailserver Thanks Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir

[libvirt] [PATCH v8 resend 0/4] support dumping guest memory in compressed format

2014-03-22 Thread Wen Congyang
From: Qiao Nuohan qiaonuo...@cn.fujitsu.com dumping guest's memory is introduced without compression supported, but now qemu can dump guest's memory in kdump-compressed format. This patchset is used to add support in libvirt side to let qemu do the dump in compressed format and please refer the

[libvirt] [PATCH v8 resend 2/4] qemu: add qemuMonitorGetDumpGuestMemoryCapability

2014-03-22 Thread Wen Congyang
From: Qiao Nuohan qiaonuo...@cn.fujitsu.com This patch adds qemuMonitorGetDumpGuestMemoryCapability, which is used to check whether the specified dump-guest-memory format is supported by qemu. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- src/qemu/qemu_monitor.c | 21

[libvirt] [PATCH v8 resend 4/4] allow virsh dump --memory-only specify dump format

2014-03-22 Thread Wen Congyang
From: Qiao Nuohan qiaonuo...@cn.fujitsu.com This patch adds [--format] string to virsh dump --memory-only, which is changed to use the new virDomainCoreDumpWithFormat API. And --compress is added as an alias for --format kdump-zlib. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com ---

[libvirt] [PATCH v8 resend 3/4] qemu: add support for virDomainCoreDumpWithFormat API

2014-03-22 Thread Wen Congyang
From: Qiao Nuohan qiaonuo...@cn.fujitsu.com This patch makes qemu driver support virDomainCoreDumpWithFormat API. Signed-off-by: Qiao Nuohan qiaonuo...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 75 +--- src/qemu/qemu_monitor.c | 6 ++--

[libvirt] [PATCH v8 resend 1/4] add new virDomainCoreDumpWithFormat API

2014-03-22 Thread Wen Congyang
From: Qiao Nuohan qiaonuo...@cn.fujitsu.com --memory-only option is introduced without compression supported. Now qemu has support dumping domain's memory in kdump-compressed format. This patch is adding new virDomainCoreDumpWithFormat API, so that the format in which qemu dumps domain's memory

Re: [libvirt] [PATCH] Temporarily shutoff CPUSET cgroup in libvirt.

2012-09-23 Thread Wen Congyang
of these controllers are not present. It should be fixed in another patch. Thanks Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

[libvirt] [PATCH] fix make syntak error

2012-08-20 Thread Wen Congyang
We move the macro vshStrcasecmp from tools/virsh.c to tools/virsh.h after commit c2e494cc, so we should not check strcase* in the file tools/virsh.h. Some macros are not properly indented in the file tools/virsh.h and tools/virsh-domain.h. This patch also fixes this problem. --- cfg.mk

Re: [libvirt] [PATCH] building: fix deps error when some drivers are not built

2012-07-24 Thread Wen Congyang
On 07/24/2012 06:12 AM, Eric Blake wrote: On 07/23/2012 03:58 AM, Wen Congyang wrote: libvirt-daemon-driver-XXX should be depent on only when with_driver_modules s/depent on/a dependency/g is 1. libvirt-daemon-driver-libxl should be depent on only when with_libxl is 1. libvirt-daemon-driver

[libvirt] [PATCH] building: fix deps error when some drivers are not built

2012-07-23 Thread Wen Congyang
libvirt-daemon-driver-XXX should be depent on only when with_driver_modules is 1. libvirt-daemon-driver-libxl should be depent on only when with_libxl is 1. libvirt-daemon-driver-lxc should be depent on only when with_lxc is 1. libvirt-daemon-driver-qemu should be depent on only when with_qemu is

Re: [libvirt] [PATCH] Fix a string format bug in qemu_cgroup.c

2012-07-10 Thread Wen Congyang
At 07/11/2012 09:59 AM, Gao feng Wrote: 于 2012年07月10日 23:24, Eric Blake 写道: On 07/05/2012 09:08 PM, Wen Congyang wrote: At 07/06/2012 09:53 AM, tangchen Wrote: Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- src/qemu/qemu_cgroup.c |4 ++-- 1 files changed, 2 insertions(+), 2

Re: [libvirt] [PATCH] Fix a string format bug in qemu_cgroup.c

2012-07-05 Thread Wen Congyang
bandwidth period); + %s, + _(Unable to rollback cpu bandwidth period)); } return -1; ACK I use make syntax-check , and do not find this bug... Thanks Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https

Re: [libvirt] [PATCH] qemu: fix potential dead lock

2012-06-15 Thread Wen Congyang
On 05/25/2012 10:14 PM, Martin Kletzander wrote: On 05/25/2012 12:12 PM, Wen Congyang wrote: If we lock the qemu_driver, we should call qemuDomainObjBeginJobWithDriver() not qemuDomainObjBeginJob(). --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [libvirt] [PATCH 2/3 v5] qemu: allow the client to choose the vmcore's format

2012-06-15 Thread Wen Congyang
On 06/13/2012 08:57 PM, Martin Kletzander wrote: On 06/12/2012 05:06 AM, Wen Congyang wrote: This patch updates qemu driver to allow the client to choose the vmcore's format: memory only or including device state. --- include/libvirt/libvirt.h.in |1 + src/qemu/qemu_capabilities.c |5

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
At 06/12/2012 02:49 PM, Osier Yang Wrote: On 2012年06月12日 09:59, Wen Congyang wrote: make dist failed with the following error: make[1]: Entering directory `/home/wency/source/libvirt/src' GENrpc/virnetprotocol.h GENrpc/virnetprotocol.c GENrpc/virkeepaliveprotocol.h

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
At 06/12/2012 08:55 PM, Eric Blake Wrote: On 06/12/2012 12:57 AM, Wen Congyang wrote: At 06/12/2012 02:49 PM, Osier Yang Wrote: On 2012年06月12日 09:59, Wen Congyang wrote: make dist failed with the following error: make[1]: Entering directory `/home/wency/source/libvirt/src' GENrpc

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
Another building error: error: parse error in expression error: /data1/wency/libvirt/libvirt.spec:138: parseExpressionBoolean returns -1 But I cannot reproduce this problem on another machine. Steps to reproduce it: 1. ./autogen.sh 2. make dist 3. rpmbuild --define _sourcedir `pwd` --define

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
At 06/13/2012 09:59 AM, Eric Blake Wrote: On 06/12/2012 08:01 PM, Wen Congyang wrote: Another building error: error: parse error in expression error: /data1/wency/libvirt/libvirt.spec:138: parseExpressionBoolean returns -1 Fixed by commit 48939a4a. Yes, I forgot to pull the newest

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
At 06/13/2012 10:25 AM, Eric Blake Wrote: On 06/12/2012 07:21 PM, Wen Congyang wrote: GENutil/virkeymaps.h CC libvirt_driver_remote_la-remote_protocol.lo In file included from ./remote/remote_protocol.h:17, from ./remote/remote_protocol.c:7: ./internal.h:300

Re: [libvirt] make dist failed

2012-06-12 Thread Wen Congyang
At 06/13/2012 12:10 PM, Eric Blake Wrote: On 06/12/2012 09:07 PM, Wen Congyang wrote: We really shouldn't need to compile a file for a virgin 'make dist' to work, but now I have enough information to repeat it. It may be a while before I have a clean solution, though, since every thing I

[libvirt] make dist failed

2012-06-11 Thread Wen Congyang
make dist failed with the following error: make[1]: Entering directory `/home/wency/source/libvirt/src' GENrpc/virnetprotocol.h GENrpc/virnetprotocol.c GENrpc/virkeepaliveprotocol.h GENrpc/virkeepaliveprotocol.c GENremote/remote_protocol.h GEN

[libvirt] [PATCH 0/3 v5] use qemu's dump-guest-meory when vm uses host device

2012-06-11 Thread Wen Congyang
. Change from v1 to v2: 1. remove the implemention for text mode. Wen Congyang (3): qemu: implement qemu's dump-guest-memory qemu: allow the client to choose the vmcore's format virsh: allow the user to specify vmcore's format include/libvirt/libvirt.h.in |1 + src/qemu/qemu_capabilities.c

[libvirt] [PATCH 1/3 v5] qemu: implement qemu's dump-guest-memory

2012-06-11 Thread Wen Congyang
dump-guest-memory is a new dump mechanism, and it can work when the guest uses host devices. This patch adds a API to use this new monitor command. We will always use json mode if qemu's version is = 0.15, so I don't implement the API for text mode. --- src/qemu/qemu_monitor.c | 37

[libvirt] [PATCH 2/3 v5] qemu: allow the client to choose the vmcore's format

2012-06-11 Thread Wen Congyang
This patch updates qemu driver to allow the client to choose the vmcore's format: memory only or including device state. --- include/libvirt/libvirt.h.in |1 + src/qemu/qemu_capabilities.c |5 +++ src/qemu/qemu_capabilities.h |1 + src/qemu/qemu_domain.c |1 +

[libvirt] [PATCH 3/3 v5] virsh: allow the user to specify vmcore's format

2012-06-11 Thread Wen Congyang
Add a new parameter --memory-only for 'virsh dump' command. So the user can decide the vmcore's format. --- tools/virsh.c |3 +++ tools/virsh.pod |5 - 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index abcfbff..c875a90 100644 ---

[libvirt] [PATCH] build: include viratomic.h into dist file

2012-06-03 Thread Wen Congyang
We add viratomic.h, but we forget to include it into dist file. This file is used in nwfilter/nwfilter_dhcpsnoop.c now. --- src/Makefile.am |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d727889..331ebc8 100644 ---

[libvirt] [PATCH] fix make syntax-check failed

2012-06-03 Thread Wen Congyang
--- tools/virsh.c | 170 1 files changed, 85 insertions(+), 85 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index a934c13..0e41d00 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3502,16 +3502,16 @@

[libvirt] [PATCH 1/3] avoid closing uninitialized fd

2012-05-30 Thread Wen Congyang
If the system does not support bypass cache, we will close fd, but it is uninitialized. --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fea9c24..1b3391b 100644 --- a/src/qemu/qemu_driver.c

[libvirt] [PATCH 2/3] avoid closing fd more than once

2012-05-30 Thread Wen Congyang
fdstream: If fd is fds[0] or fds[1], we should set to -1 if we meet some error. childfd is fds[0] or fds[1], so we should close it only when virFDStreamOpenFileInternal() successes. qemu_migration: If we migrate to fd, spec-fwdType is not MIGRATION_FWD_DIRECT, we will

[libvirt] [PATCH 3/3] avoid fd leak

2012-05-30 Thread Wen Congyang
virCommandRunAsync() will set errfd if it successes. We should close it if virFDStreamOpenInternal() fails. --- src/fdstream.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/fdstream.c b/src/fdstream.c index d0ea0ee..f068439 100644 --- a/src/fdstream.c +++

Re: [libvirt] [PATCH 2/3] avoid closing fd more than once

2012-05-30 Thread Wen Congyang
At 05/30/2012 09:17 PM, Eric Blake Wrote: On 05/30/2012 03:20 AM, Wen Congyang wrote: fdstream: If fd is fds[0] or fds[1], we should set to -1 if we meet some error. childfd is fds[0] or fds[1], so we should close it only when virFDStreamOpenFileInternal() successes

[libvirt] [PATCH 1/3] avoid closing fd more than once in virFDStreamOpenFileInternal()

2012-05-30 Thread Wen Congyang
When we assign fd and childfd to elements of fds[], we will close these fds more than once on error. So we should assign fds[] to -1 after we assign fd and childfd to elements of fds[]. We should also close childfd on error. --- src/fdstream.c |4 +++- 1 files changed, 3 insertions(+), 1

[libvirt] [PATCH 2/3] qemu: avoid closing fd more than once during migration

2012-05-30 Thread Wen Congyang
If we migrate to fd, spec-fwdType is not MIGRATION_FWD_DIRECT, and we will close spec-dest.fd.local in qemuMigrationRun(). So we should set spec-dest.fd.local to -1 in qemuMigrationRun() because the caller doTunnelMigrate() will close it too. --- src/qemu/qemu_migration.c |4 +++- 1 files

[libvirt] [PATCH 3/3] avoid closing fd more than once when running command fails

2012-05-30 Thread Wen Congyang
We should not set *outfd or *errfd if virExecWithHook() failed, because the caller may close these fds. --- src/util/command.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/command.c b/src/util/command.c index 5b94f1e..aef9131 100644 ---

[libvirt] [PATCH] build: include augeas-gentest.pl and libvirt_qemu_probes.h into dist file

2012-05-29 Thread Wen Congyang
We generate *.aug from *.aug.in by augeas-gentest.pl, so this script should be included in dist file. We split QEMU dtrace probes into separate file, but we forget include libvirt_qemu_probes.h into dist file. --- src/Makefile.am |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)

Re: [libvirt] [PATCH] command: avoid double close bugs

2012-05-29 Thread Wen Congyang
At 05/30/2012 09:20 AM, Eric Blake Wrote: KAMEZAWA Hiroyuki reported a nasty double-free bug when virCommand is used to convert a string into input to a child command. The problem is that the poll() loop of virCommandProcessIO would close() the write end of the pipe in order to let the child

[libvirt] [PATCH] qemu: fix potential dead lock

2012-05-25 Thread Wen Congyang
If we lock the qemu_driver, we should call qemuDomainObjBeginJobWithDriver() not qemuDomainObjBeginJob(). --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 39b27b1..3d62aab 100644 ---

Re: [libvirt] [PATCH] fix building error on non fedora system

2012-05-24 Thread Wen Congyang
On 05/22/2012 08:58 PM, Eric Blake wrote: On 05/22/2012 02:07 AM, Wen Congyang wrote: We forget to define with_storage_rbd if the system is not fedora, or the version is less than 16. --- libvirt.spec.in |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH 10/10] Enable driver modules in libvirt RPM

2012-05-24 Thread Wen Congyang
-nodedev = %{version}-%{release} +Requires: libvirt-daemon-driver-nwilter = %{version}-%{release} I donot find anything about libvirt-daemon-driver-nwilter in spec file. Thanks Wen Congyang +Requires: libvirt-daemon-driver-secret = %{version}-%{release} +Requires: libvirt-daemon-driver-storage

Re: [libvirt] [PATCH 0/3 v4] use qemu's dump-guest-meory when vm uses host device

2012-05-23 Thread Wen Congyang
Hi, All The qemu's patch has been applied to QMP tree. I think we can start this work now. Thanks Wen Congyang At 04/20/2012 03:20 PM, Wen Congyang Wrote: Currently, we use migrate to dump guest's memory. There is one restriction in migrate command: the device's status should be stored

Re: [libvirt] [PATCH 1/3] qemu: implement qemu's dump-guest-memory

2012-05-23 Thread Wen Congyang
At 05/23/2012 04:56 PM, Martin Kletzander Wrote: On 04/20/2012 09:27 AM, Wen Congyang wrote: dump-guest-memory is a new dump mechanism, and it can work when the guest uses host devices. This patch adds a API to use this new monitor command. --- src/qemu/qemu_monitor.c | 38

[libvirt] [PATCH] fix building error on non fedora system

2012-05-22 Thread Wen Congyang
We forget to define with_storage_rbd if the system is not fedora, or the version is less than 16. --- libvirt.spec.in |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 8c4a2fd..0b83969 100644 --- a/libvirt.spec.in +++

Re: [libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-05-17 Thread Wen Congyang
At 05/17/2012 02:06 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 15:05), Wen Congyang wrote: At 05/17/2012 01:42 PM, Hu Tao Wrote: On Thu, May 17, 2012 at 01:25:48PM +0800, Wen Congyang wrote: At 05/17/2012 01:09 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 14:07), Wen Congyang wrote: At 05/17

Re: [libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-05-17 Thread Wen Congyang
At 05/17/2012 01:42 PM, Hu Tao Wrote: On Thu, May 17, 2012 at 01:25:48PM +0800, Wen Congyang wrote: At 05/17/2012 01:09 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 14:07), Wen Congyang wrote: At 05/17/2012 12:46 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 12:54), Wen Congyang wrote: So, if we

Re: [libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-05-16 Thread Wen Congyang
At 05/17/2012 11:13 AM, Hu Tao Wrote: On Wed, Apr 25, 2012 at 05:46:06PM +0800, Wen Congyang wrote: set hypervisor's period and quota when the vm starts. It will affect to set vm's period and quota: donot set vm's period and quota if we limit hypevisor thread's bandwidth(hypervisor_quota 0

Re: [libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-05-16 Thread Wen Congyang
At 05/17/2012 12:46 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 12:54), Wen Congyang wrote: At 05/17/2012 11:13 AM, Hu Tao Wrote: On Wed, Apr 25, 2012 at 05:46:06PM +0800, Wen Congyang wrote: set hypervisor's period and quota when the vm starts. It will affect to set vm's period and quota

Re: [libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-05-16 Thread Wen Congyang
At 05/17/2012 01:09 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 14:07), Wen Congyang wrote: At 05/17/2012 12:46 PM, KAMEZAWA Hiroyuki Wrote: (2012/05/17 12:54), Wen Congyang wrote: So, if we donot limit the hypervisor, the behavior shoule not be changed. So we should limit the whole vm

[libvirt] [PATCH 0/6] support to set cpu bandwidth for hypervisor threads

2012-04-25 Thread Wen Congyang
Currently, we only can set cpu bandwidth for vcpu. If the hypervisor threads consume too much cpu time, it may affect the vcpu. This patchset allows the user to control the cpu bandwidth for hypervisor threads. It does not change the behavior if the cpu bandwidth for hypervisor is unlimited. Wen

[libvirt] [PATCH 4/6] Update XML Schema for new entries

2012-04-25 Thread Wen Congyang
--- docs/schemas/domaincommon.rng | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f116710..8165c5b 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -544,6

[libvirt] [PATCH 2/6] introduce the function virCgroupMoveTask()

2012-04-25 Thread Wen Congyang
introduce a new API to move all tasks from a cgroup to another cgroup --- src/util/cgroup.c | 55 + src/util/cgroup.h |2 + 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index

[libvirt] [PATCH 6/6] qemu: Implement hypervisor_period and hypervisor_quota's modification

2012-04-25 Thread Wen Congyang
allow the user change/get hypervisor's period and quota when the vm is running. If the hypervisor's bandwidth is changed to unlimited, we should limit the vm's bandwidth again. If we limit the hypervisor's bandwidth, there is no need to limit the vm's bandwidth. --- include/libvirt/libvirt.h.in

[libvirt] [PATCH 3/6] create a new cgroup and move all hypervisor threads to the new cgroup

2012-04-25 Thread Wen Congyang
create a new cgroup and move all hypervisor threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for hypervisor threads(include vhost-net threads) --- src/qemu/qemu_cgroup.c | 57

[libvirt] [PATCH 1/6] Introduce the function virCgroupForHypervisor

2012-04-25 Thread Wen Congyang
Introduce the function virCgroupForHypervisor() to create sub directory for hypervisor thread(include I/O thread, vhost-net thread) --- src/libvirt_private.syms |1 + src/util/cgroup.c| 42 ++ src/util/cgroup.h|4 3 files

[libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-04-25 Thread Wen Congyang
set hypervisor's period and quota when the vm starts. It will affect to set vm's period and quota: donot set vm's period and quota if we limit hypevisor thread's bandwidth(hypervisor_quota 0). --- src/conf/domain_conf.c | 25 ++- src/conf/domain_conf.h |2 +

Re: [libvirt] [PATCH] building: remove libvirt_dbus.syms from EXTRA_DIST

2012-04-22 Thread Wen Congyang
On 04/20/2012 11:10 AM, Osier Yang wrote: On 2012年04月20日 11:05, Wen Congyang wrote: commit 2223ea98 removes src/libvirt_dbus.syms, but it forgets to remove it from EXTRA_DIST. It will cause 'make dist' failed. --- src/Makefile.am | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff

[libvirt] building error

2012-04-20 Thread Wen Congyang
When I build libvirt, I meet the following error message sometimes: make[4]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.11/docs' GENlibvirt-api.xml GENlibvirt-qemu-api.xml GENhtml/index.html ./libvirt-api.xml:2450: parser error : AttValue: ' expected function

[libvirt] [PATCH 0/3 v4] use qemu's dump-guest-meory when vm uses host device

2012-04-20 Thread Wen Congyang
from v2 to v3: 1. qemu supports the fd that is associated with a pipe, socket, or FIFO. So pass a pipe fd to qemu and O_DIRECT can work now. Change from v1 to v2: 1. remove the implemention for text mode. Wen Congyang (3): qemu: implement qemu's dump-guest-memory qemu: allow the client

[libvirt] [PATCH 2/3 v4] qemu: allow the client to choose the vmcore's format

2012-04-20 Thread Wen Congyang
This patch updates qemu driver to allow the client to choose the vmcore's format: memory only or including device state. --- include/libvirt/libvirt.h.in |1 + src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1 + src/qemu/qemu_driver.c | 54

[libvirt] [PATCH 1/3] qemu: implement qemu's dump-guest-memory

2012-04-20 Thread Wen Congyang
dump-guest-memory is a new dump mechanism, and it can work when the guest uses host devices. This patch adds a API to use this new monitor command. --- src/qemu/qemu_monitor.c | 38 ++ src/qemu/qemu_monitor.h | 12

[libvirt] [PATCH 3/3 v4] virsh: allow the user to specify vmcore's format

2012-04-20 Thread Wen Congyang
Add a new parameter --memory-only for 'virsh dump' command. So the user can decide the vmcore's format. --- tools/virsh.c |3 +++ tools/virsh.pod |5 - 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 6168a13..c1e8891 100644 ---

Re: [libvirt] building error

2012-04-20 Thread Wen Congyang
At 04/20/2012 04:50 PM, Daniel Veillard Wrote: On Fri, Apr 20, 2012 at 02:26:31PM +0800, Wen Congyang wrote: When I build libvirt, I meet the following error message sometimes: make[4]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.11/docs' GENlibvirt-api.xml GEN

Re: [libvirt] [PATCH] virsh: avoid uninitialized memory usage

2012-04-19 Thread Wen Congyang
*ctl, const vshCmd *cmd) intCaught = 0; sig_action.sa_sigaction = vshCatchInt; +sigemptyset((sigset_t *)sig_action.sa_flags); Why using sigemptyset here? You should use 'sig_action.sa_flags = 0'. Thanks Wen Congyang sigemptyset(sig_action.sa_mask

Re: [libvirt] [PATCH 0/2 v3 use qemu's dump-guest-meory when vm uses host device

2012-04-19 Thread Wen Congyang
At 04/19/2012 04:38 PM, Daniel P. Berrange Wrote: On Thu, Apr 19, 2012 at 09:03:16AM +0800, Wen Congyang wrote: Currently, we use migrate to dump guest's memory. There is one restriction in migrate command: the device's status should be stored in qemu because the device's status should

Re: [libvirt] [PATCH] virsh: avoid uninitialized memory usage

2012-04-19 Thread Wen Congyang
At 04/19/2012 04:40 PM, Alex Jia Wrote: On 04/19/2012 04:19 PM, Wen Congyang wrote: At 04/19/2012 04:09 PM, Alex Jia Wrote: Detected by valgrind. * tools/virsh.c (cmdBlockPull): fix uninitialized memory usage. * How to reproduce? $ qemu-img create /var/lib/libvirt/images/test 1M $ cat

Re: [libvirt] [PATCHv2] virsh: avoid uninitialized memory usage

2012-04-19 Thread Wen Congyang
At 04/19/2012 04:51 PM, Alex Jia Wrote: Detected by valgrind. * tools/virsh.c (cmdBlockPull): fix uninitialized memory usage. * How to reproduce? $ qemu-img create /var/lib/libvirt/images/test 1M $ cat /tmp/test.xml EOF domain type='qemu' nametest/name memory219200/memory

Re: [libvirt] [PATCHv2] virsh: avoid uninitialized memory usage

2012-04-19 Thread Wen Congyang
At 04/20/2012 04:29 AM, Eric Blake Wrote: On 04/19/2012 02:56 AM, Wen Congyang wrote: At 04/19/2012 04:51 PM, Alex Jia Wrote: Detected by valgrind. * tools/virsh.c (cmdBlockPull): fix uninitialized memory usage. +++ b/tools/virsh.c @@ -7634,6 +7634,7 @@ cmdBlockPull(vshControl *ctl

[libvirt] [PATCH] building: remove libvirt_dbus.syms from EXTRA_DIST

2012-04-19 Thread Wen Congyang
commit 2223ea98 removes src/libvirt_dbus.syms, but it forgets to remove it from EXTRA_DIST. It will cause 'make dist' failed. --- src/Makefile.am |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index b8a19b4..e48dfa5 100644 ---

[libvirt] [PATCH] use sa_handler instead of sa_sigaction when SA_SIGINFO is not defined

2012-04-19 Thread Wen Congyang
POSIX requires that we use sa_sigaction if sa_flags includes SA_SIGINFO, and that we use sa_handler otherwise. But we still use sa_sigaction when SA_SIGINFO is not defined. Practice says it will work, but theory says we can't rely on it to work. --- src/rpc/virnetserver.c | 25

Re: [libvirt] [PATCH] use sa_handler instead of sa_sigaction when SA_SIGINFO is not defined

2012-04-19 Thread Wen Congyang
At 04/20/2012 11:26 AM, Eric Blake Wrote: On 04/19/2012 09:10 PM, Wen Congyang wrote: POSIX requires that we use sa_sigaction if sa_flags includes SA_SIGINFO, and that we use sa_handler otherwise. But we still use sa_sigaction when SA_SIGINFO is not defined. Practice says it will work

Re: [libvirt] [PATCHv2] virnetserver: handle sigaction correctly

2012-04-19 Thread Wen Congyang
is undefined, we can safely define it to 0 as long as we don't dereference the 2nd or 3rd argument of any handler otherwise registered via sa_sigaction. Based on a report by Wen Congyang. * src/rpc/virnetserver.c (SA_SIGINFO): Stub for mingw. (virNetServerSignalHandler): Avoid bogus

[libvirt] [PATCH 0/2 v3 use qemu's dump-guest-meory when vm uses host device

2012-04-18 Thread Wen Congyang
that is associated with a pipe, socket, or FIFO. So pass a pipe fd to qemu and O_DIRECT can work now. Change from v1 to v2: 1. remove the implemention for text mode. Wen Congyang (2): qemu: implement qemu's dump-guest-memory qemu: try to use qemu's dump-guest-meory when vm uses host device src/qemu

[libvirt] [PATCH 2/2 v3] qemu: try to use qemu's dump-guest-meory when vm uses host device

2012-04-18 Thread Wen Congyang
--- src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1 + src/qemu/qemu_driver.c | 39 +-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 69d9e6e..e3a668a 100644 ---

[libvirt] [PATCH 1/2 v3] qemu: implement qemu's dump-guest-memory

2012-04-18 Thread Wen Congyang
--- src/qemu/qemu_monitor.c | 36 src/qemu/qemu_monitor.h | 13 + src/qemu/qemu_monitor_json.c | 42 ++ src/qemu/qemu_monitor_json.h |7 +++ 4 files changed, 98 insertions(+), 0

[libvirt] [PATCH 0/2 v2] use qemu's dump-guest-meory when vm uses host device

2012-04-10 Thread Wen Congyang
. Wen Congyang (2): qemu: implement qemu's dump-guest-memory qemu: try to use qemu's dump-guest-meory when vm uses host device src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1 + src/qemu/qemu_driver.c | 42 -- src/qemu

[libvirt] [PATCH 2/2 v2] qemu: try to use qemu's dump-guest-meory when vm uses host device

2012-04-10 Thread Wen Congyang
--- src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1 + src/qemu/qemu_driver.c | 42 -- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 69d9e6e..e3a668a 100644 ---

[libvirt] [PATCH 1/2 v2] qemu: implement qemu's dump-guest-memory

2012-04-10 Thread Wen Congyang
--- src/qemu/qemu_monitor.c | 36 src/qemu/qemu_monitor.h | 13 + src/qemu/qemu_monitor_json.c | 42 ++ src/qemu/qemu_monitor_json.h |7 +++ 4 files changed, 98 insertions(+), 0

Re: [libvirt] [PATCH] qemu: optimize JSON event handler lookup

2012-04-10 Thread Wen Congyang
At 04/11/2012 06:47 AM, Eric Blake Wrote: Probably in the noise, but this will let us scale more efficiently as we recognize ever more qemu events. * src/qemu/qemu_monitor_json.c (eventHandlers): Sort. (eventSearch): New helper function. (qemuMonitorJSONIOProcessEvent): Optimize event

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Wen Congyang
At 04/02/2012 10:50 PM, Eric Blake Wrote: On 04/01/2012 10:01 PM, Wen Congyang wrote: Currently, we use migrate to dump guest's memory. There is one restriction in migrate command: the device's status should be stored in qemu because the device's status should be passed to target machine

Re: [libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-02 Thread Wen Congyang
At 04/03/2012 08:46 AM, Eric Blake Wrote: On 04/02/2012 06:23 PM, Wen Congyang wrote: Why are we bothering with a text implementation? We know that the feature is only present if you have qemu 1.1 or later (assuming that qemu-devel did apply your series adding the monitor command

[libvirt] [PATCH 0/2] use qemu's dump-guest-meory when vm uses host device

2012-04-01 Thread Wen Congyang
is implemented). So I use dump-guest-memory only when the guest uses host device in this patchset. Wen Congyang (2): qemu: implement qemu's dump-guest-memory qemu: try to use qemu's dump-guest-meory when vm uses host device src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1

[libvirt] [PATCH 2/2] qemu: try to use qemu's dump-guest-meory when vm uses host device

2012-04-01 Thread Wen Congyang
--- src/qemu/qemu_domain.c |1 + src/qemu/qemu_domain.h |1 + src/qemu/qemu_driver.c | 42 -- 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 69d9e6e..e3a668a 100644 ---

[libvirt] [PATCH 1/2] qemu: implement qemu's dump-guest-memory

2012-04-01 Thread Wen Congyang
This patch introduces the API to use qemu's new monitor command dump-guest-memory --- src/qemu/qemu_monitor.c | 32 src/qemu/qemu_monitor.h | 13 +++ src/qemu/qemu_monitor_json.c | 42 + src/qemu/qemu_monitor_json.h |7

Re: [libvirt] [PATCH] qemu: fix memory leak in virDomainGetVcpus

2012-04-01 Thread Wen Congyang
At 04/02/2012 01:33 PM, Laine Stump Wrote: https://bugzilla.redhat.com/show_bug.cgi?id=808979 The leak is really in virProcessInfoGetAffinity, as shown in the valgrind output given in the above bug report - it calls CPU_ALLOC(), but then fails to call CPU_FREE(). This leak has existed in

Re: [libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-26 Thread Wen Congyang
ping At 03/16/2012 02:37 PM, Wen Congyang Wrote: When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning of qemuProcessStop() to avoid libvirt deadlock. We call qemuProcessStop() with driver and vm locked. It seems that we can

Re: [libvirt] problems starting several qemu VMS simultaneously

2012-03-21 Thread Wen Congyang
to access /~serge/libvirtd-parallel-startup.log on this server. Thanks Wen Congyang -serge -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo

Re: [libvirt] [PATCH] Fixed NULL pointer check

2012-03-19 Thread Wen Congyang
. + cur = conf-entries; while (cur != NULL) { if ((cur-name != NULL) ACK with the nit fixed. Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2] Fixed NULL pointer check

2012-03-19 Thread Wen Congyang
!= NULL) Looking good, but I think we should revert 59d0c9801c1ab then. I agree with reverting this commit. It does not fix all space. In addition - maybe we can set ATTRIBUTE_RETURN_CHECK to this function. Agree with it. Thanks Wen Congyang Michal -- libvir-list mailing list

[libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-16 Thread Wen Congyang
When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning of qemuProcessStop() to avoid libvirt deadlock. We call qemuProcessStop() with driver and vm locked. It seems that we can avoid libvirt deadlock. But unfortunately we may unlock

[libvirt] [PATCH] hold the reference when call monitor's callback

2012-03-15 Thread Wen Congyang
When qemu cannot startup, we will call EOF notify callback. Unfortunately, there is a bug in libvirt, and it will cause mon-ref to be 0 while we call EOF notify callback. This bug will cause the libvirt to be deadlock. We call the other callback while holding the reference. So I think we should

Re: [libvirt] question about guest status

2012-02-15 Thread Wen Congyang
At 02/16/2012 11:04 AM, KAMEZAWA Hiroyuki Wrote: On Wed, 15 Feb 2012 11:00:25 + Daniel P. Berrange berra...@redhat.com wrote: On Wed, Feb 15, 2012 at 02:44:18PM +0800, Wen Congyang wrote: Hi all: If the guest runs on xen, we can know the guest OS paniced, and the guest status

[libvirt] question about guest status

2012-02-14 Thread Wen Congyang
) and check messages given by guests. If we allow some filtering script or some, we can catch Linux's panic messages. We can say the guest paniced if we catch such messages. We may be able to catch other events by other script I prefer to 3 now. Does anyone have a better idea? Thanks Wen

Re: [libvirt] [PATCH] daemon: fix logic bug with virAsprintf

2012-02-14 Thread Wen Congyang
(Bypass polkit auth for privileged client %s, ident); if (virNetServerClientSetIdentity(client, ident) 0) ACK Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/3] spec: fix sanlock dependency

2011-12-13 Thread Wen Congyang
/ifnarch/ifarch/ ? Thanks Wen Congyang +%define with_sanlock 0%{!?_without_sanlock:%{server_drivers}} +%endif %endif # Disable some drivers when building without libvirt daemon. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] virsh: support multifunction in attach-disk

2011-12-12 Thread Wen Congyang
do you need this feature? Thanks Wen Congyang --- tools/virsh.c |7 ++- tools/virsh.pod |3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d58b827..346b440 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -12661,6

Re: [libvirt] 'make check' hangs

2011-11-30 Thread Wen Congyang
. Thanks Wen Congyang -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] 'make check' hangs

2011-11-29 Thread Wen Congyang
When I run 'make check', it hangs sometimes. I use gdb to attach lt-virsh, and the following is the backtrace: (gdb) thread 1 [Switching to thread 1 (Thread 0x7fc6c04d5800 (LWP 24099))]#0 0x003bdce0804d in pthread_join () from /lib64/libpthread.so.0 (gdb) bt #0 0x003bdce0804d in

Re: [libvirt] [PATCH 2/6] qemu: Plug memory leak on qemuProcessWaitForMonitor() error path

2011-11-29 Thread Wen Congyang
(); +VIR_FORCE_CLOSE(logfd); return -1; I think it is better to goto closelog Thanks Wen Congyang } -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/6] rpc: Plug memory leak on virNetClientSendInternal() error path

2011-11-29 Thread Wen Congyang
is still on the dispatch queue */ So I think we should not free call if it is still on the queue. Thanks Wen Congyang return ret; } -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/6] qemu: Plug memory leak on qemuProcessWaitForMonitor() error path

2011-11-29 Thread Wen Congyang
At 11/30/2011 02:32 PM, Alex Jia Write: On 11/30/2011 02:20 PM, Wen Congyang wrote: At 11/30/2011 01:57 PM, a...@redhat.com Write: From: Alex Jiaa...@redhat.com Detected by Coverity. Leak introduced in commit 109efd7. Signed-off-by: Alex Jiaa...@redhat.com --- src/qemu/qemu_process.c

Re: [libvirt] make rpm failing with git head on RHEL6

2011-11-08 Thread Wen Congyang
-devel packages to let configure succeed. I use RHEL6.1 x64 too. But I do not meet this problem. I think you do not install this package: systemtap-sdt-devel. Thanks Wen Congyang Any ideas? Regards and best wishes, Justin Clift -- Aeolus Community Manager http://www.aeolusproject.org

  1   2   3   4   5   >