Re: [libvirt] [PATCH v2] Add two NUMA tuning python bindings APIs

2012-01-25 Thread Guan Nan Ren
- Original Message - From: Eric Blake ebl...@redhat.com To: Guan Nan Ren g...@redhat.com Cc: libvir-list@redhat.com Sent: Tuesday, January 24, 2012 8:56:30 PM Subject: Re: [libvirt] [PATCH v2] Add two NUMA tuning python bindings APIs On 01/24/2012 05:07 AM, Guan Nan Ren wrote: static

Re: [libvirt] [PATCH] qemu: Emit bootindex even for direct boot

2012-01-25 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 15:59:10 -0700, Eric Blake wrote: On 01/24/2012 03:53 PM, Jiri Denemark wrote: Direct boot (using kernel, initrd, and command line) is used by virt-install/virt-manager for network install. While any bootindex has no direct effect since -kernel is always first, we

Re: [libvirt] [PATCH] lxc: export container=lxc-libvirt for systemd

2012-01-25 Thread Daniel P. Berrange
On Tue, Jan 24, 2012 at 11:53:38AM -0700, Eric Blake wrote: Systemd detects containers based on whether they have an environment variable starting with 'container=lxc'; using a longer name fits the expectations, while also allowing detection of who created the container. Requested by

Re: [libvirt] [PATCH v2 0/3] Use guest agent to quiesce disks

2012-01-25 Thread Jiri Denemark
On Tue, Jan 24, 2012 at 21:21:32 +0100, Michal Privoznik wrote: Since we have qemu guest agent support in libvirt, we can start wiring up some things that GA already knows how to do. One of them is file system freeze and thaw. Domain snapshots can profit from this functionality. Michal

Re: [libvirt] [PATCH v2 0/3] Use guest agent to quiesce disks

2012-01-25 Thread Michal Privoznik
On 25.01.2012 11:02, Jiri Denemark wrote: On Tue, Jan 24, 2012 at 21:21:32 +0100, Michal Privoznik wrote: Since we have qemu guest agent support in libvirt, we can start wiring up some things that GA already knows how to do. One of them is file system freeze and thaw. Domain snapshots can

[libvirt] Memory leak on list_domains

2012-01-25 Thread Carlos Rodrigues
Hi, I have some problems on my application with memory leak when call list_domains method. I'm using libvirt 0.8.3 and Sys::Virt 0.2.4 Perl Module. Does anyone have any idea what's the problem? Regards, -- Carlos Rodrigues c...@eurotux.com Eurotux Informática, S.A. [http://eurotux.com]

Re: [libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

2012-01-25 Thread Michal Privoznik
On 23.01.2012 14:30, Jiri Denemark wrote: We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for both. --- include/libvirt/libvirt.h.in |

Re: [libvirt] [PATCH 1/4] virDomainIOError public API and remote protocol

2012-01-25 Thread Michal Privoznik
On 25.01.2012 12:04, Michal Privoznik wrote: On 23.01.2012 14:30, Jiri Denemark wrote: We already provide ways to detect when a domain has been paused as a result of I/O error, but there was no way of getting the exact error or even the device that experienced it. This new API may be used for

Re: [libvirt] [PATCH 2/4] virsh: Implement domioerror command

2012-01-25 Thread Michal Privoznik
On 23.01.2012 14:30, Jiri Denemark wrote: --- tools/virsh.c | 111 +++ tools/virsh.pod | 11 + 2 files changed, 122 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index d635b56..92029fd 100644 ---

Re: [libvirt] [PATCH 4/4] qemu: Implement virDomainIOError

2012-01-25 Thread Michal Privoznik
On 23.01.2012 14:30, Jiri Denemark wrote: --- src/qemu/qemu_conf.h |1 + src/qemu/qemu_driver.c | 82 ++ src/qemu/qemu_monitor.c | 40 src/qemu/qemu_monitor.h |1 +

[libvirt] [PATCH v2 0/5] Introduce sVirt to LXC driver

2012-01-25 Thread Daniel P. Berrange
This is an update of https://www.redhat.com/archives/libvir-list/2012-January/msg00418.html Changes since v1: - Pushed the first 2 patches which passed review - Update to include all Eric's suggested changes - Rebase to latest GIT master -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH v2 4/5] Add support for sVirt in the LXC driver

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com For the sake of backwards compat, LXC guests are *not* confined by default. This is because it is not practical to dynamically relabel containers using large filesystem trees. Applications can create confined containers though, by giving suitable XML

[libvirt] [PATCH v2 1/5] Revert changes to sec label parsing

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Revert parsing changes: commit 302fe95ffa1bc5f1c61c0beb31a1adfbc38c668e Author: Eric Blake ebl...@redhat.com Date: Wed Jan 4 16:01:24 2012 -0700 seclabel: fix regression in libvirtd restart commit

[libvirt] [PATCH v2 5/5] Set a security context on /dev and /dev/pts mounts

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To allow the container to access /dev and /dev/pts when under sVirt, set an explicit mount option. Also set a max size on the /dev mount to prevent DOS on memory usage * src/lxc/lxc_container.c: Set /dev mount context * src/lxc/lxc_controller.c: Set

[libvirt] [PATCH v2 3/5] Add two new security label types

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Curently security labels can be of type 'dynamic' or 'static'. If no security label is given, then 'dynamic' is assumed. The current code takes advantage of this default, and avoids even saving seclabel elements with type='dynamic' to disk. This means

[libvirt] [PATCH v2 2/5] Re-add domain device seclabel parsing / formatting

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This re-introduces parsing formatting for per device seclabels. There is a new virDomainDeviceSeclabelPtr struct and corresponding APIs for parsing/formatting. --- src/conf/domain_conf.c | 132 ++--

Re: [libvirt] [PATCH v2 3/3] nwfilter: Rebuild filters only if new filter is different than current

2012-01-25 Thread Stefan Berger
On 01/23/2012 04:59 PM, Eric Blake wrote: On 01/18/2012 09:20 AM, Stefan Berger wrote: Compare two filter definitions for equality and only rebuild/instantiate the new filter if the two filters are found to be different. This improves performance during an update of a filter with no obvious

[libvirt] [PATCH] Add missing docs for viridian/ feature flag

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com --- docs/formatdomain.html.in |4 docs/schemas/domaincommon.rng |5 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index dfb010d..1d0211d 100644 ---

[libvirt] [PATCH] Add support for forcing a private network namespace for LXC guests

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If no interface elements are included in an LXC guest XML description, then the LXC guest will just see the host's network interfaces. It is desirable to be able to hide the host interfaces, without having to define any guest interfaces. This patch

Re: [libvirt] [PATCH] Add missing docs for viridian/ feature flag

2012-01-25 Thread Eric Blake
On 01/25/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com --- docs/formatdomain.html.in |4 docs/schemas/domaincommon.rng |5 + 2 files changed, 9 insertions(+), 0 deletions(-) ACK. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 0/5 0/1 0/1 V3] Add new public API virDomainGetPcpusUsage() and pcpuinfo command in virsh

2012-01-25 Thread Richard W.M. Jones
Is there a later version of this patch than V3? This _needs_ to be accepted into libvirt 0.9.10 (ie. in 2 days) in order for us to get this into RHEL 6.3. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com

Re: [libvirt] Using Libvirt to change the bridge a virtual network card of a running vm is connected to

2012-01-25 Thread Hendrik Schwartke
I wrote a patch to change the mapping between a virtual bridge interface and the host bridge while the host is up. It's based on commit 6fba577e505611e6c25c68e322942eab7754de7e. The host and the interface definition I used for testing are also attached. I would be glad if the patch could be

Re: [libvirt] [PATCH] lxc: export container=lxc-libvirt for systemd

2012-01-25 Thread Serge Hallyn
Quoting Daniel P. Berrange (berra...@redhat.com): On Tue, Jan 24, 2012 at 11:53:38AM -0700, Eric Blake wrote: Systemd detects containers based on whether they have an environment variable starting with 'container=lxc'; using a longer name fits the expectations, while also allowing

Re: [libvirt] [PATCH] schema: Relax schema for domain name

2012-01-25 Thread Peter Krempa
On 01/23/2012 07:09 PM, Daniel P. Berrange wrote: On Mon, Jan 23, 2012 at 06:53:17PM +0100, Peter Krempa wrote: The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. --- And

Re: [libvirt] [PATCH] Add support for forcing a private network namespace for LXC guests

2012-01-25 Thread Eric Blake
On 01/25/2012 07:35 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If no interface elements are included in an LXC guest XML description, then the LXC guest will just see the host's network interfaces. It is desirable to be able to hide the host interfaces,

[libvirt] [PATCHv2] schema: Relax schema for domain name

2012-01-25 Thread Peter Krempa
The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. The only invalid character is a newline. --- docs/schemas/domaincommon.rng |2 +- 1 files changed, 1 insertions(+), 1

Re: [libvirt] [PATCH] lxc: export container=lxc-libvirt for systemd

2012-01-25 Thread Eric Blake
On 01/25/2012 08:18 AM, Serge Hallyn wrote: Quoting Daniel P. Berrange (berra...@redhat.com): On Tue, Jan 24, 2012 at 11:53:38AM -0700, Eric Blake wrote: Systemd detects containers based on whether they have an environment variable starting with 'container=lxc'; using a longer name fits the

Re: [libvirt] [PATCHv2] schema: Relax schema for domain name

2012-01-25 Thread Eric Blake
On 01/25/2012 08:49 AM, Peter Krempa wrote: The domain schema enforced restrictions on the domain name string that the code doesn't. This patch relaxes the check, leaving the restrictions on the driver or hypervisor. The only invalid character is a newline. --- docs/schemas/domaincommon.rng

Re: [libvirt] [PATCH] Replace hashing algorithm with murmurhash

2012-01-25 Thread Daniel P. Berrange
On Wed, Jan 18, 2012 at 11:34:16AM -0700, Eric Blake wrote: On 01/18/2012 09:23 AM, Daniel P. Berrange wrote: @@ -1636,9 +1637,10 @@ cleanup: } -static unsigned long virCgroupPidCode(const void *name) +static int32_t virCgroupPidCode(const void *name, int32_t seed) { -

[libvirt] [PATCH 2/4] Convert various virHash functions to use size_t / uint32

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com In preparation for conversion over to use the Murmurhash3 algorithm, convert various virHash APIs to use size_t or uint32 for their return values/parameters, instead of the variable size 'unsigned long' or 'int' types --- src/util/cgroup.c |4 +-

[libvirt] [PATCH v2 0/4] Update the hash table algorithm

2012-01-25 Thread Daniel P. Berrange
This is a followup to https://www.redhat.com/archives/libvir-list/2012-January/msg00734.html Changes in v2: - Replace virRandom with virRandomBits as per Eric's suggested impl - Move virRandom* functions to virrandom.{c,h} - Move virHash impl to virhash.{c,h} - Remove use of le32toh()

[libvirt] [PATCH 1/4] Introduce new API for generating random numbers

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The old virRandom() API was not generating good random numbers. Replace it with a new API virRandomBits which instead of being told the upper limit, gets told the number of bits of randomness required. * src/util/virrandom.c, src/util/virrandom.h: Add

[libvirt] [PATCH 4/4] Replace hashing algorithm with murmurhash

2012-01-25 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Recent discussions have illustrated the potential for DOS attacks with the hash table implementations used by most languages and libraries. https://lwn.net/Articles/474912/ libvirt has an internal hash table impl, and uses hash tables for a

Re: [libvirt] [PATCH] Replace hashing algorithm with murmurhash

2012-01-25 Thread Eric Blake
On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: -static unsigned long virCgroupPidCode(const void *name) +static int32_t virCgroupPidCode(const void *name, int32_t seed) { -return (unsigned long)name; +unsigned long pid = (unsigned long)name; +return virHashCodeGen(pid,

[libvirt] [PATCH 2/6] conf: put hostdev subsys data into a struct for easier re-use

2012-01-25 Thread Laine Stump
When interface is expanded to allow passthrough with extra dev-dependent network interface info, the host-side address of the device will need to be added to virDomainNetDef. It will be much simpler if this is done with a common typedefed struct rather than inlining the same struct stuff. ---

[libvirt] [PATCH 5/6] qemu: (and conf) support rombar for network devices

2012-01-25 Thread Laine Stump
When support for the rombar option was added, it was only added for PCI passthrough devices, configured with hostdev. The same option is available for any network device that is attached to the guest's PCI bus. This patch allows setting rombar for any PCI network device type. After adding cases

[libvirt] [PATCH 0/6] qemu: add suport for romfile, and associated cleanups

2012-01-25 Thread Laine Stump
This patchset started out as cleanup to make it easier to add in support for doing PCI passthrough via the interface element (to be used to attach a host network device to a guest after performing some network-device-specific setup), but turned out to also make it much easier to add support for

[libvirt] [PATCH 1/6] conf: remove duplicate call to VIR_FREE(info-alias)

2012-01-25 Thread Laine Stump
There is another identical call 4 lines up in the same function. --- src/conf/domain_conf.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e872396..471b0a2 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 6/6] qemu: add suport for romfile option to specify device boot ROM

2012-01-25 Thread Laine Stump
This patch addresses: https://bugzilla.redhat.com/show_bug.cgi?id=781562 Along with the rombar option that controls whether or not a boot rom is made visible to the guest, qemu also has a romfile option that allows specifying a binary file to present as the ROM BIOS of any emulated or passthrough

[libvirt] [PATCH 4/6] conf: relocate rombar and boot order parse/format

2012-01-25 Thread Laine Stump
Since these two items are now in the virDomainDeviceInfo struct, it makes sense to parse/format them in the functions written to parse/format that structure. Not all types of devices allow them, so two internal flags are added to indicate when it is appropriate to do so. I was lucky - only one

Re: [libvirt] [PATCH] Replace hashing algorithm with murmurhash

2012-01-25 Thread Daniel P. Berrange
On Wed, Jan 25, 2012 at 09:55:25AM -0700, Eric Blake wrote: On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: -static unsigned long virCgroupPidCode(const void *name) +static int32_t virCgroupPidCode(const void *name, int32_t seed) { -return (unsigned long)name; +unsigned long

Re: [libvirt] [PATCH] Replace hashing algorithm with murmurhash

2012-01-25 Thread Eric Blake
On 01/25/2012 09:55 AM, Eric Blake wrote: + +return le32toh(r); endian.h, and thus le32toh(), is not yet standardized (although POSIX will be adding it in the future), nor is it currently provided by gnulib. We'd have to get that fixed first. The le32toh call was only here because the

[libvirt] [PATCH] storage: Fix any VolLookupByPath if we have an empty logical pool

2012-01-25 Thread Cole Robinson
On F16 at least, empty volume groups don't have a directory under /dev. The directory only appears once a logical volume is created. This tickles some behavior in BackendStablePath which ends with libvirt sleeping for 5 seconds while waiting for the directory to appear. This causes all sorts of

Re: [libvirt] [PATCH 1/4] Introduce new API for generating random numbers

2012-01-25 Thread Eric Blake
On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The old virRandom() API was not generating good random numbers. Replace it with a new API virRandomBits which instead of being told the upper limit, gets told the number of bits of randomness

Re: [libvirt] [PATCH] storage: Fix any VolLookupByPath if we have an empty logical pool

2012-01-25 Thread Eric Blake
On 01/25/2012 11:15 AM, Cole Robinson wrote: On F16 at least, empty volume groups don't have a directory under /dev. The directory only appears once a logical volume is created. This tickles some behavior in BackendStablePath which ends with libvirt sleeping for 5 seconds while waiting for

Re: [libvirt] [PATCH 2/4] Convert various virHash functions to use size_t / uint32

2012-01-25 Thread Eric Blake
On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In preparation for conversion over to use the Murmurhash3 algorithm, convert various virHash APIs to use size_t or uint32 for their return values/parameters, instead of the variable size 'unsigned

Re: [libvirt] [PATCH 3/4] Rename hash.h and hash.c to virhash.h and virhash.c

2012-01-25 Thread Eric Blake
On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In preparation for the patch to include Murmurhash3, which introduces a virhashcode.h and virhashcode.c files, rename the existing hash.h and hash.c to virhash.h and virhash.c respectively. ---

Re: [libvirt] [PATCH 3/4] Rename hash.h and hash.c to virhash.h and virhash.c

2012-01-25 Thread Eric Blake
On 01/25/2012 11:44 AM, Eric Blake wrote: On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In preparation for the patch to include Murmurhash3, which introduces a virhashcode.h and virhashcode.c files, rename the existing hash.h and hash.c to

Re: [libvirt] [PATCH] storage: Fix any VolLookupByPath if we have an empty logical pool

2012-01-25 Thread Cole Robinson
On 01/25/2012 01:23 PM, Eric Blake wrote: On 01/25/2012 11:15 AM, Cole Robinson wrote: On F16 at least, empty volume groups don't have a directory under /dev. The directory only appears once a logical volume is created. This tickles some behavior in BackendStablePath which ends with libvirt

[libvirt] [PATCH libvirt] Add missing virGetGroupName()

2012-01-25 Thread Marc-André Lureau
Add missing function if !HAVE_GETPWUID_R. --- src/util/util.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index c00c2f9..33bcf29 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -2471,6 +2471,15 @@ virSetUIDGID(uid_t uid

[libvirt] [PATCH v3 0/2] nwfilter: Compare filters for equality when updating

2012-01-25 Thread Stefan Berger
When a filter is updated, compare it and the original one for equality so that unnecessary instantiations of rules can be avoided. v3: - introducing a function to instantiate all running VMs' filters; call it upon nwfilter driver reload - reworked function comparing filters; determining

[libvirt] [PATCH v3 2/2] nwfilter: Rebuild filters only if new filter is different than current

2012-01-25 Thread Stefan Berger
Compare two filters' XML for equality and only rebuild/instantiate the new filter if the new and current filters are found to be different. This improves performance during an update of a filter with no obvious change or the reloading of filters during a 'kill -SIGHUP' ---

[libvirt] [PATCH v3 1/2] nwfilter: Force instantiation of filters upon driver reload

2012-01-25 Thread Stefan Berger
Introduce a function that rebuilds all running VMs' filters. Call this function when reloading the nwfilter driver. This addresses a problem introduced by the 2nd patch that typically causes no filters to be reinstantiate anymore upon driver reload since their XML has not changed. Yet the current

Re: [libvirt] [PATCH 4/4] Replace hashing algorithm with murmurhash

2012-01-25 Thread Eric Blake
On 01/25/2012 09:38 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Recent discussions have illustrated the potential for DOS attacks with the hash table implementations used by most languages and libraries. https://lwn.net/Articles/474912/ libvirt has an

Re: [libvirt] [PATCH libvirt] Add missing virGetGroupName()

2012-01-25 Thread Eric Blake
On 01/25/2012 11:54 AM, Marc-André Lureau wrote: Add missing function if !HAVE_GETPWUID_R. --- src/util/util.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index c00c2f9..33bcf29 100644 --- a/src/util/util.c +++

[libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Marc-André Lureau
windows.h is included by threads.h. winsock2.h should be included before. Avoid the following warning: In file included from ../gnulib/lib/unistd.h:51:0, from ../src/util/util.h:30, from rpc/virkeepalive.c:29:

[libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Marc-André Lureau
Define PID_FORMAT and fix warnings for mingw64 x86_64 build. Unfortunately, gnu_printf attribute check expect %lld while normal printf is PRId64. So one warning remains. --- src/rpc/virnetsocket.c |4 ++-- src/util/command.c | 10 +- src/util/util.h|8

[libvirt] [PATCH libvirt 6/6] Cast timeval.tv_sec long to localtime expected type time_t

2012-01-25 Thread Marc-André Lureau
--- tools/virsh.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 41c..246e638 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3703,7 +3703,7 @@ vshGenFileName(vshControl *ctl, virDomainPtr dom, const char *mime) /* add

Re: [libvirt] [PATCH v3 1/2] nwfilter: Force instantiation of filters upon driver reload

2012-01-25 Thread Eric Blake
On 01/25/2012 11:58 AM, Stefan Berger wrote: Introduce a function that rebuilds all running VMs' filters. Call this function when reloading the nwfilter driver. This addresses a problem introduced by the 2nd patch that typically causes no filters to be reinstantiate anymore upon driver

Re: [libvirt] [PATCH 1/4] add a qemu-specific event register API, to passthough the new events come from qemu

2012-01-25 Thread Eric Blake
On 12/16/2011 09:58 AM, shao...@linux.vnet.ibm.com wrote: From: ShaoHe Feng shao...@linux.vnet.ibm.com Basically, this feature can go along with qemu monitor passthrough. That way, if we use new commands in the monitor that generate new events, we want some way to receive those new events

Re: [libvirt] [PATCH v3 2/2] nwfilter: Rebuild filters only if new filter is different than current

2012-01-25 Thread Eric Blake
On 01/25/2012 11:58 AM, Stefan Berger wrote: Compare two filters' XML for equality and only rebuild/instantiate the new filter if the new and current filters are found to be different. This improves performance during an update of a filter with no obvious change or the reloading of filters

Re: [libvirt] [PATCH libvirt 1/6] errcode is typedef by mingw, rename an argument name

2012-01-25 Thread Eric Blake
On 01/25/2012 01:13 PM, Marc-André Lureau wrote: Fixes the following warning: util/virterror.c:1242:31: warning: declaration of 'errcode' shadows a global declaration [-Wshadow] Which header is polluting the namespace with a non-standard name? --- src/util/virterror.c |8 1

Re: [libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Eric Blake
On 01/25/2012 01:13 PM, Marc-André Lureau wrote: windows.h is included by threads.h. winsock2.h should be included before. Avoid the following warning: In file included from ../gnulib/lib/unistd.h:51:0, from ../src/util/util.h:30, from

Re: [libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Marc-André Lureau
- Mensaje original - On 01/25/2012 01:13 PM, Marc-André Lureau wrote: windows.h is included by threads.h. winsock2.h should be included before. Avoid the following warning: In file included from ../gnulib/lib/unistd.h:51:0, from ../src/util/util.h:30,

Re: [libvirt] [PATCH libvirt 1/6] errcode is typedef by mingw, rename an argument name

2012-01-25 Thread Marc-André Lureau
- Mensaje original - On 01/25/2012 01:13 PM, Marc-André Lureau wrote: Fixes the following warning: util/virterror.c:1242:31: warning: declaration of 'errcode' shadows a global declaration [-Wshadow] Which header is polluting the namespace with a non-standard name? crtdefs.h

Re: [libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Eric Blake
On 01/25/2012 03:16 PM, Marc-André Lureau wrote: NACK. I agree that things should be fixed, but the fix should live in the problematic threads.h inclusion pattern, not in the downstream virkeepalive.c. I agree, but ff we follow that reasoning, windows.h should include winsock2.h,

Re: [libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Marc-André Lureau
Hi - Mensaje original - On 01/25/2012 03:16 PM, Marc-André Lureau wrote: Btw, I don't mind testing patches, but using mingw64 is almost a 'yum install' away :) What repo? The mingw64 compiler isn't in Fedora 16 proper. The Fedora mingw64 project repo:

Re: [libvirt] [PATCH 1/4] add a qemu-specific event register API, to passthough the new events come from qemu

2012-01-25 Thread Adam Litke
On Wed, Jan 25, 2012 at 02:16:14PM -0700, Eric Blake wrote: On 12/16/2011 09:58 AM, shao...@linux.vnet.ibm.com wrote: From: ShaoHe Feng shao...@linux.vnet.ibm.com Basically, this feature can go along with qemu monitor passthrough. That way, if we use new commands in the monitor that

Re: [libvirt] [PATCH libvirt 2/6] include winsock2.h before windows.h

2012-01-25 Thread Eric Blake
On 01/25/2012 03:42 PM, Marc-André Lureau wrote: Hi - Mensaje original - On 01/25/2012 03:16 PM, Marc-André Lureau wrote: Btw, I don't mind testing patches, but using mingw64 is almost a 'yum install' away :) What repo? The mingw64 compiler isn't in Fedora 16 proper. The

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Eric Blake
On 01/25/2012 01:13 PM, Marc-André Lureau wrote: Define PID_FORMAT and fix warnings for mingw64 x86_64 build. Unfortunately, gnu_printf attribute check expect %lld while normal printf is PRId64. So one warning remains. --- src/rpc/virnetsocket.c |4 ++-- src/util/command.c | 10

[libvirt] [PATCH 2/2] build: allow for 64-bit pid

2012-01-25 Thread Eric Blake
Convert daemon code to handle 64-bit pid_t (even though at the moment, it is not compiled on mingw). * daemon/remote.c (remoteDispatchAuthList) (remoteDispatchAuthPolkit): Print pid_t via %lld. --- daemon/remote.c | 50 +- 1 files changed, 29

Re: [libvirt] [PATCH libvirt 3/6] Fix warnings about pid_t printf format on mingw64

2012-01-25 Thread Eric Blake
On 01/25/2012 05:22 PM, Marc-André Lureau wrote: the decision should _not_ be based on _WIN64, but instead on a configure-time test on the underlying type of pid_t. And since _that_ gets difficult, I'd almost rather go with the simpler approach of: % PRIdMAX, (intmax_t) pid everywhere

Re: [libvirt] [PATCH libvirt 5/6] Cast pointer to int using intptr_t

2012-01-25 Thread Eric Blake
On 01/25/2012 01:13 PM, Marc-André Lureau wrote: Fix a few warnings with mingw64 x86_64. --- src/util/logging.c |8 src/util/threads-win32.c |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) ACK and pushed. What a shame that (intptr_t) is the only portable type

[libvirt] The quest for virStorageVolResize()

2012-01-25 Thread Zeeshan Ali (Khattak)
Hi everyone, In Boxes we'll need to change the size of the storage volumes (we use qcow2 files) but turns out that there is no virStorageVolResize() yet[1]. In my chat with Daniel on IRC, he mentioned that this would be a trivial task so I thought I should try to do it myself. I've been looking

Re: [libvirt] [PATCH 2/6] conf: put hostdev subsys data into a struct for easier re-use

2012-01-25 Thread Eric Blake
On 01/25/2012 09:58 AM, Laine Stump wrote: When interface is expanded to allow passthrough with extra dev-dependent network interface info, the host-side address of the device will need to be added to virDomainNetDef. It will be much simpler if this is done with a common typedefed struct

Re: [libvirt] [PATCH 3/6] conf: move rombar and bootIndex into virDomainDeviceInfo

2012-01-25 Thread Eric Blake
On 01/25/2012 09:58 AM, Laine Stump wrote: To help consolidate the commonality between virDomainHostdevDef and virDomainInterface into as few members as possible (and because I think it makes sense), this patch moves the rombar and bootIndex members into the info member that is common to both

Re: [libvirt] [PATCH 4/6] conf: relocate rombar and boot order parse/format

2012-01-25 Thread Eric Blake
On 01/25/2012 09:58 AM, Laine Stump wrote: Since these two items are now in the virDomainDeviceInfo struct, it makes sense to parse/format them in the functions written to parse/format that structure. Not all types of devices allow them, so two internal flags are added to indicate when it is

Re: [libvirt] [PATCH 5/6] qemu: (and conf) support rombar for network devices

2012-01-25 Thread Eric Blake
On 01/25/2012 09:58 AM, Laine Stump wrote: When support for the rombar option was added, it was only added for PCI passthrough devices, configured with hostdev. The same option is available for any network device that is attached to the guest's PCI bus. This patch allows setting rombar for any

Re: [libvirt] [PATCH 5/6] qemu: (and conf) support rombar for network devices

2012-01-25 Thread Eric Blake
On 01/25/2012 08:08 PM, Eric Blake wrote: On 01/25/2012 09:58 AM, Laine Stump wrote: When support for the rombar option was added, it was only added for PCI passthrough devices, configured with hostdev. The same option is available for any network device that is attached to the guest's PCI

Re: [libvirt] [PATCH 6/6] qemu: add suport for romfile option to specify device boot ROM

2012-01-25 Thread Eric Blake
s/suport/support in the subject actually, that makes the subject a bit long; how about just: s/suport for // On 01/25/2012 09:58 AM, Laine Stump wrote: This patch addresses: https://bugzilla.redhat.com/show_bug.cgi?id=781562 Always fun to finally get to the real driver of the series.

Re: [libvirt] [Qemu-devel] libvirt doesn't work with qemu 1.0

2012-01-25 Thread Eric Blake
On 12/02/2011 01:32 PM, Anthony Liguori wrote: But we already have to call 'qemu -h' for other reasons; so we might as well be efficient and learn as much as possible from that result than by calling both 'qemu -h' and 'qemu -qmp ...', in order to probe what qemu supports. Also, 'qemu -qmp'

[libvirt] [PATCH] qemu: support qmp on RHEL/CentOS qemu

2012-01-25 Thread Eric Blake
I'm getting tired of remembering to backport RHEL-specific patches when building upstream libvirt on RHEL 6.x or CentOS. All the affected versions of RHEL qemu-kvm have backported enough patches to a) make JSON useful, and b) modify the -help text to mention libvirt as the preferred interface;

[libvirt] [libvirt-glib] Prefer 'for' over 'while'

2012-01-25 Thread Zeeshan Ali (Khattak)
From: Zeeshan Ali (Khattak) zeesha...@gnome.org In this particular case 'for' seems like a more natural choice as then we don't need to update the iterator (which we were forgetting to do and causing a hang in Boxes). --- libvirt-gconfig/libvirt-gconfig-helpers.c |5 + 1 files changed, 1

[libvirt] [PATCH] docs: fix virsh man page

2012-01-25 Thread Eric Blake
Typo introduced in commit 4e9953a. * tools/virsh.pod (snapshot-create): Fix pod error. --- Pushing under the trivial rule. It bothers me that I have to use RHEL 5 to catch obvious errors, and that newer perl is too lax to flag bugs like this. tools/virsh.pod |2 +- 1 files changed, 1

[libvirt] [PATCH] qemu: require qmp on new enough qemu

2012-01-25 Thread Eric Blake
The qemu developers have made it clear that modern qemu will no longer guarantee human monitor command stability; furthermore, some features, such as async events, are only supported via qmp. If we are compiled without support for handling JSON, we cannot expect to sanely interact with modern

Re: [libvirt] [libvirt-glib] Prefer 'for' over 'while'

2012-01-25 Thread Philipp Hahn
Hello, On Thursday 26 January 2012 06:10:28 Zeeshan Ali (Khattak) wrote: -it = node-children; -while (it != NULL) { +for (it = node-children; it != NULL; it = it-next) { ... -xmlNodePtr next = it-next; ... cont = iter_func(it, opaque); ... -it = next;

Re: [libvirt] Using Libvirt to change the bridge a virtual network card of a running vm is connected to

2012-01-25 Thread Ralf Spenneberg
Hi, I agree, that it would be nice, if I even could change the host network backend, although we do not need this functionality. For our purpose we can go with the current host network backend and connect that just to a different bridge. Essentially this is just a brctl-invocation. Hendrik