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 5/6] node_memory: Expose the APIs to virsh

2012-09-14 Thread Osier Yang
New command node-memory-tune to get/set the node memory parameters, only two parameters are allowed to set (pages_to_scan, and sleep_millisecs, see documents in this patch for more details). Example of node-memory-tune's output: Shared memory: pages_to_scan 100 sleep_millisecs

[libvirt] [PATCH 0/6 v2] New APIs to get/set node memory parameters

2012-09-14 Thread Osier Yang
v1: https://www.redhat.com/archives/libvir-list/2012-September/msg00517.html v1 - v2: * Rename virNode{Get,Set}SharedMemoryParameters to virNode{Get,Set}MemoryParameters, in case of we could add more node memory tunables in future. As a result of RFC:

[libvirt] [PATCH 6/6] node_memory: Expose the APIs to Python bindings

2012-09-14 Thread Osier Yang
* python/libvirt-override-api.xml: (Add document to describe the APIs). * python/libvirt-override.c: (Implement the API wrappers manually) --- python/libvirt-override-api.xml | 13 python/libvirt-override.c | 125 +++ 2 files changed, 138

[libvirt] [PATCH 1/6] node_memory: Define the APIs to get/set memory parameters

2012-09-14 Thread Osier Yang
* include/libvirt/libvirt.h.in: (Add macros for the param fields, declare the APIs). * src/driver.h: (New methods for the driver struct) * src/libvirt.c: (Implement the public APIs) * src/libvirt_public.syms: (Export the public symbols) --- include/libvirt/libvirt.h.in | 63

[libvirt] [PATCH 4/6] node_memory: Support get/set memory parameters for drivers

2012-09-14 Thread Osier Yang
Including QEMU, LXC, UML, XEN drivers. --- src/lxc/lxc_driver.c |2 ++ src/qemu/qemu_driver.c |2 ++ src/uml/uml_driver.c |2 ++ src/xen/xen_driver.c |3 +++ 4 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index

[libvirt] [PATCH 2/6] node_memory: Wire up the RPC protocol

2012-09-14 Thread Osier Yang
* src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the the special one which needs a connection object as the first argument, improve the generator to support it). * daemon/remote.c: (Implement the server side handler for virDomainGetMemoryParameters) * src/remote/remote_driver.c:

[libvirt] [PATCH 3/6] node_memory: Implement the internal APIs

2012-09-14 Thread Osier Yang
Only implemented for linux platform. * src/nodeinfo.h: (Declare node{Get,Set}MemoryParameters) * src/nodeinfo.c: (Implement node{Get,Set}MemoryParameters) * src/libvirt_private.syms: (Export those two new internal APIs to private symbols) --- src/libvirt_private.syms |2 + src/nodeinfo.c

Re: [libvirt] [PATCH 2/2] qemu: Add support for EOI with APIC

2012-09-14 Thread Martin Kletzander
On 09/13/2012 04:52 PM, Michal Privoznik wrote: On 13.09.2012 16:12, Martin Kletzander wrote: This patch adds full support for EOI setting for domains. Because this is CPU feature (flag), the model needs to be added even when it's not specified. Fortunately this problem was already solved with

Re: [libvirt] [PATCH 1/2] Add support for EOI with APIC

2012-09-14 Thread Martin Kletzander
On 09/13/2012 04:52 PM, Michal Privoznik wrote: On 13.09.2012 16:12, Martin Kletzander wrote: New options is added to support EOI (End of Interrupt) exposure for guests. As it makes sense only when APIC is enabled, I added this into the apic element in features because this should be tri-state

Re: [libvirt] [PATCH v2] Fix libvirtd crash possibility

2012-09-14 Thread Martin Kletzander
On 09/13/2012 05:04 PM, Eric Blake wrote: On 09/12/2012 05:00 PM, Eric Blake wrote: On 09/12/2012 04:44 PM, Martin Kletzander wrote: When generating RPC protocol messages, it's strictly needed to have continuousline of numbers or RPC messages. However in case anyone s/continuousline/a

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

2012-09-14 Thread Daniel Veillard
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 it here. Disagree, it's a public API, we can't justify behaviour

Re: [libvirt] [PATCH 1/6] node_memory: Define the APIs to get/set memory parameters

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:15PM +0800, Osier Yang wrote: * include/libvirt/libvirt.h.in: (Add macros for the param fields, declare the APIs). * src/driver.h: (New methods for the driver struct) * src/libvirt.c: (Implement the public APIs) * src/libvirt_public.syms: (Export the public

Re: [libvirt] [PATCH 2/6] node_memory: Wire up the RPC protocol

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:16PM +0800, Osier Yang wrote: * src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the the special one which needs a connection object as the first argument, improve the generator to support it). * daemon/remote.c: (Implement the server side handler for

Re: [libvirt] [PATCH 3/6] node_memory: Implement the internal APIs

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:17PM +0800, Osier Yang wrote: Only implemented for linux platform. * src/nodeinfo.h: (Declare node{Get,Set}MemoryParameters) * src/nodeinfo.c: (Implement node{Get,Set}MemoryParameters) * src/libvirt_private.syms: (Export those two new internal APIs to private

Re: [libvirt] [PATCH 4/6] node_memory: Support get/set memory parameters for drivers

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:18PM +0800, Osier Yang wrote: Including QEMU, LXC, UML, XEN drivers. --- src/lxc/lxc_driver.c |2 ++ src/qemu/qemu_driver.c |2 ++ src/uml/uml_driver.c |2 ++ src/xen/xen_driver.c |3 +++ 4 files changed, 9 insertions(+), 0 deletions(-)

Re: [libvirt] [PATCH 5/6] node_memory: Expose the APIs to virsh

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:19PM +0800, Osier Yang wrote: New command node-memory-tune to get/set the node memory parameters, only two parameters are allowed to set (pages_to_scan, and sleep_millisecs, see documents in this patch for more details). Example of node-memory-tune's output:

Re: [libvirt] [PATCH 6/6] node_memory: Expose the APIs to Python bindings

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:42:20PM +0800, Osier Yang wrote: * python/libvirt-override-api.xml: (Add document to describe the APIs). * python/libvirt-override.c: (Implement the API wrappers manually) --- python/libvirt-override-api.xml | 13 python/libvirt-override.c | 125

[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
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 series extends virBitmap, and convert those codes to use virBitmap. changes: v4: - rename virBitmapAlloc to virBitmapNew - rename virBitmapAllocFromData to

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

Re: [libvirt] [PATCH 1/6] node_memory: Define the APIs to get/set memory parameters

2012-09-14 Thread Osier Yang
On 2012年09月14日 15:20, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 02:42:15PM +0800, Osier Yang wrote: * include/libvirt/libvirt.h.in: (Add macros for the param fields, declare the APIs). * src/driver.h: (New methods for the driver struct) * src/libvirt.c: (Implement the public APIs) *

[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 ---

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

2012-09-14 Thread Hu Tao
virBitmap is recommanded to store cpuset info, and virBitmapFormat/virBitmapParse can do the format/parse jobs. --- src/conf/domain_conf.c | 196 -- src/conf/domain_conf.h |7 -- src/libvirt_private.syms |2 - 3 files changed, 205

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

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 03:34:29PM +0800, Hu Tao wrote: 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

[libvirt] [PATCH 0/5 v5] Atomic API to list secrets

2012-09-14 Thread Osier Yang
v4 - v5: * Support filter the returned secrets by its properties ephemeral and private. Osier Yang (5): list: Define new API virConnectListAllSecrets list: Implement RPC calls for virConnectListAllSecrets list: Implement listAllSecrets list: Expose virConnectListAllSecrets to Python

[libvirt] [PATCH 3/5] list: Implement listAllSecrets

2012-09-14 Thread Osier Yang
Simply returns the object list. No filtering. src/secret/secret_driver.c: Implement listAllSecrets --- src/conf/secret_conf.h | 12 ++ src/secret/secret_driver.c | 82 +++- 2 files changed, 93 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH 2/5] list: Implement RPC calls for virConnectListAllSecrets

2012-09-14 Thread Osier Yang
The RPC generator doesn't support returning list of object yet, this patch do the work manually. * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllSecrets. * src/remote/remote_driver.c: Add remote driver handler remoteConnectListAllSecrets. *

[libvirt] [PATCH 5/5] list: Use virConnectListAllSecrets in virsh

2012-09-14 Thread Osier Yang
This introduce four new options for secret-list, to filter the returned secrets by whether it's ephemeral or not, and/or by whether it's private or not. * tools/virsh-secret.c: (New helper vshSecretSorter, vshSecretListFree, and vshCollectSecretList; Use the new API for secret-list; error out

[libvirt] [PATCH 4/5] list: Expose virConnectListAllSecrets to Python binding

2012-09-14 Thread Osier Yang
The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: Implementation for listAllSecrets. python/libvirt-override.c: Implementation for the wrapper.

Re: [libvirt] [PATCH v4 0/5] Per-guest configurable user/group for QEMU processes

2012-09-14 Thread Daniel P. Berrange
On Tue, Sep 11, 2012 at 02:13:38PM -0400, Corey Bryant wrote: Are there any other requirements that need to be taken care of to enable execution of QEMU guests under separate unprivileged user IDs (ie. DAC isolation)? At this point, this patch series (Per-guest configurable user/group for

[libvirt] [PATCH 1/5] list: Define new API virConnectListAllSecrets

2012-09-14 Thread Osier Yang
This is to list the secret objects. No flags are supported include/libvirt/libvirt.h.in: Declare enum virConnectListAllSecretFlags and virConnectListAllSecrets. python/generator.py: Skip auto-generating src/driver.h: (virDrvConnectListAllSecrets) src/libvirt.c:

Re: [libvirt] [PATCH 2/5] list: Implement RPC calls for virConnectListAllSecrets

2012-09-14 Thread Peter Krempa
On 09/14/12 10:38, Osier Yang wrote: The RPC generator doesn't support returning list of object yet, this patch do the work manually. s/do/does/ * daemon/remote.c: Implemente the server side handler remoteDispatchConnectListAllSecrets. s/Implemente/Implement/ *

Re: [libvirt] [PATCH 1/5] list: Define new API virConnectListAllSecrets

2012-09-14 Thread Peter Krempa
On 09/14/12 10:38, Osier Yang wrote: This is to list the secret objects. No flags are supported This statement isn't accurate as you added filtering flags. include/libvirt/libvirt.h.in: Declare enum virConnectListAllSecretFlags and virConnectListAllSecrets.

[libvirt] [PATCH 3/3] Add a ./run script for running programs from the local directory.

2012-09-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com With this script you can run libvirt programs without needing to install them first. You just have to do for example: ./run ./tools/virsh [args ...] If you are already in the tools/ subdirectory, then the following command will also work: ../run

[libvirt] [PATCH 2/3] daemon: Fix error message when libvirtd is missing.

2012-09-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com Currently we search along the hard-coded names: SBINDIR /libvirtd SBINDIR /libvirtd_dbg but if the environment variable $LIBVIRTD_PATH is set to the name of the libvirtd binary, that is used instead. Fix the error message so it accurately reflects

Re: [libvirt] libvirt plans: dns support for IPv6?

2012-09-14 Thread Daniel P. Berrange
On Thu, Sep 13, 2012 at 02:00:48PM -0400, Gene Czarcinski wrote: I would like to know what the plans are for supporting dns for virtual guests with only IPv6. My objective is to be able to reference a virtual guest for the host ... doing ssh, scp, etc. such functions work just fine if you

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

2012-09-14 Thread Daniel P. Berrange
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 it here. --- src/util/virterror.c |2 -- 1 file changed, 2

[libvirt] Add a ./run script for running programs from the local directory.

2012-09-14 Thread Richard W.M. Jones
In libguestfs we successfully use a ./run script which sets up the environment so you can run libguestfs programs (internal and external ones, in C and non-C) without needing to install anything. This adds a similar script for libvirt. Here is the documentation included in the script: # With

Re: [libvirt] [PATCH 3/5] list: Implement listAllSecrets

2012-09-14 Thread Peter Krempa
On 09/14/12 10:38, Osier Yang wrote: Simply returns the object list. No filtering. Again, this statement isn't true any more. src/secret/secret_driver.c: Implement listAllSecrets --- src/conf/secret_conf.h | 12 ++ src/secret/secret_driver.c | 82

[libvirt] [PATCH 1/3] gitignore: Ignore .gdb_history file.

2012-09-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com --- .gitignore |1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d998f0e..56d4742 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ *.s *~ .deps +.gdb_history .git .git-module-status .libs -- 1.7.10.4

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:58:31PM +0800, Daniel Veillard wrote: On Fri, Sep 14, 2012 at 03:34:29PM +0800, Hu Tao wrote: 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

Re: [libvirt] [PATCH 4/5] list: Expose virConnectListAllSecrets to Python binding

2012-09-14 Thread Peter Krempa
On 09/14/12 10:38, Osier Yang wrote: The implementation is done manually as the generator does not support wrapping lists of C pointers into Python objects. python/libvirt-override-api.xml: Document python/libvirt-override-virConnect.py: Implementation for listAllSecrets.

Re: [libvirt] [PATCH 0/2] tell dnsmasq not to forward PTR queries

2012-09-14 Thread Laine Stump
On 09/12/2012 11:16 AM, g...@czarc.net wrote: From: Gene Czarcinski g...@czarc.net For networks which dnsmasq has --listen-address specified, add the command line parameter so that any dns PTR queries for those networks are not forwarded. Are you certain this will never be desired? If

Re: [libvirt] [PATCH 0/8] Hostdev-hybrid patches

2012-09-14 Thread Laine Stump
On 09/13/2012 06:16 AM, Shradha Shah wrote: On 09/11/2012 08:07 PM, Laine Stump wrote: If so, one issue I have is that one of the devices (the pci-passthrough?) doesn't have its guest-side PCI address visible anywhere in the guest's XML, does it? This is problematic, because management

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:46:56PM +0800, Hu Tao wrote: 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 +-

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:46:57PM +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 those codes to use virBitmap in subsequent patches. --- .gitignore

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:46:58PM +0800, Hu Tao wrote: --- 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 +

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:46:59PM +0800, Hu Tao wrote: --- src/lxc/lxc_controller.c | 23 + src/qemu/qemu_driver.c | 62 - src/qemu/qemu_process.c | 85 -- src/util/processinfo.c | 36

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:47:00PM +0800, Hu Tao wrote: --- 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

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:47:02PM +0800, Hu Tao wrote: --- 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(-) ACK Daniel -- |:

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:47:03PM +0800, Hu Tao wrote: --- src/nodeinfo.c | 26 +++--- src/nodeinfo.h |6 +++--- src/qemu/qemu_driver.c | 19 --- 3 files changed, 26 insertions(+), 25 deletions(-) ACK Daniel -- |:

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

2012-09-14 Thread Daniel P. Berrange
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. --- src/conf/domain_conf.c | 196 -- src/conf/domain_conf.h |7 --

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

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:47:01PM +0800, Hu Tao wrote: --- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h |3 +-- src/lxc/lxc_controller.c | 14 ++ src/parallels/parallels_driver.c |3 +--

Re: [libvirt] [PATCH 5/5] list: Use virConnectListAllSecrets in virsh

2012-09-14 Thread Peter Krempa
On 09/14/12 10:38, Osier Yang wrote: This introduce four new options for secret-list, to filter the s/introduce/introduces/ returned secrets by whether it's ephemeral or not, and/or by whether it's private or not. * tools/virsh-secret.c: (New helper vshSecretSorter, vshSecretListFree,

Re: [libvirt] [PATCH 11/20] Introduce a API for creating QEMU capabilities for a binary

2012-09-14 Thread Daniel P. Berrange
On Thu, Sep 13, 2012 at 10:31:09AM -0600, Eric Blake wrote: On 09/11/2012 08:11 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Introduce a qemuCapsNewForBinary() API which creates a new QEMU capabilities object, populated with data relating to a specific

[libvirt] [PATCH] qemu: fix uninitialized variable in qemuParseCommandLine

2012-09-14 Thread Ján Tomko
Newly added if branch for kvm_pv_eoi did not set the ret variable. --- src/qemu/qemu_command.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ec825bc..d0c8e22 100644 --- a/src/qemu/qemu_command.c +++

Re: [libvirt] [PATCH] qemu: fix uninitialized variable in qemuParseCommandLine

2012-09-14 Thread Osier Yang
On 2012年09月14日 20:50, Ján Tomko wrote: Newly added if branch for kvm_pv_eoi did not set the ret variable. --- src/qemu/qemu_command.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ec825bc..d0c8e22 100644 ---

Re: [libvirt] [PATCH 1/7 v5] list: Define new API virConnectListAllNodeDevices

2012-09-14 Thread Peter Krempa
On 09/13/12 08:54, Osier Yang wrote: This is to list the node device objects, supports to filter the results by capability types. include/libvirt/libvirt.h.in: Declare enum virConnectListAllNodeDeviceFlags and virConnectListAllNodeDevices. python/generator.py:

Re: [libvirt] [PATCH 1/5] list: Define new API virConnectListAllSecrets

2012-09-14 Thread Peter Krempa
On 09/14/12 11:47, Peter Krempa wrote: On 09/14/12 10:38, Osier Yang wrote: This is to list the secret objects. No flags are supported This statement isn't accurate as you added filtering flags. include/libvirt/libvirt.h.in: Declare enum virConnectListAllSecretFlags

Re: [libvirt] [PATCH] qemu: fix uninitialized variable in qemuParseCommandLine

2012-09-14 Thread Osier Yang
On 2012年09月14日 20:55, Osier Yang wrote: On 2012年09月14日 20:50, Ján Tomko wrote: Newly added if branch for kvm_pv_eoi did not set the ret variable. --- src/qemu/qemu_command.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c

Re: [libvirt] [PATCH 6/7 v5] virsh: Don't motify the const string

2012-09-14 Thread Peter Krempa
On 09/13/12 08:56, Osier Yang wrote: This improve helper vshStringToArray to accept const string as s/improve/improves/ argument instead. To not convert the const string when using vshStringToArray, and thus avoid motifying it. I'd write the last sentence as: This avoids modifying const

[libvirt] [PATCH] svirt: Label serial sockets (RHBZ#853393).

2012-09-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com libvirt skips labelling these, for unknown reasons. This breaks libguestfs. Adding this and some SELinux rules (RHBZ#857453) fixes everything for me. --- src/security/security_selinux.c | 12 ++-- 1 file changed, 2 insertions(+), 10

Re: [libvirt] [Qemu-devel] [PATCH v4 0/5] Per-guest configurable user/group for QEMU processes

2012-09-14 Thread Corey Bryant
On 09/14/2012 04:40 AM, Daniel P. Berrange wrote: On Tue, Sep 11, 2012 at 02:13:38PM -0400, Corey Bryant wrote: Are there any other requirements that need to be taken care of to enable execution of QEMU guests under separate unprivileged user IDs (ie. DAC isolation)? At this point, this

Re: [libvirt] [PATCH] svirt: Label serial sockets (RHBZ#853393).

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 02:31:44PM +0100, Richard W.M. Jones wrote: From: Richard W.M. Jones rjo...@redhat.com libvirt skips labelling these, for unknown reasons. This breaks libguestfs. Adding this and some SELinux rules (RHBZ#857453) fixes everything for me. ---

Re: [libvirt] [Qemu-devel] [PATCH v4 0/5] Per-guest configurable user/group for QEMU processes

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 09:31:26AM -0400, Corey Bryant wrote: On 09/14/2012 04:40 AM, Daniel P. Berrange wrote: On Tue, Sep 11, 2012 at 02:13:38PM -0400, Corey Bryant wrote: Are there any other requirements that need to be taken care of to enable execution of QEMU guests under separate

Re: [libvirt] [PATCH 7/7 v5] list: Use virConnectListAllNodeDevices in virsh

2012-09-14 Thread Peter Krempa
On 09/13/12 08:59, Osier Yang wrote: tools/virsh-nodedev.c: * vshNodeDeviceSorter to sort node devices by name * vshNodeDeviceListFree to free the node device objects list. * vshNodeDeviceListCollect to collect the node device objects, trying to use new API first, fall back to

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-14 Thread Wido den Hollander
On 09/13/2012 02:19 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:46:43PM +0200, Wido den Hollander wrote: On 09/10/2012 03:23 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:00:57PM +0200, Wido den Hollander wrote: On 09/10/2012 02:29 PM, Daniel Veillard wrote: any idea how to

Re: [libvirt] [PATCH] svirt: Label serial sockets (RHBZ#853393).

2012-09-14 Thread Richard W.M. Jones
On Fri, Sep 14, 2012 at 02:40:39PM +0100, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 02:31:44PM +0100, Richard W.M. Jones wrote: From: Richard W.M. Jones rjo...@redhat.com libvirt skips labelling these, for unknown reasons. This breaks libguestfs. Adding this and some SELinux

[libvirt] [PATCHv2] svirt: Label serial sockets (RHBZ#853393).

2012-09-14 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com libvirt skips labelling these, for unknown reasons. This breaks libguestfs. Adding this and some SELinux rules (RHBZ#857453) fixes everything for me. --- src/security/security_selinux.c | 17 + 1 file changed, 17 insertions(+) diff

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-14 Thread Wido den Hollander
On 09/13/2012 02:19 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:46:43PM +0200, Wido den Hollander wrote: On 09/10/2012 03:23 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:00:57PM +0200, Wido den Hollander wrote: On 09/10/2012 02:29 PM, Daniel Veillard wrote: any idea how to

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 04:01:55PM +0200, Wido den Hollander wrote: On 09/13/2012 02:19 PM, Daniel Veillard wrote: [...] Come to think of it, a 0.4.9 release under MIT would however be preferable for CloudStack 4.0. Okay, you get it, it's out, can you check maven is working, I had to do

[libvirt] [PATCH 4/6] node_memory: Support get/set memory parameters for drivers

2012-09-14 Thread Osier Yang
Including QEMU, LXC, UML, XEN drivers. --- src/lxc/lxc_driver.c |2 ++ src/qemu/qemu_driver.c |2 ++ src/uml/uml_driver.c |2 ++ src/xen/xen_driver.c |3 +++ 4 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index

[libvirt] [PATCH 1/6] node_memory: Define the APIs to get/set memory parameters

2012-09-14 Thread Osier Yang
* include/libvirt/libvirt.h.in: (Add macros for the param fields, declare the APIs). * src/driver.h: (New methods for the driver struct) * src/libvirt.c: (Implement the public APIs) * src/libvirt_public.syms: (Export the public symbols) --- include/libvirt/libvirt.h.in | 63

[libvirt] [PATCH 0/6 v3] New APIs to get/set node memory tunables

2012-09-14 Thread Osier Yang
v1: https://www.redhat.com/archives/libvir-list/2012-September/msg00517.html v1 - v2: * Rename virNode{Get,Set}SharedMemoryParameters to virNode{Get,Set}MemoryParameters, in case of we could add more node memory tunables in future. v2 - v3: * Add prefix shm_ to the shared memory

[libvirt] [PATCH 3/6] node_memory: Implement the internal APIs

2012-09-14 Thread Osier Yang
Only implemented for linux platform. * src/nodeinfo.h: (Declare node{Get,Set}MemoryParameters) * src/nodeinfo.c: (Implement node{Get,Set}MemoryParameters) * src/libvirt_private.syms: (Export those two new internal APIs to private symbols) --- src/libvirt_private.syms |2 + src/nodeinfo.c

[libvirt] [PATCH 6/6] node_memory: Expose the APIs to Python bindings

2012-09-14 Thread Osier Yang
* python/libvirt-override-api.xml: (Add document to describe the APIs). * python/libvirt-override.c: (Implement the API wrappers manually) --- python/libvirt-override-api.xml | 13 python/libvirt-override.c | 125 +++ 2 files changed, 138

[libvirt] [PATCH 5/6] node_memory: Expose the APIs to virsh

2012-09-14 Thread Osier Yang
New command node-memory-tune to get/set the node memory parameters, only two parameters are allowed to set (pages_to_scan, and sleep_millisecs, see documents in this patch for more details). Example of node-memory-tune's output: Shared memory: pages_to_scan 100 sleep_millisecs

Re: [libvirt] [Qemu-devel] [PATCH v4 0/5] Per-guest configurable user/group for QEMU processes

2012-09-14 Thread Corey Bryant
On 09/14/2012 09:51 AM, Daniel P. Berrange wrote: On Fri, Sep 14, 2012 at 09:31:26AM -0400, Corey Bryant wrote: On 09/14/2012 04:40 AM, Daniel P. Berrange wrote: On Tue, Sep 11, 2012 at 02:13:38PM -0400, Corey Bryant wrote: Are there any other requirements that need to be taken care of to

[libvirt] [PATCH 2/6] node_memory: Wire up the RPC protocol

2012-09-14 Thread Osier Yang
* src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the the special one which needs a connection object as the first argument, improve the generator to support it). * daemon/remote.c: (Implement the server side handler for virDomainGetMemoryParameters) * src/remote/remote_driver.c:

Re: [libvirt] [libvirt-java] Upload 0.4.8 to central Maven repository

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 04:18:21PM +0200, Wido den Hollander wrote: On 09/13/2012 02:19 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:46:43PM +0200, Wido den Hollander wrote: On 09/10/2012 03:23 PM, Daniel Veillard wrote: On Mon, Sep 10, 2012 at 03:00:57PM +0200, Wido den Hollander

[libvirt] [PATCH] build: fix missing include

2012-09-14 Thread Dwight Engen
virNWFilterSnoopAdjustPoll() uses a struct pollfd but poll.h is never included nwfilter/nwfilter_dhcpsnoop.c:1297: error: 'struct pollfd' declared inside parameter list --- src/nwfilter/nwfilter_dhcpsnoop.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCHv2 3/4] qemu: add -sandbox to command line if requested

2012-09-14 Thread Corey Bryant
On 09/12/2012 04:03 AM, Ján Tomko wrote: --- src/qemu/qemu_command.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a83d6de..c50c306 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCH 05/23] Fix initialization of virCommandPtr when creating QEMU argv

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If the qemuBuildCommandLine method raised an error before the virCommandPtr instance was created, the local var would not be initialized, resulting in a possible SEGV in the error cleanup branch. Also add some debugging of the method params ---

[libvirt] [PATCH 00/23 v2] Add support for detecting QEMU capabilities via QMP

2012-09-14 Thread Daniel P. Berrange
This is a followup to https://www.redhat.com/archives/libvir-list/2012-September/msg00643.html As of QEMU 1.2 libvirt is supposed to stop parsing -help and instead use various QMP commands to detect capabilities. Before we can do this, the current QEMU capabilities code needs a serious cleanup

[libvirt] [PATCH 03/23] Remove probing of flags when launching QEMU guests

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Remove all use of the existing APIs for querying QEMU capability flags. Instead obtain a qemuCapsPtr object from the global cache. This avoids the execution of 'qemu -help' (and related commands) when launching new guests. Signed-off-by: Daniel P.

[libvirt] [PATCH 02/23] Switch over to use cache for building QEMU capabilities

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When building up a virCapsPtr instance, the QEMU driver was copying the list of machine types across from the previous virCapsPtr instance, if the QEMU binary had not changed. Replace this ad-hoc caching of data with use of the new qemuCapsCache global

[libvirt] [PATCH 15/23] Add a qemuMonitorGetCommands() method for QMP query-commands command

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a new qemuMonitorGetCPUCommands() method to support invocation of the 'query-cpu-definitions' JSON monitor command. No HMP equivalent is required, since this will only be used when JSON is available The existing qemuMonitorJSONCheckCommands()

[libvirt] [PATCH 22/23] Refactor qemuCapsParseDeviceStr to work from data tables

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the qemuCapsParseDeviceStr method has a bunch of open coded string searches/comparisons to detect devices and their properties. Soon this data will be obtained from QMP queries instead of -device help output. Maintaining the list of device

[libvirt] [PATCH 13/23] Add a qemuMonitorGetMachines() method for QMP query-machines command

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a new qemuMonitorGetMachines() method to support invocation of the 'query-machines' JSON monitor command. No HMP equivalent is required, since this will only be present for QEMU = 1.2 Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 08/23] Remove probing of CPU models when launching QEMU guests

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When launching a QEMU guest the binary is probed to discover the list of supported CPU names. Remove this probing with a simple lookup of CPU models in the qemuCapsPtr object. This avoids another invocation of the QEMU binary during the startup path.

[libvirt] [PATCH 17/23] Add a qemuMonitorGetObjectTypes() method for QMP qom-list-types command

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add a new qemuMonitorGetObjectTypes() method to support invocation of the 'qom-list' JSON monitor command. No HMP equivalent is required, since this will only be present for QEMU = 1.2 Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 01/23] Add a qemu capabilities cache manager

2012-09-14 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Introduce a qemuCapsCachePtr object to provide a global cache of capabilities for QEMU binaries. The cache auto-populates on first request for capabilities about a binary, and will auto-refresh if the binary has changed since a previous cache was

  1   2   >