[libvirt] [Concern] Whether some clock element stability need to be check before migration?

2013-04-16 Thread Xuesong Zhang
hi, This is xuesong from libvirt-QE, which is the feature owner of stable guest ABI in rhel7. I met one issue, but didn't know whether it is one bug or not, since in Guest ABI , some aspects belong to a host-side configuration parameter. So, would you please kindly help to check it? Thanks.

[libvirt] [PATCH 1/2] qemu: Support discard for disk

2013-04-16 Thread Osier Yang
QEMU introduced discard option for drive since commit a9384aff53, ... @var{discard} is one of ignore (or off) or unmap (or on) and controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap}) requests are ignored or passed to the filesystem. Some machine types may not support discard

[libvirt] [PATCH 2/2] conf: Fix the bug of disk-copy_on_read formating

2013-04-16 Thread Osier Yang
The reason for it's not exposed for such long time is that there is no xml2xml test for it. This fixes the bug and adds test. --- src/conf/domain_conf.c| 2 +- tests/qemuxml2argvdata/qemuxml2argv-disk-copy_on_read.xml | 14 +-

Re: [libvirt] [PATCH 3/7] qemu_agent: Add support for appending arrays to commands

2013-04-16 Thread Peter Krempa
On 04/16/13 00:53, Eric Blake wrote: On 04/15/2013 09:11 AM, Peter Krempa wrote: Add support for array elements for agent commands just like 64d5e815 did for monitor commands Always fun to see someone else using one of my commits as a starting point - the virtual pay day of open source

Re: [libvirt] [PATCH 1/7] lib: Fix docs about return value of virDomainGetVcpusFlags()

2013-04-16 Thread Peter Krempa
On 04/16/13 00:29, Eric Blake wrote: On 04/15/2013 09:11 AM, Peter Krempa wrote: The return value description stated that 0 is returned in case of success instead of the count of vCPUs. --- src/libvirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. Pushed. Thanks. Peter

Re: [libvirt] [PATCH v4 01/11] Add QMP probing for TPM

2013-04-16 Thread Daniel P. Berrange
On Mon, Apr 15, 2013 at 01:32:53PM -0400, Stefan Berger wrote: On 04/15/2013 12:56 PM, Daniel P. Berrange wrote: Guess you never tested this on a QEMU which lacked those commands. Probing capabilities now fails for any QEMU using QMP which lacks these commands Indeed, all the

Re: [libvirt] [PATCH 2/7] virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

2013-04-16 Thread Peter Krempa
On 04/16/13 00:44, Eric Blake wrote: On 04/15/2013 09:11 AM, Peter Krempa wrote: This patch factors out the vCPU count retrieval including fallback means into vshCPUCountCollect() and removes the duplicated code to retrieve individual counts. The --current flag (this flag is assumed by

Re: [libvirt] [PATCH] Check for QMP query-tpm-models

2013-04-16 Thread Daniel P. Berrange
On Mon, Apr 15, 2013 at 04:55:00PM -0400, Stefan Berger wrote: On 04/15/2013 04:15 PM, Eric Blake wrote: On 04/15/2013 01:49 PM, Stefan Berger wrote: Check for QMP query-tpm-models and set a capability flag. Do not use this QMP command if it is not supported. Signed-off-by: Stefan Berger

[libvirt] [PATCH 0/2] Suppress log message when using unsupported TPM QMP commands

2013-04-16 Thread Stefan Berger
Properly suppress log messages when using unsupported TPM QMP commands. Stefan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/2] Revert checking for QMP query-tpm-models

2013-04-16 Thread Stefan Berger
Revert the patch checking for the QMP query-tpm-models command. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_capabilities.c |7 --- src/qemu/qemu_capabilities.h |1 - 2 files changed, 8 deletions(-) Index: libvirt/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 2/2] Check for unsupported QMP command

2013-04-16 Thread Stefan Berger
Check for an unsupported QMP command when using the query-tpm-models and query-tpm-types commands before checking for general errors in order to avoid error messages in the log. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/qemu/qemu_monitor_json.c |6 +- 1 file

Re: [libvirt] [PATCH 5/6] syntax-check: Don't include duplicate header

2013-04-16 Thread Osier Yang
On 15/04/13 23:11, Eric Blake wrote: On 04/15/2013 12:28 AM, Osier Yang wrote: --- cfg.mk | 14 ++ 1 file changed, 14 insertions(+) diff --git a/cfg.mk b/cfg.mk index 394521e..9cf4cff 100644 --- a/cfg.mk +++ b/cfg.mk @@ -722,6 +722,20 @@ sc_prohibit_exit_in_tests:

[libvirt] USB pass-through with XEN

2013-04-16 Thread Carlos Rodrigues
Hello everybody, I try to doing USB pass-through with XEN hypervisor using libvirt and i get the following error: # virsh attach-device c6test /tmp/usb_device.xml error: Failed to attach device from /tmp/usb_device.xml error: unsupported configuration: unsupported device type # cat

Re: [libvirt] [PATCH 0/2] Suppress log message when using unsupported TPM QMP commands

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 06:37:07AM -0400, Stefan Berger wrote: Properly suppress log messages when using unsupported TPM QMP commands. ACK to both. Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o-

Re: [libvirt] [PATCH 0/2] Suppress log message when using unsupported TPM QMP commands

2013-04-16 Thread Stefan Berger
On 04/16/2013 06:54 AM, Daniel P. Berrange wrote: On Tue, Apr 16, 2013 at 06:37:07AM -0400, Stefan Berger wrote: Properly suppress log messages when using unsupported TPM QMP commands. ACK to both. Daniel Pushed -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] Fix compilation error in util/vircgroup.c

2013-04-16 Thread Stefan Berger
Fix the error util/vircgroup.c: In function 'virCgroupNewDomainPartition': util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow] Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/util/vircgroup.c |8 1 file

Re: [libvirt] [PATCH] Fix compilation error in util/vircgroup.c

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 07:11:20AM -0400, Stefan Berger wrote: Fix the error util/vircgroup.c: In function 'virCgroupNewDomainPartition': util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow] Signed-off-by: Stefan Berger

[libvirt] [PATCH v2] Fix compilation error in util/vircgroup.c

2013-04-16 Thread Stefan Berger
Fix the error util/vircgroup.c: In function 'virCgroupNewDomainPartition': util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow] Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- src/util/vircgroup.c |8 1 file

Re: [libvirt] [PATCH] Resolve valgrind error

2013-04-16 Thread John Ferlan
On 04/15/2013 12:49 PM, John Ferlan wrote: Commit id '1acfc171' resulted in the following valgrind failure: ==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4 ==25317==at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==25317==by

[libvirt] [PATCH] Fix build breaker with ATTRIBUTE_NONNULL defs

2013-04-16 Thread John Ferlan
Using ./autogen.sh --system lv_cv_static_analysis=yes for my daily Coverity builds resulted in the following error when building: In file included from util/vircgrouppriv.h:32:0, from util/vircgroup.c:44: util/vircgroup.h:59:5: error: nonnull argument with out-of-range operand

Re: [libvirt] [PATCH v2] Fix compilation error in util/vircgroup.c

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 07:25:38AM -0400, Stefan Berger wrote: Fix the error util/vircgroup.c: In function 'virCgroupNewDomainPartition': util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow] Signed-off-by: Stefan Berger

Re: [libvirt] [PATCH] Fix build breaker with ATTRIBUTE_NONNULL defs

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 07:24:43AM -0400, John Ferlan wrote: Using ./autogen.sh --system lv_cv_static_analysis=yes for my daily Coverity builds resulted in the following error when building: In file included from util/vircgrouppriv.h:32:0, from util/vircgroup.c:44:

Re: [libvirt] [PATCH v2] Fix compilation error in util/vircgroup.c

2013-04-16 Thread Stefan Berger
On 04/16/2013 07:47 AM, Daniel P. Berrange wrote: On Tue, Apr 16, 2013 at 07:25:38AM -0400, Stefan Berger wrote: Fix the error util/vircgroup.c: In function 'virCgroupNewDomainPartition': util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow]

Re: [libvirt] [PATCH] Check for QMP query-tpm-models

2013-04-16 Thread Eric Blake
On 04/16/2013 03:10 AM, Daniel P. Berrange wrote: On Mon, Apr 15, 2013 at 04:55:00PM -0400, Stefan Berger wrote: On 04/15/2013 04:15 PM, Eric Blake wrote: On 04/15/2013 01:49 PM, Stefan Berger wrote: Check for QMP query-tpm-models and set a capability flag. Do not use this QMP command if it

[libvirt] [PATCH 07/10] syntax-check: Include libvirt.h and virterror.h in form only in external tools

2013-04-16 Thread Osier Yang
With this patch, include libvirt.h and virterror.h in form is only allowed for internal.h. And only the external tools (examples|tools|python|include/libvirt) can include the two headers in form. --- cfg.mk | 30 ++

[libvirt] [PATCH 03/10] cleanup: Don't include libvirt/libvirt.h

2013-04-16 Thread Osier Yang
Which is already included by internal.h, later patch will add syntax-check to avoid it. --- src/nodeinfo.h | 1 - src/phyp/phyp_driver.c | 1 - src/remote/remote_protocol.x | 1 - src/util/virkeycode.h| 1 - 4 files changed, 4 deletions(-) diff --git a/src/nodeinfo.h

[libvirt] [PATCH 02/10] cleanup: Only include testutils.h once

2013-04-16 Thread Osier Yang
No reason to include it in both if and else branches. --- tests/domainsnapshotxml2xmltest.c | 4 ++-- tests/esxutilstest.c | 4 ++-- tests/lxcxml2xmltest.c| 4 ++-- tests/openvzutilstest.c | 4 ++-- tests/qemuargv2xmltest.c | 4 ++--

[libvirt] [PATCH 08/10] syntax-check: Don't include libvirt-{qemu, lxc}.h internally

2013-04-16 Thread Osier Yang
Like libvirt.h, these two public headers also shouldn't be included in internal source, except internal.h. A later patch will force tools to use form. --- cfg.mk | 20 daemon/remote.c| 2 -- src/libvirt-qemu.c | 1 - 3 files changed, 20 insertions(+), 3

[libvirt] [PATCH 04/10] cleanup: Don't include libvirt/virterror.h

2013-04-16 Thread Osier Yang
Which is already included in internal.h, later patch will add syntax-check to avoid it. --- src/remote/remote_driver.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/remote/remote_driver.h b/src/remote/remote_driver.h index 7288381..bd907c0 100644 --- a/src/remote/remote_driver.h +++

[libvirt] [PATCH 00/10 v2] Cleanup: About header including

2013-04-16 Thread Osier Yang
The public headers libvirt/libvirt.h, libvirt/virterror.h, libvirt/libvirt-qemu.h, and libvirt/libvirt-lxc.h shouldn't be included in internal source directly. Osier Yang (10): cleanup: Remove the duplicate header cleanup: Only include testutils.h once cleanup: Don't include

[libvirt] [PATCH 05/10] syntax-check: Don't include duplicate header

2013-04-16 Thread Osier Yang
Except gnulib... --- cfg.mk | 22 ++ 1 file changed, 22 insertions(+) diff --git a/cfg.mk b/cfg.mk index e60c4e3..71f7ee4 100644 --- a/cfg.mk +++ b/cfg.mk @@ -722,6 +722,28 @@ sc_prohibit_exit_in_tests: halt='use return, not exit(), in tests' \

[libvirt] [PATCH 09/10] syntax-check: Include libvirt-{qemu, lxc}.h in form only in external tools

2013-04-16 Thread Osier Yang
Including libvirt-{qemu,lxc}.h in form is only allowed for internal.h now, and form is only allowed for external tools. --- cfg.mk| 38 ++ tools/virsh.c | 4 ++-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/cfg.mk b/cfg.mk index

[libvirt] [PATCH 06/10] syntax-check: Don't include libvirt.h and virterror.h in form

2013-04-16 Thread Osier Yang
Directories python/tools/examples should include them in form, though this patch allows form in these directories by excluding them, a later patch will do the cleanup. --- cfg.mk | 20 1 file changed, 20 insertions(+) diff --git a/cfg.mk b/cfg.mk index 71f7ee4..cb8079c

Re: [libvirt] [PATCH 6/6] syntax-check: Don't include libvirt.h and virterror.h

2013-04-16 Thread Osier Yang
On 15/04/13 23:18, Eric Blake wrote: On 04/15/2013 12:28 AM, Osier Yang wrote: Except for internal.h and the public headers --- cfg.mk | 20 1 file changed, 20 insertions(+) diff --git a/cfg.mk b/cfg.mk index 9cf4cff..0f07abd 100644 --- a/cfg.mk +++ b/cfg.mk @@ -736,6

[libvirt] [PATCH 10/10] docs: Update hacking

2013-04-16 Thread Osier Yang
To tell libvirt-{qemu,lxc}.h shouldn't be included either. --- docs/hacking.html.in | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/hacking.html.in b/docs/hacking.html.in index 7ef826c..67af5c2 100644 --- a/docs/hacking.html.in +++ b/docs/hacking.html.in @@

[libvirt] [PATCH 01/10] cleanup: Remove the duplicate header

2013-04-16 Thread Osier Yang
Detected by a simple Shell script: for i in $(find -type f -name *.[ch] | grep -v gnulib); do awk 'BEGIN { FS= fail=0 } /^# *include.*\.h[]$/{ arr[$NF]++ } END { for (key in arr) { if (arr[key] 1) { fail=1

Re: [libvirt] [PATCH 0/5] VirtualBox version 4.2 support for libvirt vbox driver

2013-04-16 Thread Manuel VIVES
Peter Krempa pkrempa at redhat.com writes: On 10/02/12 11:00, ryan woodsmall wrote: This patch set adds VirtualBox 4.2 initial support for the libvirt vbox driver. I've tested enough to check capabilities, create a VM, destroy it, etc. Five patches total: - Patch 1 is the C API

[libvirt] [PATCHv2 0/6] Add support for guest-agent based cpu hot(un)plug

2013-04-16 Thread Peter Krempa
This version contains fixes requested by Eric on patches 1/6, 3/6 and 4/6. Patch 2/6 is new in the series. I tweaked some details in 5/6 and 6/6 but they weren't reviewed in version 1. Changes are described in the patches themselves. Peter Krempa (6): virsh-domain: Refactor cmdVcpucount and

[libvirt] [PATCHv2 6/6] qemu: Implement support for VIR_DOMAIN_VCPU in qemuDomainSetVcpusFlags

2013-04-16 Thread Peter Krempa
This patch adds support for agent-based cpu disabling and enabling to qemuDomainSetVcpusFlags() API. --- Notes: Version 2: - produce error message if setting of vcpus fails midways src/qemu/qemu_driver.c | 129 - 1 file changed, 116

[libvirt] [PATCHv2 1/6] virsh-domain: Refactor cmdVcpucount and fix output on inactive domains

2013-04-16 Thread Peter Krempa
This patch factors out the vCPU count retrieval including fallback means into vshCPUCountCollect() and removes the duplicated code to retrieve individual counts. The --current flag (this flag is assumed by default) now works also with --maximum or --active without the need to explicitly specify

[libvirt] [PATCHv2 4/6] API: Introduce VIR_DOMAIN_VCPU_AGENT, for agent based CPU hot(un)plug

2013-04-16 Thread Peter Krempa
This flag will allow to use qemu guest agent commands to disable (offline) and enable (online) processors in a live guest that has the guest agent running. --- Notes: Version 2: - improve api docs - reject _MAXIMUM and _AGENT to the setter func - break long line

[libvirt] [PATCHv2 3/6] qemu_agent: Introduce helpers for agent based CPU hot(un)plug

2013-04-16 Thread Peter Krempa
The qemu guest agent allows to online and offline CPUs from the perspective of the guest. This patch adds helpers that call 'guest-get-vcpus' and 'guest-set-vcpus' guest agent functions and convert the data for internal libvirt usage. --- Notes: Version 2: - cache json array size instead

[libvirt] [PATCHv2 2/6] conf: Reword error message to be more universal

2013-04-16 Thread Peter Krempa
The error message that warns user when a request to chagne/get persistent configuration of a transient domain is requested suggests that changes are being made. Reword it to be more universal and allow it to be used for getter APIs too. Before: $ virsh vcpucount transient-domain --config error:

[libvirt] patch request

2013-04-16 Thread Thierry Parmentelat
Just in case this is useful, I'd like to submit this change below that was not present at least in 1.0.4 http://git.onelab.eu/?p=libvirt.git;a=blob;f=virgetlasterror.patch;h=9109d581256f35bca7b4e6b1b70cef4433413474;hb=HEAD I'd taken this hint here in the first place

[libvirt] [PATCHv2 5/6] qemu: Implement request of vCPU state using the guest agent

2013-04-16 Thread Peter Krempa
This patch implements the VIR_DOMAIN_VCPU_AGENT flag for the qemuDomainGetVcpusFlags() libvirt API implementation. --- Notes: Version 2: - use job type QUERY instead of MODIFY src/qemu/qemu_driver.c | 60 ++ 1 file changed, 56

Re: [libvirt] patch request

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 04:01:54PM +0200, Thierry Parmentelat wrote: Just in case this is useful, I'd like to submit this change below that was not present at least in 1.0.4 http://git.onelab.eu/?p=libvirt.git;a=blob;f=virgetlasterror.patch;h=9109d581256f35bca7b4e6b1b70cef4433413474;hb=HEAD

Re: [libvirt] [PATCHv2 2/6] conf: Reword error message to be more universal

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 04:00:08PM +0200, Peter Krempa wrote: The error message that warns user when a request to chagne/get persistent configuration of a transient domain is requested suggests that changes are being made. Reword it to be more universal and allow it to be used for getter APIs

Re: [libvirt] Google Summer of Code 2013 ideas wiki open

2013-04-16 Thread harryxiyou
On Tue, Apr 16, 2013 at 12:22 AM, Eric Blake ebl...@redhat.com wrote: On 04/15/2013 09:16 AM, harryxiyou wrote: I could be if you want, but the question is which project you are focusing on? This one or the renaming APIs? And as far as I got from the wiki page, we generally don't want the

Re: [libvirt] Google Summer of Code 2013 ideas wiki open

2013-04-16 Thread harryxiyou
On Tue, Apr 16, 2013 at 10:39 PM, harryxiyou harryxi...@gmail.com wrote: On Tue, Apr 16, 2013 at 12:22 AM, Eric Blake ebl...@redhat.com wrote: On 04/15/2013 09:16 AM, harryxiyou wrote: I could be if you want, but the question is which project you are focusing on? This one or the renaming APIs?

Re: [libvirt] QEMU/KVM support for non zero PCI domain

2013-04-16 Thread Charles Peri
Hi Laine, Here are the information you have requested: 1) What is your Linux distro and version RHEL 6.1 - 2.6.32-131.0.15.el6.x86_64 2) what version of qemu/kvm do you have [root@uv2 qemu]# /usr/libexec/qemu-kvm -version QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c)

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-16 Thread Laine Stump
On 04/15/2013 05:58 PM, Michael S. Tsirkin wrote: On Mon, Apr 15, 2013 at 11:27:03AM -0600, Alex Williamson wrote: On Fri, 2013-04-12 at 11:46 -0400, Laine Stump wrote: On 04/11/2013 07:23 AM, Michael S. Tsirkin wrote: On Thu, Apr 11, 2013 at 07:03:56AM -0400, Laine Stump wrote: On 04/10/2013

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-16 Thread Laine Stump
On 04/15/2013 06:14 PM, Don Dutile wrote: On 04/15/2013 04:09 PM, Laine Stump wrote: On 04/15/2013 06:29 AM, Daniel P. Berrange wrote: On Fri, Apr 12, 2013 at 11:46:15AM -0400, Laine Stump wrote: On 04/11/2013 07:23 AM, Michael S. Tsirkin wrote: On Thu, Apr 11, 2013 at 07:03:56AM -0400, Laine

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 12:35:29PM -0400, Laine Stump wrote: On 04/15/2013 06:14 PM, Don Dutile wrote: On 04/15/2013 04:09 PM, Laine Stump wrote: On 04/15/2013 06:29 AM, Daniel P. Berrange wrote: On Fri, Apr 12, 2013 at 11:46:15AM -0400, Laine Stump wrote: On 04/11/2013 07:23 AM, Michael

Re: [libvirt] new libvirt pci controller type and pcie/q35 (was Re: [PATCH 4/7] add pci-bridge controller type)

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 12:05:40PM -0400, Laine Stump wrote: On 04/15/2013 05:58 PM, Michael S. Tsirkin wrote: On Mon, Apr 15, 2013 at 11:27:03AM -0600, Alex Williamson wrote: On Fri, 2013-04-12 at 11:46 -0400, Laine Stump wrote: On 04/11/2013 07:23 AM, Michael S. Tsirkin wrote: it's

Re: [libvirt] [PATCHv2 4/6] API: Introduce VIR_DOMAIN_VCPU_AGENT, for agent based CPU hot(un)plug

2013-04-16 Thread Daniel P. Berrange
On Tue, Apr 16, 2013 at 04:00:10PM +0200, Peter Krempa wrote: This flag will allow to use qemu guest agent commands to disable (offline) and enable (online) processors in a live guest that has the guest agent running. How do guest CPU offline/online state changes relate to the offline/online

Re: [libvirt] [PATCHv3] Support for static routes on a virtual bridge

2013-04-16 Thread Laine Stump
On 04/11/2013 08:11 AM, Gene Czarcinski wrote: This patch adds support for adding a static route for a network. The gateway sub-element specifies the gateway's IP address. Both IPv4 and IPv6 static routes are supported although it is expected that this functionality will have more use with

Re: [libvirt] [PATCH 4/7] add pci-bridge controller type

2013-04-16 Thread Laine Stump
On 04/03/2013 11:50 AM, Ján Tomko wrote: From: liguang lig.f...@cn.fujitsu.com add a new controller type, then one can define a pci-bridge controller like this: controller type='pci-bridge' index='0'/ controller type='pci-bridge' index='1' address type='pci' domain='0x'

[libvirt] [PATCH 2/2] qemu: Implement validation for max-cpu in XML

2013-04-16 Thread Michal Novotny
Check whether vcpu setting or maxvcpu settings exceeds number of maximum cpus for selected machine type on virDomainDefineXML() and virDomainCreateXML() API calls or not. Signed-off-by: Michal Novotny minov...@redhat.com --- src/qemu/qemu_driver.c | 30 ++ 1 file

[libvirt] [PATCH 0/2] Add cpu-max to capabilities and implement checks

2013-04-16 Thread Michal Novotny
Add cpu-max to capabilities XML output for newer QEMU and implement checks whether the number of vCPUs/maximum vCPUS doesn't exceed machine limit. For older versions of QEMU cpu-max field is not present so the cpu-max is set to 0 to disable checking and act the same as without this patch.

[libvirt] [PATCH 1/2] cpu-max: Implement cpu-max attribute into capabilities XML output

2013-04-16 Thread Michal Novotny
Implement the cpu-max attribute into virConnectGetCapabilities() API output to allow caller to check maximum number of CPUs to be set for specified machine type. Signed-off-by: Michal Novotny minov...@redhat.com --- docs/schemas/capability.rng | 5 + src/conf/capabilities.c | 4

Re: [libvirt] [PATCH 02/10] cleanup: Only include testutils.h once

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: No reason to include it in both if and else branches. --- tests/domainsnapshotxml2xmltest.c | 4 ++-- tests/esxutilstest.c | 4 ++-- tests/lxcxml2xmltest.c| 4 ++-- tests/openvzutilstest.c | 4 ++--

Re: [libvirt] [PATCH 01/10] cleanup: Remove the duplicate header

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Detected by a simple Shell script: for i in $(find -type f -name *.[ch] | grep -v gnulib); do You can limit things to version-controlled files a bit faster with: for i in $(git ls-files -- '*.[ch]'); do awk 'BEGIN { FS=

Re: [libvirt] [PATCH 03/10] cleanup: Don't include libvirt/libvirt.h

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Which is already included by internal.h, later patch will add syntax-check to avoid it. --- ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital

Re: [libvirt] [PATCH 04/10] cleanup: Don't include libvirt/virterror.h

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Which is already included in internal.h, later patch will add syntax-check to avoid it. --- src/remote/remote_driver.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/remote/remote_driver.h b/src/remote/remote_driver.h index

Re: [libvirt] [PATCH 03/10] cleanup: Don't include libvirt/libvirt.h

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Which is already included by internal.h, later patch will add syntax-check to avoid it. --- +++ b/src/nodeinfo.h @@ -24,7 +24,6 @@ #ifndef __VIR_NODEINFO_H__ # define __VIR_NODEINFO_H__ -# include libvirt/libvirt.h # include capabilities.h

Re: [libvirt] [PATCH 05/10] syntax-check: Don't include duplicate header

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Except gnulib... --- cfg.mk | 22 ++ 1 file changed, 22 insertions(+) diff --git a/cfg.mk b/cfg.mk index e60c4e3..71f7ee4 100644 --- a/cfg.mk +++ b/cfg.mk @@ -722,6 +722,28 @@ sc_prohibit_exit_in_tests: halt='use

Re: [libvirt] [PATCH 06/10] syntax-check: Don't include libvirt.h and virterror.h in form

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: Directories python/tools/examples should include them in form, though this patch allows form in these directories by excluding them, a later patch will do the cleanup. --- cfg.mk | 20 1 file changed, 20 insertions(+) +#

Re: [libvirt] [PATCH 07/10] syntax-check: Include libvirt.h and virterror.h in form only in external tools

2013-04-16 Thread Eric Blake
On 04/16/2013 07:41 AM, Osier Yang wrote: With this patch, include libvirt.h and virterror.h in form is only allowed for internal.h. And only the external tools (examples|tools|python|include/libvirt) can include the two headers in form. --- Hmm. It sounds like you want two syntax checks