Re: [libvirt] [PATCH 7/8] Asynchronous event for BlockPull completion

2011-06-15 Thread Eric Blake
On 06/14/2011 08:36 AM, Adam Litke wrote: When an operation started by virDomainBlockPullAll completes (either with success or with failure), raise an event to indicate the final status. This allows an API user to avoid polling on virDomainBlockPullInfo if they would prefer to use the event

[libvirt] [PATCH RFC 0/5] support cpu bandwidth in libvirt

2011-06-15 Thread Wen Congyang
I need this feature immediately after CFS bandwidth patchset is merged into upstream kernel. So I prepare this patchset, and post it here for reviewing before CFS bandwidth is merged into upstream kernel. quota is an optional attribute specified in microseconds not a percentage of period. TODO:

[libvirt] [PATCH RFC 1/5] cgroup: Implement cpu.cfs_period_us and cpu.cfs_quota_us tuning API

2011-06-15 Thread Wen Congyang
--- src/libvirt_private.syms |4 ++ src/util/cgroup.c| 81 -- src/util/cgroup.h|6 +++ 3 files changed, 88 insertions(+), 3 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ab110a3..11cd3e3

[libvirt] [PATCH RFC 2/5] Update XML Schema for new entries

2011-06-15 Thread Wen Congyang
--- docs/schemas/domain.rng | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng index b71778b..8db5752 100644 --- a/docs/schemas/domain.rng +++ b/docs/schemas/domain.rng @@ -375,6 +375,16 @@

[libvirt] [PATCH RFC 3/5] qemu: Implement period and quota tunable XML configuration and parsing.

2011-06-15 Thread Wen Congyang
--- src/conf/domain_conf.c | 20 +- src/conf/domain_conf.h |2 + src/qemu/qemu_cgroup.c | 43 +++ tests/qemuxml2argvdata/qemuxml2argv-cputune.xml |2 + 4 files changed, 58

[libvirt] [PATCH RFC 4/5] qemu: Implement cfs_period and cfs_quota's modification

2011-06-15 Thread Wen Congyang
--- src/qemu/qemu_driver.c | 162 +--- 1 files changed, 139 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 853c84c..0d83c04 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4764,6

[libvirt] [PATCH RFC 5/5] doc: Add documentation for new cputune elements: period and quota

2011-06-15 Thread Wen Congyang
--- docs/formatdomain.html.in | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 267839b..05ebed7 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -294,6 +294,8 @@

Re: [libvirt] [PATCHv2 02/10] virsh: reduce complexity in argv iteration

2011-06-15 Thread Matthias Bolte
2011/6/14 Eric Blake ebl...@redhat.com: This reduces things from O(n^2) to O(n). * tools/virsh.c (vshCommandOptArgv): Change signature. (cmdEcho): Update caller. Based on a patch by Lai Jiangshan. --- v2: Drop the macro, avoid __ naming, reduce patch size  tools/virsh.c |   21

Re: [libvirt] [libvirt-php] - zend_mm_heap corrupted

2011-06-15 Thread Michal Novotny
Hi Henrik, thanks a lot for your observations. How did you find out about the PHP memory usage and about zend_mm_heap corrupted at the first place? This could help me debug this issue. Thanks, Michal On 06/12/2011 06:05 PM, Henrik Jönsson wrote: [libvirt-php] Hello! I am using Libvirt-php

Re: [libvirt] [PATCH] qemu: Translate boot config into bootindex if possible

2011-06-15 Thread Jiri Denemark
On Tue, Jun 14, 2011 at 14:13:59 -0600, Eric Blake wrote: On 06/06/2011 07:32 AM, Jiri Denemark wrote: Prefer bootindex=N option for -device over the old way -boot ORDER possibly accompanied with boot=on option for -drive. This gives us full control over which device will actually be used

Re: [libvirt] [PATCH] qemu: domain I/O asynchronous handling

2011-06-15 Thread Daniel Veillard
On Tue, Jun 14, 2011 at 11:14:40AM -0600, Eric Blake wrote: On 06/14/2011 11:04 AM, Daniel P. Berrange wrote: On Tue, Jun 14, 2011 at 06:18:17PM +0200, Michal Privoznik wrote: For virtio disks and interfaces, qemu allows users to enable or disable ioeventfd feature. This means, qemu can

[libvirt] [PATCH] support for Xen HVM Viridian (Hyper-V) enlightenment interface

2011-06-15 Thread Daniel Gollub
Introduce libvirt support for Xen HVM Viridian (Hyper-V) enlightenment interface guest feature. --- src/conf/domain_conf.c |3 ++- src/conf/domain_conf.h |1 + src/xen/xen_hypervisor.c | 11 +++ src/xenapi/xenapi_driver.c |2 ++ src/xenapi/xenapi_utils.c |2

[libvirt] [PATCH] Fix apibuild.py warnings about missing comment headers

2011-06-15 Thread Matthias Bolte
Also improve wording of some comments. --- include/libvirt/libvirt.h.in | 36 ++-- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 8ceafe5..cf1a682 100644 ---

[libvirt] [PATCH] Add node prefix to virNodeGet(CPU|Memory)Stats structs and defines

2011-06-15 Thread Matthias Bolte
--- daemon/remote.c |4 +- include/libvirt/libvirt.h.in | 99 -- src/driver.h |4 +- src/libvirt.c| 38 src/nodeinfo.c | 40 src/nodeinfo.h

[libvirt] [PATCH] remote generator: Handle struct returning functions better

2011-06-15 Thread Matthias Bolte
The position of the struct parameter in the function signature differs. Instead of hardcoding the handling for this add an annotation to the .x file to define the position. --- daemon/remote_generator.pl | 42 -- src/remote/remote_protocol.x | 23

Re: [libvirt] [PATCH] Fix apibuild.py warnings about missing comment headers

2011-06-15 Thread Eric Blake
On 06/15/2011 07:40 AM, Matthias Bolte wrote: Also improve wording of some comments. --- include/libvirt/libvirt.h.in | 36 ++-- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in

Re: [libvirt] [PATCH] Add node prefix to virNodeGet(CPU|Memory)Stats structs and defines

2011-06-15 Thread Eric Blake
On 06/15/2011 07:40 AM, Matthias Bolte wrote: --- daemon/remote.c |4 +- include/libvirt/libvirt.h.in | 99 -- src/driver.h |4 +- src/libvirt.c| 38 src/nodeinfo.c

Re: [libvirt] [PATCHv2 02/10] virsh: reduce complexity in argv iteration

2011-06-15 Thread Eric Blake
On 06/15/2011 12:36 AM, Matthias Bolte wrote: 2011/6/14 Eric Blake ebl...@redhat.com: This reduces things from O(n^2) to O(n). * tools/virsh.c (vshCommandOptArgv): Change signature. (cmdEcho): Update caller. Based on a patch by Lai Jiangshan. --- v2: Drop the macro, avoid __ naming,

Re: [libvirt] [PATCH] support for Xen HVM Viridian (Hyper-V) enlightenment interface

2011-06-15 Thread Eric Blake
On 06/15/2011 07:27 AM, Daniel Gollub wrote: Introduce libvirt support for Xen HVM Viridian (Hyper-V) enlightenment interface guest feature. --- src/conf/domain_conf.c |3 ++- src/conf/domain_conf.h |1 + src/xen/xen_hypervisor.c | 11 +++

Re: [libvirt] [PATCH] remote generator: Handle struct returning functions better

2011-06-15 Thread Eric Blake
On 06/15/2011 07:42 AM, Matthias Bolte wrote: The position of the struct parameter in the function signature differs. Instead of hardcoding the handling for this add an annotation to the .x file to define the position. --- daemon/remote_generator.pl | 42

Re: [libvirt] [PATCH] support for Xen HVM Viridian (Hyper-V) enlightenment interface

2011-06-15 Thread Daniel Gollub
On Wednesday, June 15, 2011 04:07:22 pm Eric Blake wrote: Thanks; this looks straightforward. However, your mailer corrupted the patch (by using quoted-printable in a way that git couldn't undo), so it didn't apply easily. Oops, next time I'll use git-send-mail. [...] + viridian)

Re: [libvirt] [PATCH 3/6 v2] Introduce virDomainGetControlInfo API

2011-06-15 Thread Daniel Veillard
On Mon, Jun 13, 2011 at 12:13:15PM +0200, Jiri Denemark wrote: The API can be used to query current state of an interface to VMM used to control a domain. In QEMU world this translates into monitor connection. --- Notes: Version 2: - really implement python binding [...] diff

Re: [libvirt] [PATCH] remote generator: Handle struct returning functions better

2011-06-15 Thread Matthias Bolte
2011/6/15 Eric Blake ebl...@redhat.com: On 06/15/2011 07:42 AM, Matthias Bolte wrote: The position of the struct parameter in the function signature differs. Instead of hardcoding the handling for this add an annotation to the .x file to define the position. ---  daemon/remote_generator.pl  

Re: [libvirt] [PATCH] Fix apibuild.py warnings about missing comment headers

2011-06-15 Thread Matthias Bolte
2011/6/15 Eric Blake ebl...@redhat.com: On 06/15/2011 07:40 AM, Matthias Bolte wrote: Also improve wording of some comments. ---  include/libvirt/libvirt.h.in |   36 ++--  1 files changed, 22 insertions(+), 14 deletions(-) diff --git

[libvirt] [PATCH] remote generator: Handle struct returning functions better (part 2)

2011-06-15 Thread Matthias Bolte
Commit 64000eabedf2 is part 1, that only covered the daemon side by accident. Part 2 covers the client side too. --- daemon/remote_generator.pl | 17 + 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl index

Re: [libvirt] [PATCH] remote generator: Handle struct returning functions better (part 2)

2011-06-15 Thread Eric Blake
On 06/15/2011 09:35 AM, Matthias Bolte wrote: Commit 64000eabedf2 is part 1, that only covered the daemon side by accident. Part 2 covers the client side too. --- daemon/remote_generator.pl | 17 + 1 files changed, 5 insertions(+), 12 deletions(-) ACK. -- Eric Blake

Re: [libvirt] [PATCH] remote generator: Handle struct returning functions better (part 2)

2011-06-15 Thread Matthias Bolte
2011/6/15 Eric Blake ebl...@redhat.com: On 06/15/2011 09:35 AM, Matthias Bolte wrote: Commit 64000eabedf2 is part 1, that only covered the daemon side by accident. Part 2 covers the client side too. ---  daemon/remote_generator.pl |   17 +  1 files changed, 5 insertions(+),

[libvirt] [PATCH] sendkey: use consistent API convention

2011-06-15 Thread Eric Blake
Even though rpc uses 'unsigned int' for the _val parameter that passes the length of itemlength, the public libvirt APIs all use 'int' and filter out lengths 0, except for virDomainSendKey. * include/libvirt/libvirt.h.in (virDomainSendKey): All other APIs use int for array length. *

[libvirt] [PATCH] Fix documentation of virStreamRecv

2011-06-15 Thread Matthias Bolte
virStreamRecv is for reading. Also add some missing punctuation to virStreamSend's documentation. --- src/libvirt.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 36a90d1..689b065 100644 --- a/src/libvirt.c +++ b/src/libvirt.c

Re: [libvirt] [PATCH] sendkey: use consistent API convention

2011-06-15 Thread Daniel P. Berrange
On Wed, Jun 15, 2011 at 10:37:49AM -0600, Eric Blake wrote: Even though rpc uses 'unsigned int' for the _val parameter that passes the length of itemlength, the public libvirt APIs all use 'int' and filter out lengths 0, except for virDomainSendKey. * include/libvirt/libvirt.h.in

Re: [libvirt] [PATCH] Fix documentation of virStreamRecv

2011-06-15 Thread Eric Blake
On 06/15/2011 10:39 AM, Matthias Bolte wrote: virStreamRecv is for reading. Also add some missing punctuation to virStreamSend's documentation. --- src/libvirt.c |8 1 files changed, 4 insertions(+), 4 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682

[libvirt] [PATCH] Support reboots with the QEMU driver

2011-06-15 Thread Daniel P. Berrange
For controlled shutdown we issue a 'system_powerdown' command to the QEMU monitor. This triggers an ACPI event which (most) guest OS wire up to a controlled shutdown. There is no equiv ACPI event to trigger a controlled reboot. This patch attempts to fake a reboot. - In qemuDomainObjPrivatePtr

[libvirt] [PATCH] build: avoid compiler warning on non-Linux

2011-06-15 Thread Eric Blake
Detected by autobuild.sh when cross-building for mingw. * src/nodeinfo.c (nodeGetCPUStats, nodeGetMemoryStats): Mark parameters as potentially unused. --- Pushing under the build-breaker rule. src/nodeinfo.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH] build: export correct function names

2011-06-15 Thread Eric Blake
Detected by autobuild.sh, when targetting mingw. * src/libvirt_private.syms: Fix typos. --- Pushing under the trivial rule. src/libvirt_private.syms |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

Re: [libvirt] [PATCH] sendkey: use consistent API convention

2011-06-15 Thread Eric Blake
On 06/15/2011 10:46 AM, Daniel P. Berrange wrote: On Wed, Jun 15, 2011 at 10:37:49AM -0600, Eric Blake wrote: Even though rpc uses 'unsigned int' for the _val parameter that passes the length of itemlength, the public libvirt APIs all use 'int' and filter out lengths 0, except for

Re: [libvirt] [PATCH 3/8] Add virDomainBlockPull support to the remote driver

2011-06-15 Thread Adam Litke
Thanks Eric. The push looks good. There is a small (known) issue with the text monitor interface and a one-liner will fix that. I can send that out once I have verified against upstream qemu. On 06/14/2011 10:56 PM, Eric Blake wrote: On 06/14/2011 08:36 AM, Adam Litke wrote: The generator

Re: [libvirt] [Qemu-devel] [PATCH v2] Add support for fd: protocol

2011-06-15 Thread Blue Swirl
On Tue, Jun 14, 2011 at 4:31 PM, Corey Bryant brynt...@us.ibm.com wrote: sVirt provides SELinux MAC isolation for Qemu guest processes and their corresponding resources (image files). sVirt provides this support by labeling guests and resources with security labels that are stored in file

[libvirt] minor doc generation glitch

2011-06-15 Thread Eric Blake
Looking at http://libvirt.org/html/libvirt-libvirt.html#virDomainShutoffReason as an example, I see several places where there are spurious * in the generated documentation. It looks like anywhere we have: typedef enum { VALUE = 0; /* Multi-line * comment */ } virName; that the

[libvirt] FreeBSD portability question, --network question

2011-06-15 Thread Jason Helfman
Hey Everyone, I've ported libvirt to FreeBSD, however it has the networking disabled for the build, however I was curious what would need to be changed for this to work. Currently, we do have virtualbox-ose in the FreeBSD portstree, and I am curious if the networking would need to be reworked

Re: [libvirt] [PATCH RFC 0/5] support cpu bandwidth in libvirt

2011-06-15 Thread Adam Litke
On 06/15/2011 01:24 AM, Wen Congyang wrote: I need this feature immediately after CFS bandwidth patchset is merged into upstream kernel. So I prepare this patchset, and post it here for reviewing before CFS bandwidth is merged into upstream kernel. quota is an optional attribute specified

Re: [libvirt] minor doc generation glitch

2011-06-15 Thread Eric Blake
On 06/15/2011 01:25 PM, Eric Blake wrote: Looking at http://libvirt.org/html/libvirt-libvirt.html#virDomainShutoffReason as an example, I see several places where there are spurious * in the generated documentation. Also, http://libvirt.org/html/libvirt-libvirt.html#virTypedParameter is

[libvirt] [PATCH 1/3] virsh: clarify snapshot vs. save

2011-06-15 Thread Eric Blake
* tools/virsh.c (info_snapshot_create, info_save): Clarify description. * tools/virsh.pod (save): Likewise. --- tools/virsh.c |6 +++--- tools/virsh.pod |8 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 1c0b1dc..6b5f3d9

[libvirt] [PATCH 3/3] virsh: enhance snapshot-create-as

2011-06-15 Thread Eric Blake
Similar to pool-create-as. * tools/virsh.c (cmdSnapshotCreateAs): Add --print-xml. * tools/virsh.pod: Document it. --- tools/virsh.c |7 +++ tools/virsh.pod |6 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index

[libvirt] [PATCH 2/3] virsh: add snapshot-create-as command

2011-06-15 Thread Eric Blake
Producing an xml file just for name and description fields is overkill; this makes life easier from virsh. * tools/virsh.c (cmdSnapshotCreateAs): New command. (snapshotCmds): Install it. * tools/virsh.pod: Document it. --- tools/virsh.c | 102

[libvirt] [PATCH 00/10] python: Implement missing stream/event ops

2011-06-15 Thread Cole Robinson
Currently it isn't possible to implement the equivalent of 'virsh console' with the python bindings. This series implements the missing functionality required to do so. Cole Robinson (10): python: libvirt-override: use simpler debug python: generator: Don't print warning if nothing to warn

[libvirt] [PATCH 05/10] python: Implement virStreamSend/RecvAll helpers

2011-06-15 Thread Cole Robinson
Pure python implementation. The handler callbacks have been altered a bit compared to the C API: RecvAll doesn't pass length of the data read since that can be trivially obtained from python string objects, and SendAll requires the handler to return the string data to send rather than store the

[libvirt] [PATCH 01/10] python: libvirt-override: use simpler debug

2011-06-15 Thread Cole Robinson
In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED to avoid warnings. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override.c | 159 - 1 files changed, 55 insertions(+), 104 deletions(-) diff --git

[libvirt] [PATCH 02/10] python: generator: Don't print warning if nothing to warn about

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/generator.py b/python/generator.py index 39c3ca7..6ee0ada 100755 --- a/python/generator.py +++ b/python/generator.py @@ -654,9 +654,11

[libvirt] [PATCH 06/10] Promote virEvent*Handle/Timeout to public API

2011-06-15 Thread Cole Robinson
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. Signed-off-by: Cole Robinson crobi...@redhat.com ---

[libvirt] [PATCH 07/10] events: Correct virEventAddTimeout docs

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/event.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/event.c b/src/util/event.c index 4108221..bd781ec 100644 --- a/src/util/event.c +++ b/src/util/event.c @@ -87,11 +87,11 @@ int

[libvirt] [PATCH 04/10] python: Implement virStreamSend/Recv

2011-06-15 Thread Cole Robinson
The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block we return int(-2). We need to do this since strings aren't passed by reference in python. Signed-off-by: Cole

[libvirt] [PATCH 08/10] python: Add bindings for virEvent*Handle/Timeout

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py| 11 +-- python/libvirt-override.c | 192 +-- python/libvirt-override.py | 54 3 files changed, 221 insertions(+), 36 deletions(-) diff --git

[libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-15 Thread Cole Robinson
These functions aren't intended to be called directly by users, so mark them as private. While we're at it, remove unneeded exception handling, and break some long lines. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override-virConnect.py | 102

[libvirt] [PATCH 09/10] python: events: Fix C-Python handle callback prototype

2011-06-15 Thread Cole Robinson
If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by libvirt C code must are wrapped in a python function. There is some argument trickery that makes this all work, by wrapping the user passed opaque value in a tuple, along with the

Re: [libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-15 Thread Cole Robinson
On 06/15/2011 09:23 PM, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++ python/libvirt-override.c| 81 ++

[libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++ python/libvirt-override.c| 81 ++ python/typewrappers.h|1 - 4 files

[libvirt] [Libvirt-test-API][PATCH] Add a pair of keywords in parser.py for supportting testcases loop

2011-06-15 Thread Nan Zhang
For example: - domain:start guestname vm1 domain:save start_loop guestname vm1 domain:restore end_loop 10 guestname vm1 domain:destroy guestname vm1 - --- parser.py | 46

Re: [libvirt] minor doc generation glitch

2011-06-15 Thread Daniel Veillard
On Wed, Jun 15, 2011 at 03:21:44PM -0600, Eric Blake wrote: On 06/15/2011 01:25 PM, Eric Blake wrote: Looking at http://libvirt.org/html/libvirt-libvirt.html#virDomainShutoffReason as an example, I see several places where there are spurious * in the generated documentation. Also,

[libvirt] RFC: API additions for enhanced snapshot support

2011-06-15 Thread Eric Blake
Right now, libvirt has a snapshot API via virDomainSnapshotCreateXML, but for qemu domains, it only works if all the guest disk images are qcow2, and qemu rather than libvirt does all the work. However, it has a couple of drawbacks: it is inherently tied to domains (there is no way to manage

Re: [libvirt] [PATCH RFC 0/5] support cpu bandwidth in libvirt

2011-06-15 Thread Wen Congyang
At 06/16/2011 03:47 AM, Adam Litke Write: On 06/15/2011 01:24 AM, Wen Congyang wrote: I need this feature immediately after CFS bandwidth patchset is merged into upstream kernel. So I prepare this patchset, and post it here for reviewing before CFS bandwidth is merged into upstream kernel.