Re: [libvirt] [PATCH 8/8] cpu: Rename PowerPCUpdate and PowerPCDataFree functions

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > For consistency with other functions in PowerPC CPU driver, the two > functions are renamed as ppcUpdate and ppcDataFree, respectively. > --- > src/cpu/cpu_powerpc.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) ACK. -- Eric Blak

Re: [libvirt] [PATCH 7/8] cpu: Remove hardcoded list of PowerPC models

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > The cpu_map.xml file is there to separate CPU model definitions from the > code. Having the only interesting data for PowerPC models only in the > source code. This patch moves this data to the XML file and removes the > hardcoded list completely. > --

Re: [libvirt] [PATCH 6/8] cpu: Reimplement PowerPCDecode

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > PowerPC CPUs are either identical or incompatible and thus we just need > to look up the right model for given PVR without pretending we have > several candidates which we may choose from. > > The function is also renamed as ppcDecode to match other f

Re: [libvirt] [PATCH 5/8] cpu: Reimplement PowerPCBaseline

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > Baseline API is supposed to return guest CPU definition that can be used > on any of the provided host CPUs. Since PowerPC CPUs are either > identical or incompatible, the API just needs to check that all provided > CPUs are identical. Previous impleme

Re: [libvirt] [PATCH 4/8] cpu: Fix loading PowerPC vendor from cpu_map.xml

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > When ppcVendorLoad fails to parse the vendor element for whatever > reason, it is supposed to ignore it and return 0 rather than -1. The > patch also removes PowerPC vendor string from the XML as it is not > actually used for anything. > --- > src/cpu

Re: [libvirt] [PATCH 3/8] cpu: Fix PowerPCNodeData

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > Make getting node CPU data for PowerPC unsupported on other > architectures. The function is also renamed as ppcNodeData to match > other functions in PowerPC CPU driver. > --- > src/cpu/cpu_powerpc.c | 26 ++ > 1 file changed,

Re: [libvirt] [PATCH 2/8] cpu: Make comparing PowerPC CPUs easier to read

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > Revert the condition to make it easier to read. The function is also s/Revert/Invert/ > renamed as ppcCompare to match other functions in PowerPC CPU driver. > --- > src/cpu/cpu_powerpc.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 del

[libvirt] Problems with

2012-12-21 Thread Lars Kellogg-Stedman
Using libvirt 1.0.1, I'm trying to start an LXC container using the '' syntax, like this: The specified block device exists: # ls -lL /dev/vg_files/vm-foobar-root brw-rw 1 root disk 253, 19 Dec 21 22:23 /dev/vg_files/vm-foobar-root If I start the domain, it

Re: [libvirt] [PATCH 1/8] cpu: Introduce cpuModelIsAllowed internal API

2012-12-21 Thread Eric Blake
On 12/20/2012 05:01 PM, Jiri Denemark wrote: > The API can be used to check if the model is on the supported models > list, which needs to be done in several places. > --- > src/cpu/cpu.c | 17 + > src/cpu/cpu.h | 5 + > src/cpu/cpu_generic.c | 19 +

Re: [libvirt] Release of libvirt-1.0.1

2012-12-21 Thread Eric Blake
On 12/21/2012 02:52 AM, Daniel P. Berrange wrote: > On Thu, Dec 20, 2012 at 11:57:37AM -0700, Eric Blake wrote: >> [trimming libvirt-announce from cc] >> >> On 12/19/2012 04:03 PM, Jason Helfman wrote: >>> I will be committing this to the FreeBSD portstree this week. One item that >>> has held this

Re: [libvirt] [PATCH] S390: Re-enable capability probing for virtio devices.

2012-12-21 Thread Eric Blake
On 12/21/2012 05:36 AM, Viktor Mihajlovski wrote: > On 12/21/2012 10:57 AM, Daniel P. Berrange wrote: >> >> ACK, sorry about causing that regression. >> >> >> Daniel >> > never mind, the new structure is so much cleaner now. > Would you also be so kind to push the patch (if not done already)? Done

Re: [libvirt] [PATCH] util: fix botched check for new netlink request filters

2012-12-21 Thread Laine Stump
On 12/21/2012 04:00 PM, Eric Blake wrote: > On 12/21/2012 01:48 PM, Laine Stump wrote: >> This is an adjustment to the fix for >> >> https://bugzilla.redhat.com/show_bug.cgi?id=889319 >> >> to account for two bonehead mistakes I made. >> >> commit ac2797cf2af2fd0e64c58a48409a8175d24d6f86 attempte

Re: [libvirt] [PATCH] util: fix botched check for new netlink request filters

2012-12-21 Thread Eric Blake
On 12/21/2012 01:48 PM, Laine Stump wrote: > This is an adjustment to the fix for > > https://bugzilla.redhat.com/show_bug.cgi?id=889319 > > to account for two bonehead mistakes I made. > > commit ac2797cf2af2fd0e64c58a48409a8175d24d6f86 attempted to fix a > problem with netlink in newer kerne

[libvirt] qemumonitorjsontest still hangs

2012-12-21 Thread Eric Blake
I ran 'make check' under a heavily loaded system, and it hung in qemumonitorjsontest as follows: (gdb) t a a bt Thread 2 (Thread 0x2b0f8000e700 (LWP 423)): #0 0x0032f96e998d in poll () from /lib64/libc.so.6 #1 0x2b0f7f3a1951 in virEventPollRunOnce () at util/event_poll.c:615 #2 0x2

[libvirt] [PATCH] util: fix botched check for new netlink request filters

2012-12-21 Thread Laine Stump
This is an adjustment to the fix for https://bugzilla.redhat.com/show_bug.cgi?id=889319 to account for two bonehead mistakes I made. commit ac2797cf2af2fd0e64c58a48409a8175d24d6f86 attempted to fix a problem with netlink in newer kernels requiring an extra attribute with a filter flag set in o

Re: [libvirt] [PATCH] blockjob: fix memleak that prevented block pivot

2012-12-21 Thread Eric Blake
On 12/21/2012 05:40 AM, Laine Stump wrote: > On 12/20/2012 07:16 PM, Eric Blake wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=888426 >> >> The code for doing a block-copy was supposed to track the destination >> file in drive->mirror, but was set up to do all mallocs prior to >> starting th

Re: [libvirt] vhost-net on ethernet interface type

2012-12-21 Thread Raja Sivaramakrishnan
Thanks Laine. The following patch worked for me. --- qemu_command.c.orig2012-12-21 10:12:33.021428569 -0800 +++ qemu_command.c2012-12-17 13:52:41.860110967 -0800 @@ -4972,6 +4972,7 @@ qemuBuildCommandLine(virConnectPtr conn,                if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||          

[libvirt] [PATCH 0/9] Add ability to connect to LXC namespaces

2012-12-21 Thread Daniel P. Berrange
This series introduces an LXC specific library libvirt-lxc.so which adds ability for a process to connect to the namespaces used by an LXC container from outside. It uses FD passing magic to allow the caller to connect, even if it is not root. -- libvir-list mailing list libvir-list@redhat.com htt

[libvirt] [PATCH 9/9] Add 'lxc-enter-namespace' command to virsh

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add a 'lxc-enter-namespace' command which accepts a domain name and then a command + args to run, attached to the container eg virsh -c lxc:/// lxc-enter-namespace demo -- /bin/ps -auxf Signed-off-by: Daniel P. Berrange --- tools/Makefile.am| 1 + tools/vir

[libvirt] [PATCH 7/9] Implement the RPC protocol for the libvirt-lxc.la library

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add the infrastructure for the libvirt-lxc.la library to the remote protocol client and daemon Signed-off-by: Daniel P. Berrange --- daemon/Makefile.am | 13 +- daemon/libvirtd.c | 14 ++ daemon/libvirtd.h | 1 + daemon/remote.c

[libvirt] [PATCH 6/9] Introduce an LXC specific public API & library

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" This patch introduces support for LXC specific public APIs. In common with what was done for QEMU, this creates a libvirt_lxc.so library and libvirt/libvirt-lxc.h header file. The actual APIs are int virDomainLxcOpenNamespace(virDomainPtr domain,

[libvirt] [PATCH 8/9] Add implementation of virDomainLxcOpenNamespace to LXC driver

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The virDomainLxcOpenNamespace method needs to open every file in /proc/$INITPID/ns and return the open file descriptor to the client application. Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_driver.c | 48 1 file

[libvirt] [PATCH 5/9] Rename lxc_protocol.x to lxc_monitor_protocol.x

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To avoid confusion between the LXC driver <-> controller monitor RPC protocol and the libvirt-lxc.so <-> libvirtd public RPC protocol, rename the former to lxc_monitor_protocol.x Signed-off-by: Daniel P. Berrange --- .gitignore

[libvirt] [PATCH 4/9] Add internal APIs for dealing with namespaces

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add some APIs for acquiring namespace file descriptors and switching namespaces Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 2 + src/util/virprocess.c| 118 +++ src/util/virprocess.h| 7 +++

[libvirt] [PATCH 2/9] Fix receiving of file descriptors from server

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" A number of bugs handling file descriptors received from the server caused the FDs to be lost and leaked. Signed-off-by: Daniel P. Berrange --- src/rpc/virnetclient.c| 12 +--- src/rpc/virnetclientprogram.c | 10 +- src/rpc/virnetmessage.c

[libvirt] [PATCH 3/9] Add a way to return FDs to the RPC caller

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Currently the libvirt client can pass FDs to the server, but the dispatch mechanism provides no way to return FDs back from the server to the client. Tweak the dispatch code, such that if a dispatcher returns '1', this indicates that it populated the virNetMessagePtr wi

[libvirt] [PATCH 1/9] Move qemu-XXX commands from virsh-host.c to virsh-domain.c

2012-12-21 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The QEMU specific APIs all operate on domains, not the host, so should be in the virsh-domain.c file / group Signed-off-by: Daniel P. Berrange --- tools/virsh-domain.c | 219 +++ tools/virsh-host.c | 218 -

Re: [libvirt] [PATCH 2/8] Introduce virDomainInterfaceFree API

2012-12-21 Thread Michal Privoznik
On 21.12.2012 17:01, Michal Privoznik wrote: > On 21.12.2012 16:52, Daniel P. Berrange wrote: >> On Fri, Dec 21, 2012 at 04:49:37PM +0100, Michal Privoznik wrote: >>> This is just a free function for array of virDomainInterfacePtr as >>> returned by virDomainInterfacesAddresses API. >>> --- >>> in

Re: [libvirt] [PATCH 2/8] Introduce virDomainInterfaceFree API

2012-12-21 Thread Michal Privoznik
On 21.12.2012 16:52, Daniel P. Berrange wrote: > On Fri, Dec 21, 2012 at 04:49:37PM +0100, Michal Privoznik wrote: >> This is just a free function for array of virDomainInterfacePtr as >> returned by virDomainInterfacesAddresses API. >> --- >> include/libvirt/libvirt.h.in | 3 +++ >> python/gener

Re: [libvirt] [PATCH 1/8] Introduce virDomainInterfacesAddresses API

2012-12-21 Thread Daniel P. Berrange
On Fri, Dec 21, 2012 at 04:49:36PM +0100, Michal Privoznik wrote: > This API returns dynamically allocated array of IP addresses for > all domain interfaces. > --- > include/libvirt/libvirt.h.in | 49 ++ > python/generator.py | 2 ++ > src/driver.h

Re: [libvirt] [PATCH 2/8] Introduce virDomainInterfaceFree API

2012-12-21 Thread Daniel P. Berrange
On Fri, Dec 21, 2012 at 04:49:37PM +0100, Michal Privoznik wrote: > This is just a free function for array of virDomainInterfacePtr as > returned by virDomainInterfacesAddresses API. > --- > include/libvirt/libvirt.h.in | 3 +++ > python/generator.py | 1 + > src/libvirt.c

[libvirt] [PATCH 6/8] remote: Implement virDomainInterfacesAddresses

2012-12-21 Thread Michal Privoznik
--- daemon/remote.c | 138 +++ src/remote/remote_driver.c | 86 +++ src/remote/remote_protocol.x | 27 - src/remote_protocol-structs | 27 + 4 files changed, 277 insertions(+), 1 deletion(-) diff --

[libvirt] [PATCH 8/8] python: create example for dumping domain IP addresses

2012-12-21 Thread Michal Privoznik
--- examples/python/Makefile.am | 2 +- examples/python/README| 1 + examples/python/domipaddrs.py | 50 +++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100755 examples/python/domipaddrs.py diff --git a/examples/python/Makefile

[libvirt] [PATCH 4/8] qemu: Implement qemuDomainInterfacesAddresses

2012-12-21 Thread Michal Privoznik
--- src/qemu/qemu_driver.c | 68 ++ 1 file changed, 68 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0058c8d..841c980 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14887,6 +14887,73 @@ cleanu

[libvirt] [PATCH 7/8] python: Expose virDomainInterfacesAddresses

2012-12-21 Thread Michal Privoznik
--- python/libvirt-override-api.xml | 7 +++ python/libvirt-override.c | 120 2 files changed, 127 insertions(+) diff --git a/python/libvirt-override-api.xml b/python/libvirt-override-api.xml index a0e0496..bea1a59 100644 --- a/python/libvirt-overr

[libvirt] [PATCH 3/8] qemu_agent: Implement 'guest-network-get-interfaces' command handling

2012-12-21 Thread Michal Privoznik
This command returns an array of all guest interfaces among with their IP and HW addresses. --- src/qemu/qemu_agent.c | 164 ++ src/qemu/qemu_agent.h | 2 + 2 files changed, 166 insertions(+) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agen

[libvirt] [PATCH 5/8] virsh: Expose virDomainInterfacesAddresses

2012-12-21 Thread Michal Privoznik
--- tools/virsh-domain.c | 102 +++ 1 file changed, 102 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index f3da1d5..c72b078 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8491,6 +8491,107 @@ cleanup:

[libvirt] [PATCH 0/8] Dump domain's IP addresses

2012-12-21 Thread Michal Privoznik
It's been a while since I tried get this in. I've reworked the patches, the exposed API, and start new round of reviews. Moreover, during work I've come to point, where extending qemu guest agent seemed wise: http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg03264.html Therefore I am i

[libvirt] [PATCH 2/8] Introduce virDomainInterfaceFree API

2012-12-21 Thread Michal Privoznik
This is just a free function for array of virDomainInterfacePtr as returned by virDomainInterfacesAddresses API. --- include/libvirt/libvirt.h.in | 3 +++ python/generator.py | 1 + src/libvirt.c| 31 +++ src/libvirt_public.syms | 1 + 4

[libvirt] [PATCH 1/8] Introduce virDomainInterfacesAddresses API

2012-12-21 Thread Michal Privoznik
This API returns dynamically allocated array of IP addresses for all domain interfaces. --- include/libvirt/libvirt.h.in | 49 ++ python/generator.py | 2 ++ src/driver.h | 6 src/libvirt.c| 71

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Viktor Mihajlovski
On 12/21/2012 03:45 PM, Li Zhang wrote: On POWER, QEMU's help string doesn't include -no-acpi. It seems that QEMU handles this differently. :) it depends on the version: newer QEMUs for S390 don't include -no-acpi either ... but libvirt should remain compatible with older QEMUs -- Mit freundl

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Li Zhang
On Fri, Dec 21, 2012 at 10:20 PM, Ján Tomko wrote: > On 12/21/12 15:07, Li Zhang wrote: > > > > > > On Fri, Dec 21, 2012 at 9:38 PM, Ján Tomko > > wrote: > > > > In commit c4bbaaf8, caps->arch was checked uninitialized, rendering > the > > whole check useless. >

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Li Zhang
On Fri, Dec 21, 2012 at 10:37 PM, Viktor Mihajlovski < mihaj...@linux.vnet.ibm.com> wrote: > On 12/21/2012 03:07 PM, Li Zhang wrote: > >> >> Will it get QEMU_CAPS_NO_ACPI capability by QMP if S390 doesn't support >> ACPI? >> I test it on PPC, it won't get this capability by QMP. >> >> In the QMP

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Viktor Mihajlovski
On 12/21/2012 03:07 PM, Li Zhang wrote: Will it get QEMU_CAPS_NO_ACPI capability by QMP if S390 doesn't support ACPI? I test it on PPC, it won't get this capability by QMP. In the QMP case, basic capabilities are not being probed, but assumed to be present, however -no-acpi is only valid for x

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Ján Tomko
On 12/21/12 15:07, Li Zhang wrote: > > > On Fri, Dec 21, 2012 at 9:38 PM, Ján Tomko > wrote: > > In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the > whole check useless. > > This patch moves the conditional setting of QEMU_CAPS_NO_ACP

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Li Zhang
On Fri, Dec 21, 2012 at 9:38 PM, Ján Tomko wrote: > In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the > whole check useless. > > This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to > qemuCapsInitQMP, and removes the no longer needed exception for S390. > > Will

Re: [libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Viktor Mihajlovski
On 12/21/2012 02:38 PM, Ján Tomko wrote: In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the whole check useless. This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to qemuCapsInitQMP, and removes the no longer needed exception for S390. It also clears the flag fo

[libvirt] [PATCH] qemu: fix QEMU_CAPS_NO_ACPI detection

2012-12-21 Thread Ján Tomko
In commit c4bbaaf8, caps->arch was checked uninitialized, rendering the whole check useless. This patch moves the conditional setting of QEMU_CAPS_NO_ACPI to qemuCapsInitQMP, and removes the no longer needed exception for S390. It also clears the flag for all non-x86 archs instead of just S390 in

Re: [libvirt] [PATCH 2/6] Use -machine option for PPC64

2012-12-21 Thread Li Zhang
On Fri, Dec 21, 2012 at 10:21 AM, Li Zhang wrote: > > On Thu, Dec 20, 2012 at 6:28 PM, Daniel P. Berrange > wrote: > >> On Thu, Dec 20, 2012 at 02:02:23PM +0800, Li Zhang wrote: >> > From: Li Zhang >> > >> > On PPC64 platform, it sets USB option in -machine option. It is >> > set as the followi

Re: [libvirt] [PATCH] blockjob: fix memleak that prevented block pivot

2012-12-21 Thread Laine Stump
On 12/20/2012 07:16 PM, Eric Blake wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=888426 > > The code for doing a block-copy was supposed to track the destination > file in drive->mirror, but was set up to do all mallocs prior to > starting the copy so that OOM wouldn't leave things partially

Re: [libvirt] [PATCH] S390: Re-enable capability probing for virtio devices.

2012-12-21 Thread Viktor Mihajlovski
On 12/21/2012 10:57 AM, Daniel P. Berrange wrote: ACK, sorry about causing that regression. Daniel never mind, the new structure is so much cleaner now. Would you also be so kind to push the patch (if not done already)? Thanks and a Happy New Year to All! (Or Happy Doomsday, if preferred ;-)

[libvirt] IMPORTANT: Re: [PATCH v2 0/28] Rename files in src/util to have a 'vir' prefix

2012-12-21 Thread Daniel P. Berrange
FYI, I have pushed this big rename series. If you have outstanding patches GIT should be able to detect the rename and re-apply your changes to the new files. You'll still see conflicts if you've touched the #include lines of course. If GIT fails to deal with the renames, make sure that your $HOME/

Re: [libvirt] [PATCH] S390: Re-enable capability probing for virtio devices.

2012-12-21 Thread Daniel P. Berrange
On Fri, Dec 21, 2012 at 10:16:12AM +0100, Viktor Mihajlovski wrote: > Since we switched to QMP probing, the object types are spelled out > explicitly, i.e. virtio-net-pci. This has effectively disabled > the capability detection of s390 virtio devices. The trivial fix > is to add the s390 virtio ty

Re: [libvirt] Coverity scan

2012-12-21 Thread Daniel P. Berrange
On Thu, Dec 20, 2012 at 10:25:04AM -0500, John Ferlan wrote: > > Of the defects found there are quite a few which can be considered > as "false positives", some are trivial issues, a few complex issues, > and the rest while resulting in a core usually occur in some error > path. The bulk of the BA

Re: [libvirt] Release of libvirt-1.0.1

2012-12-21 Thread Daniel P. Berrange
On Thu, Dec 20, 2012 at 11:57:37AM -0700, Eric Blake wrote: > [trimming libvirt-announce from cc] > > On 12/19/2012 04:03 PM, Jason Helfman wrote: > > I will be committing this to the FreeBSD portstree this week. One item that > > has held this up for me was repeated build failures. > > > > In lo

[libvirt] [PATCH 1/1] ppc64 cpu features

2012-12-21 Thread Li Zhang
From: Li Zhang This patch adds a CPU feature "powernv" identifying IBM Power processor that supports native hypervisor e.g. KVM. This can be used by virtualization management software to determine the CPU capabilities. PVR doesn't indicate whether it a host or a guest CPU. So, we use /proc/cpuinf

[libvirt] [PATCH] S390: Re-enable capability probing for virtio devices.

2012-12-21 Thread Viktor Mihajlovski
Since we switched to QMP probing, the object types are spelled out explicitly, i.e. virtio-net-pci. This has effectively disabled the capability detection of s390 virtio devices. The trivial fix is to add the s390 virtio types explicitly to qemuCapsObjectProps. Signed-off-by: Viktor Mihajlovski -