[libvirt] [PATCH 2/2] Make detect_scsi_host_caps a function on all architectures

2013-05-02 Thread Guido Günther
In the non linux case some callers like gather_scsi_host_caps needed the return code of -1 while others like update_caps needed an emtpy statement (to avoid a "statement without effect" warning). This is much simpler solved by using a function instead of a define. --- src/node_device/node_device_d

[libvirt] [PATCH 1/2] Fixup rpcgen code on kFreeBSD too

2013-05-02 Thread Guido Günther
since it uses glibc's rpcgen. --- src/rpc/genprotocol.pl |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl index c8c1570..f02ce13 100755 --- a/src/rpc/genprotocol.pl +++ b/src/rpc/genprotocol.pl @@ -31,7 +31,7 @@ open RPCGEN, "-|

Re: [libvirt] [PATCH] build: avoid non-portable cast of pthread_t

2013-05-02 Thread Guido Günther
Hi Eric, On Thu, May 02, 2013 at 03:58:23PM -0600, Eric Blake wrote: > POSIX says pthread_t is opaque. We can't guarantee if it is scaler > or a pointer, nor what size it is; and BSD differs from Linux. > We've also had reports of gcc complaining on attempts to cast it, > if we use a cast to the w

[libvirt] Requested operation is not valid: domain is not running but exactly vm is running

2013-05-02 Thread yue
hi,all requested operation is not valid: domain is not running but exactly vm is running when call getCPUStats,interfaceStats... system: centos6.3 libvirt-0.9.10-21.el6_3.7.x86_64 libvirt-python-0.9.10-21.el6_3.7.x86_64 thanks-- libvir-list mailing list libvir-list@redhat.com https://www.redh

Re: [libvirt] [PATCH] build: fix build error of src/libvirt.c

2013-05-02 Thread Hu Tao
On Thu, May 02, 2013 at 10:08:11PM -0600, Eric Blake wrote: > On 05/02/2013 09:44 PM, Hu Tao wrote: > > Following build error caused by commit 7c9a2d88: > > > > libvirt.c: In function 'virConnectGetConfigFilePath': > > libvirt.c:956:9: error: implicit declaration of function > > 'virGetUserConfig

Re: [libvirt] [PATCH] build: fix build error of src/libvirt.c

2013-05-02 Thread Eric Blake
On 05/02/2013 09:44 PM, Hu Tao wrote: > Following build error caused by commit 7c9a2d88: > > libvirt.c: In function 'virConnectGetConfigFilePath': > libvirt.c:956:9: error: implicit declaration of function > 'virGetUserConfigDirectory' [-Werror=implicit-function-declaration] > +++ b/src/libvirt.

[libvirt] [PATCH] build: fix build error of src/libvirt.c

2013-05-02 Thread Hu Tao
Following build error caused by commit 7c9a2d88: libvirt.c: In function 'virConnectGetConfigFilePath': libvirt.c:956:9: error: implicit declaration of function 'virGetUserConfigDirectory' [-Werror=implicit-function-declaration] libvirt.c:956:9: error: nested extern declaration of 'virGetUserConf

Re: [libvirt] BSD gcrypt warnings [was: [PATCH] build: mark conditionally unused variables]

2013-05-02 Thread Roman Bogorodskiy
Eric Blake wrote: > On 05/02/2013 06:38 AM, Roman Bogorodskiy wrote: > > Eric Blake wrote: > > > >> These fixes solve a compilation failure on FreeBSD: > >> > >> util/virnetdevtap.c: In function 'virNetDevTapGetName': > >> util/virnetdevtap.c:56: warning: unused parameter 'tapfd' > >> [-Wunu

Re: [libvirt] [PATCH] util: Prevent libvirtd crash from virPCIDeviceAddressIsEqual()

2013-05-02 Thread Alex Jia
On 05/02/2013 11:30 PM, Laine Stump wrote: On 05/02/2013 02:06 AM, Alex Jia wrote: On 04/29/2013 02:48 AM, Laine Stump wrote: On 04/28/2013 06:12 AM, Alex Jia wrote: GDB backtrace: Breakpoint 1, virPCIGetVirtualFunctionIndex (pf_sysfs_device_link=0x7fc04400f470 "/sys/bus/pci/devices/:03:0

Re: [libvirt] [PATCH] build: always include libvirt_lxc.syms in tarball

2013-05-02 Thread Eric Blake
On 05/02/2013 05:50 PM, Eric Blake wrote: > On a mingw build, 'make distcheck' fails with: > > GEN libvirt_qemu.def > make[3]: *** No rule to make target `../../src/libvirt_lxc.syms', needed by > `libvirt_lxc.def'. Stop. > > I traced it to a missing entry in EXTRA_DIST. But rather than

[libvirt] [PATCH] build: always include libvirt_lxc.syms in tarball

2013-05-02 Thread Eric Blake
On a mingw build, 'make distcheck' fails with: GEN libvirt_qemu.def make[3]: *** No rule to make target `../../src/libvirt_lxc.syms', needed by `libvirt_lxc.def'. Stop. I traced it to a missing entry in EXTRA_DIST. But rather than keep the entire list in sync, it is easier to list the t

[libvirt] BSD remote_protocol [was: [PATCH] build: mark conditionally unused variables]

2013-05-02 Thread Eric Blake
On 05/02/2013 06:38 AM, Roman Bogorodskiy wrote: > > When configured with '--without-gnutls', it fails again in > remote_protocol.c: > > http://people.freebsd.org/~novel/misc/libvirt_remote_protocol_warns.txt CC libvirt_driver_remote_la-remote_protocol.lo cc1: warnings being treated as e

[libvirt] BSD gcrypt warnings [was: [PATCH] build: mark conditionally unused variables]

2013-05-02 Thread Eric Blake
On 05/02/2013 06:38 AM, Roman Bogorodskiy wrote: > Eric Blake wrote: > >> These fixes solve a compilation failure on FreeBSD: >> >> util/virnetdevtap.c: In function 'virNetDevTapGetName': >> util/virnetdevtap.c:56: warning: unused parameter 'tapfd' >> [-Wunused-parameter] >> util/virnetdevtap.c

Re: [libvirt] [PATCH] esx: Reduce code duplication in generator

2013-05-02 Thread Matthias Bolte
2013/5/2 Eric Blake : > On 05/02/2013 07:56 AM, Eric Blake wrote: >> On 05/02/2013 07:09 AM, Matthias Bolte wrote: >>> 2013/5/2 Eric Blake : On 05/01/2013 12:44 PM, Matthias Bolte wrote: > --- > src/esx/esx_vi_generator.py | 430 > ---

[libvirt] [PATCH] build: Fix build when WITH_HAL is defined

2013-05-02 Thread Jim Fehlig
Commit 7c9a2d88 missed inclusion of virstring.h in a few places when WITH_HAL is defined, causing build failures. --- Pushing under build-breaker rule. src/node_device/node_device_driver.c | 1 + src/node_device/node_device_hal.c| 1 + 2 files changed, 2 insertions(+) diff --git a/src/node_

[libvirt] [PATCH] build: avoid non-portable cast of pthread_t

2013-05-02 Thread Eric Blake
POSIX says pthread_t is opaque. We can't guarantee if it is scaler or a pointer, nor what size it is; and BSD differs from Linux. We've also had reports of gcc complaining on attempts to cast it, if we use a cast to the wrong type (for example, pointers have to be cast to void* or intptr_t before

[libvirt] [PATCH] build: fix mingw build of vbox

2013-05-02 Thread Eric Blake
More fallout from commit 7c9a2d88 dropping too many headers. Fixes: In file included from ../../src/vbox/vbox_glue.c:26:0: ../../src/vbox/vbox_MSCOMGlue.c: In function 'vboxLookupVersionInRegistry': ../../src/vbox/vbox_MSCOMGlue.c:435:5: error: implicit declaration of function 'virParseVersionSt

[libvirt] [PATCH] build: fix mingw build of virprocess.c

2013-05-02 Thread Eric Blake
Commit 776d49f4 added a static function that is only called conditionally; leading to this compile error on mingw: CC libvirt_util_la-virprocess.lo ../../src/util/virprocess.c:624:26: error: 'struct rlimit' declared inside parameter list [-Werror] ../../src/util/virprocess.c:624:26: error

[libvirt] [PATCH] build: fix FreeBSD build

2013-05-02 Thread Eric Blake
Commit 7c9a2d88 cleaned up too many headers; FreeBSD builds failed due to: util/virutil.c:556: warning: implicit declaration of function 'canonicalize_file_name' (Not sure which Linux header leaked this declaration, but gnulib only guarantees it in stdlib.h) libvirt.c:956: warning: implicit dec

Re: [libvirt] [PATCH] build: avoid useless virAsprintf

2013-05-02 Thread Eric Blake
On 05/02/2013 02:28 PM, Laine Stump wrote: > On 05/02/2013 03:36 PM, Eric Blake wrote: >> virAsprintf(&foo, "%s", bar) is wasteful compared to >> foo = strdup(bar) (or eventually, VIR_STRDUP(foo, bar), >> but one thing at a time...). >> >> Noticed while reviewing Laine's attempt to clean up broken

Re: [libvirt] [libvirt-glib 2/3] gconfig: Add GVirConfigDomainSnapshotDisk getters/setters

2013-05-02 Thread Christophe Fergeau
On Thu, May 02, 2013 at 11:40:56PM +0300, Zeeshan Ali (Khattak) wrote: > On Thu, May 2, 2013 at 6:36 PM, Christophe Fergeau > wrote: > > On Thu, May 02, 2013 at 06:22:14PM +0300, Zeeshan Ali (Khattak) wrote: > >> On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau > >> wrote: > >> > + > >> > +

Re: [libvirt] [PATCH] build: avoid useless virAsprintf

2013-05-02 Thread Laine Stump
On 05/02/2013 03:36 PM, Eric Blake wrote: > virAsprintf(&foo, "%s", bar) is wasteful compared to > foo = strdup(bar) (or eventually, VIR_STRDUP(foo, bar), > but one thing at a time...). > > Noticed while reviewing Laine's attempt to clean up broken > qemu:///session. Yeah, I noticed that too, and

Re: [libvirt] [libvirt-glib 2/3] gconfig: Add GVirConfigDomainSnapshotDisk getters/setters

2013-05-02 Thread Zeeshan Ali (Khattak)
On Thu, May 2, 2013 at 6:36 PM, Christophe Fergeau wrote: > On Thu, May 02, 2013 at 06:22:14PM +0300, Zeeshan Ali (Khattak) wrote: >> On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau >> wrote: >> > + >> > + >> > +const char >> > *gvir_config_domain_snapshot_disk_get_driver_type(GVirConfigDom

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 0/9] x86: feature words array (v11) + "feature-words" property

2013-05-02 Thread Eric Blake
On 05/02/2013 01:43 PM, Eduardo Habkost wrote: >> >> As mentioned earlier I'd prefer to defer the property design rather than >> putting it lightly reviewed into 1.5 and living with some ABI. >> If libvirt urgently needs this info, this series needs to be reviewed >> and sorted out until the weeken

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 0/9] x86: feature words array (v11) + "feature-words" property

2013-05-02 Thread Eduardo Habkost
On Thu, May 02, 2013 at 12:53:33AM +0200, Andreas Färber wrote: > > Eduardo Habkost (9): > > target-i386: cleanup: Group together level, xlevel, xlevel2 fields > > target-i386/kvm.c: Code formatting changes > > target-i386/cpu.c: Break lines so they don't get too long > > target-i386: Repla

[libvirt] [PATCH] build: avoid useless virAsprintf

2013-05-02 Thread Eric Blake
virAsprintf(&foo, "%s", bar) is wasteful compared to foo = strdup(bar) (or eventually, VIR_STRDUP(foo, bar), but one thing at a time...). Noticed while reviewing Laine's attempt to clean up broken qemu:///session. * cfg.mk (sc_prohibit_asprintf): Enhance rule. * src/esx/esx_storage_backend_vmfs.c

Re: [libvirt] libvirt quietly dies (on keep-alive error handling?)

2013-05-02 Thread Eric Blake
On 05/02/2013 01:03 PM, Igor Lukyanov wrote: > Hi all, > we detected a floating bug of 1.0.2 version. Can you retest with the just-released 1.0.5? There have been several (very nasty) race bugs fixed in the meantime, including some where undefining a domain could crash libvirtd. -- Eric Blake

Re: [libvirt] [PATCH] network: fix network driver startup for qemu:///session

2013-05-02 Thread Daniel P. Berrange
On Thu, May 02, 2013 at 02:06:16PM -0400, Laine Stump wrote: > > -#define NETWORK_PID_DIR LOCALSTATEDIR "/run/libvirt/network" > -#define NETWORK_STATE_DIR LOCALSTATEDIR "/lib/libvirt/network" > +#define NETWORK_PID_DIR "/run/libvirt/network" > +#define NETWORK_STATE_DIR "/lib/libvirt/network" >

[libvirt] libvirt quietly dies (on keep-alive error handling?)

2013-05-02 Thread Igor Lukyanov
Hi all, we detected a floating bug of 1.0.2 version. Libvirtd mysteriously and quietly dies (without core dumps or entries in dmesg/syslog) with the following log messages. If you have any ideas of what it might be and how to deal with it - please give a hint. Many thanks. Here is the tail of li

Re: [libvirt] [PATCH 2/2] virsh: Resolve Coverity 'MISSING_BREAK'

2013-05-02 Thread Ján Tomko
On 05/01/2013 05:53 PM, John Ferlan wrote: > Recent commit '53531e16' resulted in a new Coverity warning regarding > a missing break in the ':' options processing. Adjust the commit to > avoid the issue. > --- > tools/virsh.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >

[libvirt] [PATCH v2 2/2] qemu: add hv_vapic and hv_spinlocks support

2013-05-02 Thread Ján Tomko
Add new CPU flags for HyperV: hv_vapic for virtual APIC support hv_spinlocks for spinlock support XML: 0x results in the following QEMU command line: qemu -cpu ,hv_vapic,hv_spinlocks=0x https://bugzilla.redhat.com/show_bug.cgi?id=784836 --- docs/formatdomain.html.in

[libvirt] [PATCH v2 1/2] qemu: simplify CPU command line parsing

2013-05-02 Thread Ján Tomko
Use virStringSplit. Change the 'error' label to 'cleanup' to prevent memory leaks on error. --- src/qemu/qemu_command.c | 128 +++- 1 file changed, 51 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 57

[libvirt] [PATCH v2 0/2] qemu: support new HyperV-related features

2013-05-02 Thread Ján Tomko
1/2 prevents memory leaks and hair loss in qemuParseCommandLineCPU 2/2 adds support for the new cpu flags v1: https://www.redhat.com/archives/libvir-list/2013-May/msg00173.html v2: uses virStringSplit instead of strsep added a missing break to virDomainDefParseXML Ján Tomko (2): qemu: simplify

Re: [libvirt] [Libvirt-announce] Release of libvirt-1.0.5

2013-05-02 Thread Justin Clift
On 02/05/2013, at 11:39 AM, Daniel Veillard wrote: > I forgot to make the rc2 release on tuesday, but looking at the > git state it was looking like the problem reported on rc1 had been > fixed, so I decided to go ahead and roll the release as scheduled > today. It is tagged in git and the tarball

Re: [libvirt] [PATCH] network: fix network driver startup for qemu:///session

2013-05-02 Thread Eric Blake
On 05/02/2013 12:22 PM, Eric Blake wrote: > On 05/02/2013 12:06 PM, Laine Stump wrote: >> This should resolve https://bugzilla.redhat.com/show_bug.cgi?id=958907 >> >> Recent new addition of code to read/write active network state to the >> NETWORK_STATE_DIR in the network driver broke startup for >

Re: [libvirt] [PATCH] network: fix network driver startup for qemu:///session

2013-05-02 Thread Eric Blake
On 05/02/2013 12:06 PM, Laine Stump wrote: > This should resolve https://bugzilla.redhat.com/show_bug.cgi?id=958907 > > Recent new addition of code to read/write active network state to the > NETWORK_STATE_DIR in the network driver broke startup for > qemu:///session. The network driver had severa

[libvirt] [PATCH] network: fix network driver startup for qemu:///session

2013-05-02 Thread Laine Stump
This should resolve https://bugzilla.redhat.com/show_bug.cgi?id=958907 Recent new addition of code to read/write active network state to the NETWORK_STATE_DIR in the network driver broke startup for qemu:///session. The network driver had several state file paths hardcoded to /var, which could nev

[libvirt] [PATCH] build: always include sanitytest in tarball

2013-05-02 Thread Eric Blake
The libvirt 1.0.5 tarball is missing a file which renders 'make check' broken; first reported on list by Guido Günther. * python/Makefile.am (EXTRA_DIST): Hoise sanitytest.py out of conditional. Signed-off-by: Eric Blake --- > Agreed the EXTRA_DIST += sanitytest.py ought to go outside the > H

[libvirt] [PATCH] util: fix compile errors caused by moving string functions

2013-05-02 Thread Laine Stump
commit 7c9a2d8 missed adding in a few #include "virstring.h"s, causing builds to fail. --- Pushed under the build-breaker rule. src/locking/lock_driver_sanlock.c | 1 + src/storage/storage_backend_rbd.c | 1 + src/storage/storage_backend_sheepdog.c | 1 + tests/storagebackendsheepdogte

[libvirt] [PATCH] Introduce startupPolicy for chardev to make guest OS bootable when hardware failure happens in log disk

2013-05-02 Thread Seiji Aguchi
[Problem] Currently, guest OS's messages can be logged to a local disk of host OS by creating chadevs with options below. -chardev file,id=charserial0,path= -device isa-serial,chardev=chardevserial0,id=serial0 When a hardware failure happens in the disk, qemu-kvm can't create the chardevs. In

Re: [libvirt] [PATCH 1/2] qemu: use strsep for CPU command line parsing

2013-05-02 Thread Daniel P. Berrange
On Thu, May 02, 2013 at 07:07:05PM +0200, Ján Tomko wrote: > Copy the command line to allow modifying it, then get the tokens > by strsep. This removes the need to strdup every feature separately, > and simplifies the code. Please use the virStringSplit() function instead of strsep() Regards, Dan

[libvirt] [PATCH 1/2] qemu: use strsep for CPU command line parsing

2013-05-02 Thread Ján Tomko
Copy the command line to allow modifying it, then get the tokens by strsep. This removes the need to strdup every feature separately, and simplifies the code. Change the error label to a cleanup label to prevent memory leaks. --- src/qemu/qemu_command.c | 110 ++---

[libvirt] [PATCH 2/2] qemu: add hv_vapic and hv_spinlocks support

2013-05-02 Thread Ján Tomko
Add new CPU flags for HyperV: hv_vapic for virtual APIC support hv_spinlocks for spinlock support XML: 0x results in the following QEMU command line: qemu -cpu ,hv_vapic,hv_spinlocks=0x https://bugzilla.redhat.com/show_bug.cgi?id=784836 --- docs/formatdomain.html.in

[libvirt] [PATCH 0/2] qemu: support new HyperV-related features

2013-05-02 Thread Ján Tomko
1/2 prevents memory leaks and hair loss in qemuParseCommandLineCPU 2/2 adds support for the new cpu flags https://bugzilla.redhat.com/show_bug.cgi?id=784836 Ján Tomko (2): qemu: use strsep for CPU command line parsing qemu: add hv_vapic and hv_spinlocks support docs/formatdomain.html.in

Re: [libvirt] [Qemu-devel] [PATCH 3/3] gtk: add devices menu to allow changing removable block devices

2013-05-02 Thread Anthony Liguori
Kevin Wolf writes: > Am 02.05.2013 um 15:41 hat Anthony Liguori geschrieben: >> Kevin Wolf writes: >> >> > >> > Ugh. Comparing the device name to an incomplete set of strings here and >> > then figuring out for each what the specific way for this device is to >> > create a nice string sounds li

Re: [libvirt] [PATCH 2/2] network: bridge_driver: don't lose transient networks on daemon restart

2013-05-02 Thread Daniel P. Berrange
On Wed, Apr 17, 2013 at 10:40:45AM +0200, Peter Krempa wrote: > Until now tranisent networks weren't really useful as libvirtd wasn't > able to remember them across restarts. This patch adds support for > loading status files of transient networks (that already were generated) > so that the status

Re: [libvirt] [PATCH] util: Prevent libvirtd crash from virPCIDeviceAddressIsEqual()

2013-05-02 Thread Laine Stump
On 05/02/2013 02:06 AM, Alex Jia wrote: > On 04/29/2013 02:48 AM, Laine Stump wrote: >> On 04/28/2013 06:12 AM, Alex Jia wrote: >>> GDB backtrace: >>> >>> Breakpoint 1, virPCIGetVirtualFunctionIndex >>> (pf_sysfs_device_link=0x7fc04400f470 >>> "/sys/bus/pci/devices/:03:00.1", vf_sysfs_device_li

Re: [libvirt] [libvirt-glib 2/3] gconfig: Add GVirConfigDomainSnapshotDisk getters/setters

2013-05-02 Thread Christophe Fergeau
On Thu, May 02, 2013 at 06:22:14PM +0300, Zeeshan Ali (Khattak) wrote: > On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau > wrote: > > + > > + > > +const char > > *gvir_config_domain_snapshot_disk_get_driver_type(GVirConfigDomainSnapshotDisk > > *disk) > > Shouldn't 'driver_type' be an enum

Re: [libvirt] [libvirt-glib 3/3] gconfig: Add GVirConfigDomainSnapshot getters/setters

2013-05-02 Thread Zeeshan Ali (Khattak)
On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau wrote: > --- > libvirt-gconfig/libvirt-gconfig-domain-snapshot.c | 227 > +- > libvirt-gconfig/libvirt-gconfig-domain-snapshot.h | 38 +++- > libvirt-gconfig/libvirt-gconfig.sym | 15 ++ > 3 files changed, 27

Re: [libvirt] [libvirt-glib 1/3] gconfig: Add GVirConfigDomainSnapshotDisk skeleton

2013-05-02 Thread Zeeshan Ali (Khattak)
On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau wrote: > --- Looks good. ACK -- Regards, Zeeshan Ali (Khattak) FSF member#5124 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 36/40] Convert Xen domain device hotplug driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain hotplug APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid points

[libvirt] [PATCH 30/40] Convert Xen domain lookup driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain lookup APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid points

[libvirt] [PATCH 16/40] Remove Xen get hostname driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The xenGetHostname entry point in the xenUnifiedDriver table was unused. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h index 3ac2912..16e9743 100644 --- a/src/

[libvirt] [PATCH 32/40] Convert Xen domain property driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain property APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid point

[libvirt] [PATCH 39/40] Convert Xen domain stats/peek driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain stats & peek APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid p

[libvirt] [PATCH 22/40] Simplify the Xen domain migration driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" All the migration code is done by the XenD subdriver which can be assumed to always be present Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/src/xen/xen

Re: [libvirt] [libvirt-glib 2/3] gconfig: Add GVirConfigDomainSnapshotDisk getters/setters

2013-05-02 Thread Zeeshan Ali (Khattak)
On Wed, May 1, 2013 at 10:59 PM, Christophe Fergeau wrote: > --- > .../libvirt-gconfig-domain-snapshot-disk.c | 81 > ++ > .../libvirt-gconfig-domain-snapshot-disk.h | 16 + > libvirt-gconfig/libvirt-gconfig.sym| 9 +++ > 3 files changed,

[libvirt] [PATCH 31/40] Convert Xen domain lifecycle driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain lifecycle APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid poin

[libvirt] [PATCH 33/40] Convert Xen domain managed save driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain save APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid points to

[libvirt] [PATCH 37/40] Convert Xen domain autostart driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain autostart APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid poin

[libvirt] [PATCH 34/40] Convert Xen domain start/migration APIs to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain migrate & start APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uui

[libvirt] [PATCH 26/40] Simplify the Xen domain attach/dettach driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the domain attach/dettach driver methods directly call into either the XenD or XM drivers Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 55 + src/xen/xen_driver.h| 2 -- src/xen/xend_internal

[libvirt] [PATCH 24/40] Simplify the Xen domain start driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Directly call either the XenD or XM driver when starting a persistent domain Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 20 +++- src/xen/xen_driver.h| 1 - src/xen/xend_internal.c | 20 +--- src/xen/xm_interna

[libvirt] [PATCH 29/40] Simplify the Xen domain stats/peek / node memory driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the Xen domain stats / peek and node memory driver methods unconditionally call the sub-drivers which are guaranteed to be open. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 59 + src/xen/xend_in

[libvirt] [PATCH 15/40] Simplify the Xen domain get OS type driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make xenUnifiedDomainGetOSType directly call either the xenHypervisorDomainGetOSType or xenDaemonDomainGetOSType method depending on whether the domain is active or not. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 19 ++- src/xen/xen_driv

[libvirt] [PATCH 27/40] Simplify the Xen domain scheduler parameter driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the Xen domain scheduler parameter methods directly call into XenD or Xen hypervisor drivers Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 54 +--- src/xen/xen_driver.h | 15 -- src/x

[libvirt] [PATCH 03/40] Remove pointless GET_PRIVATE macro from Xen driver

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The Xen driver uses a macro GET_PRIVATE as a supposed shorthand for 'xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) (conn)->privateData'. It does not in fact save any lines of code, and obscures what is happening. Remove it, since it adds no value. Signed-off-by: D

[libvirt] [PATCH 11/40] Simplify the Xen domain is persistent driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call xenDaemonLookupByUUID, since the XenD driver must always be present. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/xe

Re: [libvirt] [libvirt-glib] object: Add "transfer none" annotation to argv parameter

2013-05-02 Thread Zeeshan Ali (Khattak)
On Wed, Apr 17, 2013 at 2:53 PM, Claudio Bley wrote: > At Wed, 17 Apr 2013 10:17:42 +0200, > Christophe Fergeau wrote: >> >> This makes the parameter to be passed "unowned" in Vala. This was >> previously done using a vala metadata file, but it's better to do >> it directly through a gtk-doc annot

[libvirt] [PATCH 06/40] Simplify the Xen get version driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The hypervisor driver is mandatory, so the the call to xenHypervisorGetVersion must always succeed. Thus there is no need to ever run xenDaemonGetVersion Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 11 +-- src/xen/xen_driver.h | 1 -

[libvirt] [PATCH 10/40] Simplify the Xen domain lookup driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally invoke the xenHypervisorLookupDomainByID, xenHypervisorLookupDomainByUUID or xenDaemonLookupByName for looking up domains. Fallback to xenXMDomainLookupByUUID and xenXMDomainLookupByName for legacy XenD without inactive domain support Signed-off-by: Dan

[libvirt] [PATCH 21/40] Simplify the Xen domain get XML driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The xenUnifiedDomainGetXMLDesc driver can assume that the XM and XenD drivers are always present Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 24 +--- src/xen/xend_internal.c | 6 -- 2 files changed, 9 insertions(+), 21 del

[libvirt] [PATCH 14/40] Simplify the Xen domain destroy driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call the xenDaemonDomainDestroyFlags API since the XenD driver is always available. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 19 +--- src/xen/xen_driver.h | 1 - src/xen/xen_hypervisor.c | 76 --

[libvirt] [PATCH 35/40] Convert Xen domain VCPU driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain VCPU APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid points to

[libvirt] [PATCH 17/40] Simplify the Xen domain get/set (max) memory driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Simplify the Xen memory limit driver methods to directly call the most appropriate sub-driver Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 50 ++- src/xen/xen_driver.h | 3 -- src/xen/xen_hypervisor.c | 35

[libvirt] [PATCH 25/40] Simplify the Xen domain define/undefine driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the domain define/undefine driver methods directly call into either the XenD or XM drivers Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 24 src/xen/xen_driver.h| 2 -- src/xen/xend_internal.c | 10 -- src/

[libvirt] [PATCH 13/40] Simplify the Xen domain shutdown/reboot driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the xenUnifiedDomainShutdownFlags and xenUnifiedDomainReboot driver methods unconditionally call the XenD APIs for shutdown and reboot. Delete the unreachable impls in the XenStore driver. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 22 +++---

[libvirt] [PATCH 04/40] Simplify opening of Xen drivers

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Since the Xen driver was changed to only execute inside libvirtd, there is no scenario in which it will be opened from a non-privileged context. This all the code dealing with opening the sub-drivers can be simplified to assume that they are always privileged. Signed-o

[libvirt] [PATCH 18/40] Simplify the Xen domain get info/state driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the xenUnifiedDomainGetInfo and xenUnifiedDomainGetState drivers call the correct sub-driver APIs directly. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 52 +++-- src/xen/xen_driver.h | 1 - src/xen/xen_hypervisor.c |

[libvirt] [PATCH 23/40] Simplify the Xen driver define domain driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Directly call either XenD or the XM driver for handling domain define operations. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 28 ++-- src/xen/xen_driver.h| 2 -- src/xen/xend_internal.c | 18 +++--- src/xe

[libvirt] [PATCH 19/40] Simplify the Xen domain save/restore driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call the XenD APIs for save/restore, since that driver will always be open. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 21 - src/xen/xend_internal.c | 2 ++ 2 files changed, 6 insertions(+), 17 deletions(-) d

[libvirt] [PATCH 40/40] Convert Xen domain core dump driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain coredump APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid point

[libvirt] [PATCH 38/40] Convert Xen domain scheduler driver methods to use virDomainDefPtr

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Introduce use of a virDomainDefPtr in the domain scheduler APIs to simplify introduction of ACL security checks. The virDomainPtr cannot be safely used, since the app may have supplied mis-matching name/uuid/id fields. eg the name points to domain X, while the uuid poin

[libvirt] [PATCH 28/40] Simplify the Xen domain autostart driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call into the XenD or XM drivers for autostart handling, since they are guaranteed to be open --- src/xen/xen_driver.c| 18 -- src/xen/xend_internal.c | 14 -- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git

[libvirt] [PATCH 02/40] Remove VIR_CONNECT_RO checks from xen drivers

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Some of the Xen sub-drivers have checks against the VIR_CONNECT_RO flag. This is not required, since such checks are done at the top level before the driver methods are invoked Signed-off-by: Daniel P. Berrange --- src/xen/xm_internal.c | 24 ++--

[libvirt] [PATCH 20/40] Simplify the Xen domain VCPU driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 91 src/xen/xen_driver.h | 2 -- src/xen/xen_hypervisor.c | 90 --- src/xen/xen_hypervisor.h | 3 -- src

[libvirt] [PATCH 08/40] Simplify the Xen count/list domains driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The XenStore driver is mandatory, so it can be used unconditonally for the xenUnifiedConnectListDomains & xenUnifiedConnectNumOfDomains drivers. Delete the unused XenD and Hypervisor driver code for listing / counting domains Signed-off-by: Daniel P. Berrange --- src

[libvirt] [PATCH 07/40] Simplify the Xen get max vcpus / node get info driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call into xenHypervisorGetMaxVcpus and xenDaemonNodeGetInfo respectively, since those drivers are both mandatory Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --

[libvirt] [PATCH 09/40] Simplify the Xen domain create driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Unconditionally call xenDaemonCreateXML in the xenUnifiedDomainCreateXML driver, since the XenD driver is always present. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c| 6 ++ src/xen/xend_internal.c | 4 +--- src/xen/xend_internal.h | 3 +-- 3 fi

[libvirt] [PATCH 01/40] Remove xen driver checks for priv->handle < 0

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The Xen hypervisor driver checks for 'priv->handle < 0' and returns -1, but without raising any error. Fortunately this code will never be executed, since the main Xen driver always checks 'priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET]' prior to invoking any hypervisor AP

[libvirt] [PATCH 05/40] Simplify the Xen get type driver method

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" There is no point iterating over sub-drivers since the user would not have a virConnectPtr instance at all if opening the drivers failed. Just return 'Xen' immediately. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 11 ++- 1 file changed, 2 ins

[libvirt] [PATCH 12/40] Simplify the Xen domain suspend/resume driver methods

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Update xenUnifiedDomainSuspend and xenUnifiedDomainResume to unconditionally invoke the XenD APIs for suspend/resume. Delete the impls in the hypervisor driver which was unreachable. Signed-off-by: Daniel P. Berrange --- src/xen/xen_driver.c | 38 +-

[libvirt] [PATCH 00/40] Refactor Xen driver to support ACL work

2013-05-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The Xen driver currently is a really horrible mess, in particular with the way iterates over sub-drivers calling each one in turn, until one magically works. For each operation there is always a clear rule for which sub-driver must be used. Thus instead of blindly itera

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 4/9] target-i386: Replace cpuid_*features fields with a feature word array

2013-05-02 Thread Eduardo Habkost
On Thu, May 02, 2013 at 01:03:01AM +0200, Andreas Färber wrote: > Am 22.04.2013 21:00, schrieb Eduardo Habkost: > > This replaces the feature-bit fields on both X86CPU and x86_def_t > > structs with an array. > > > > With this, we will be able to simplify code that simply does the same > > operati

Re: [libvirt] [PATCH] virthreadpthread: don't try to cast pthread_t to void*

2013-05-02 Thread Eric Blake
On 05/02/2013 08:42 AM, Claudio Bley wrote: > Since the warning only ever refers to directly casting a function > return value, wouldn't it suffice to introduce a (properly typed) > variable first assigning the function result? > > pthread_t self = pthread_self(); > return (int)(intptr_t)self; Yo

Re: [libvirt] [PATCH] esx: Reduce code duplication in generator

2013-05-02 Thread Eric Blake
On 05/02/2013 07:56 AM, Eric Blake wrote: > On 05/02/2013 07:09 AM, Matthias Bolte wrote: >> 2013/5/2 Eric Blake : >>> On 05/01/2013 12:44 PM, Matthias Bolte wrote: --- src/esx/esx_vi_generator.py | 430 --- 1 file changed, 118 insertio

Re: [libvirt] [PATCH] virthreadpthread: don't try to cast pthread_t to void*

2013-05-02 Thread Claudio Bley
At Thu, 02 May 2013 07:54:47 -0600, Eric Blake wrote: > > [1 ] > [1.1 ] > On 05/02/2013 06:05 AM, Guido Günther wrote: > > This fixes the build on kFreeBSD that otherwise fails with: > > > > util/virthreadpthread.c: In function 'virThreadSelfID': > > util/virthreadpthread.c:222:27: error: cast

Re: [libvirt] Release of libvirt-1.0.5

2013-05-02 Thread Daniel Veillard
On Thu, May 02, 2013 at 03:14:32PM +0100, Daniel P. Berrange wrote: > On Thu, May 02, 2013 at 10:08:11PM +0800, Daniel Veillard wrote: > > On Thu, May 02, 2013 at 03:35:50PM +0200, Guido Günther wrote: > > > On Thu, May 02, 2013 at 06:39:07PM +0800, Daniel Veillard wrote: > > > > I forgot to make

Re: [libvirt] Location of 64 bit libvirt dlls (Windows)?

2013-05-02 Thread Daniel P. Berrange
On Thu, May 02, 2013 at 04:03:33PM +0200, Christophe Fergeau wrote: > On Thu, May 02, 2013 at 03:29:47PM +0200, Matthias Bolte wrote: > > The last time (like a year ago) I tried the Fedora MinGW build of > > libvirt it just crashed on me and I was unable to figure out what the > > problem was. > >

Re: [libvirt] Release of libvirt-1.0.5

2013-05-02 Thread Daniel P. Berrange
On Thu, May 02, 2013 at 10:08:11PM +0800, Daniel Veillard wrote: > On Thu, May 02, 2013 at 03:35:50PM +0200, Guido Günther wrote: > > On Thu, May 02, 2013 at 06:39:07PM +0800, Daniel Veillard wrote: > > > I forgot to make the rc2 release on tuesday, but looking at the > > > git state it was looki

  1   2   >