Re: [libvirt] [PATCH V2] Do not drop kernel cmdline for xen pv domains

2011-07-08 Thread Matthias Bolte
2011/7/8 Jim Fehlig jfeh...@novell.com: Kernel cmdline args can be passed to xen pv domains even when a bootloader is specified.  The current config-to-sxpr mapping ignores cmdline when bootloader is present. Since the xend sub-driver is used with many xen toolstack versions, this patch

Re: [libvirt] [PATCH] qemu: Don't chown files on NFS share if dynamic_ownership is off

2011-07-08 Thread Michal Privoznik
On 07.07.2011 20:12, Laine Stump wrote: On 07/07/2011 12:00 PM, Michal Privoznik wrote: On 07.07.2011 17:52, Eric Blake wrote: On 07/07/2011 09:33 AM, Michal Privoznik wrote: When dynamic ownership is disabled we don't want to chown any files, not just local. Is there more details on a

[libvirt] [PATCH] Add domain type checking

2011-07-08 Thread Matthias Bolte
The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. For convenience add an optional check for the domain type for the virDomainDefParse* functions. It's optional because in some places

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-07-08 Thread Stefan Hajnoczi
On Thu, Jul 7, 2011 at 8:34 PM, Eric Blake ebl...@redhat.com wrote: On 07/07/2011 03:13 AM, Stefan Hajnoczi wrote: On Wed, Jul 6, 2011 at 3:03 PM, Eric Blake ebl...@redhat.com wrote: In other words, it looks like we are stuck with updating XML to track new file names any time we take a

[libvirt] [PATCH] Fix mistaken order of server cert/key parameters in constructor

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The virNetTLSContextNew was being passed key/cert parameters in the wrong order. This wasn't immediately visible because if virNetTLSContextNewPath was used, a second bug reversed the order of those parameters again. Only if the paths were manually

[libvirt] [PATCH] sanlock: avoid lockspace setup when auto_disk_lease is off

2011-07-08 Thread Federico Simoncelli
When auto_disk_lease is off we should avoid the automatic lockspace creation. Signed-off-by: Federico Simoncelli fsimo...@redhat.com --- src/locking/lock_driver_sanlock.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c

[libvirt] [PATCH 2/5] Fix leak of 'msg' object in client stream code

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com In one exit path we forgot to free the virNetMessage object causing a large memory leak for streams which send alot of data. Some other paths were calling VIR_FREE directly instead of virNetMessageFree although this was (currently) harmless. *

[libvirt] [PATCH 5/5] Fix sending of reply to final RPC message

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The dispatch for the CLOSE RPC call was invoking the method virNetServerClientClose(). This caused the client connection to be immediately terminated. This meant the reply to the final RPC message was never sent. Prior to the RPC rewrite we merely

[libvirt] [PATCH 4/5] Fix leak of remote driver if final 'CLOSE' RPC call fails

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When closing a remote connection we issue a (fairly pointless) 'CLOSE' RPC call to the daemon. If this fails we skip all the cleanup of private data, but the virConnectPtr object still gets released as normal. This causes a memory leak. Since the CLOSE

Re: [libvirt] [PATCH 1/8] Define a QEMU specific API to attach to a running QEMU process

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 12:54:32PM +0200, Matthias Bolte wrote: 2011/7/4 Daniel P. Berrange berra...@redhat.com: Introduce a new API in libvirt-qemu.so  virDomainPtr virDomainQemuAttach(virConnectPtr domain,                                  unsigned long long pid,                        

[libvirt] [PATCH] Define remote wire protocol impls for virDomainQemuAttach

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This tweaks the RPC generator to cope with some naming conventions used for the QEMU specific APIs * daemon/remote.c: Server side dispatcher * src/remote/remote_driver.c: Client side dispatcher * src/remote/qemu_protocol.x: Wire protocol definition *

Re: [libvirt] [PATCH 8/8] Implement code to attach to external QEMU instances.

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 03:09:23PM +0200, Matthias Bolte wrote: 2011/7/4 Daniel P. Berrange berra...@redhat.com: Given a PID, the QEMU driver reads /proc/$PID/cmdline and /proc/$PID/environ to get the configuration. This is fed into the ARGV-XML convertor to build an XML configuration for

Re: [libvirt] [PATCH 2/8] Define remote wire protocol impls for virDomainQemuAttach

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 01:07:45PM +0200, Matthias Bolte wrote: 2011/7/4 Daniel P. Berrange berra...@redhat.com: * daemon/remote.c: Server side dispatcher * src/remote/remote_driver.c: Client side dispatcher * src/remote/qemu_protocol.x: Wire protocol definition ---  daemon/remote.c    

Re: [libvirt] [PATCH 05/10] conf: put virtPortProfile struct / functions in a common location

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 03:45:53AM -0400, Laine Stump wrote: virtPortProfiles are currently only used in the domain XML, but will soon also be used in the network XML. To prepare for that change, this patch moves the structure definition into util/network.h and the parse and format functions

[libvirt] [PATCH 3/5] Fix release of outgoing stream confirmation/abort message

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When sending back the final OK or ERROR message on completion of a stream, we were not decrementing the 'nrequests' tracker on the client. With the default requests limit of '5', this meant once a client had created 5 streams, they are unable to

[libvirt] [PATCH 1/5] Fix potential crash in libvirtd with active streams

2011-07-08 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If a client disconnects while it has a stream active, there is a race condition which could see libvirtd crash. This is because the client struct may be freed before the last stream event has triggered. THis is trivially solved by holding an extra

Re: [libvirt] [PATCH 06/10] network: RNG changes for virtual switch

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 03:45:54AM -0400, Laine Stump wrote: This adds virtualportprofile and portgroup (which itself can contain a portgroup) to network, adds several new options to forward mode, and adds an optional pool of interfaces to forward. Since virtualPortProfile is now used in

[libvirt] [PATCH 0/5] Fix misc problems in the RPC code

2011-07-08 Thread Daniel P. Berrange
This series of patches fixes a couple of memory leaks, one crash and a missing reply to the final RPC message on a connection being closed -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 03:45:55AM -0400, Laine Stump wrote: This implements the changes to network and domain interface XML that were earlier specified in the RNG. Each virDomainNetDef now also potentially has a virDomainActualNetDef which is a private object (never exported/imported via

Re: [libvirt] [PATCH] Define remote wire protocol impls for virDomainQemuAttach

2011-07-08 Thread Matthias Bolte
2011/7/8 Daniel P. Berrange berra...@redhat.com: From: Daniel P. Berrange berra...@redhat.com This tweaks the RPC generator to cope with some naming conventions used for the QEMU specific APIs * daemon/remote.c: Server side dispatcher * src/remote/remote_driver.c: Client side dispatcher *

[libvirt] [PATCH] util: Don't try to fchown files opened as non-root

2011-07-08 Thread Jiri Denemark
When virFileOpenAs is called with VIR_FILE_OPEN_AS_UID flag and uid/gid different from root/root while libvirtd is running as root, we fork a new child, change its effective UID/GID to uid/gid and run virFileOpenAsNoFork. It doesn't make any sense to fchown() the opened file in this case since we

Re: [libvirt] [PATCH 08/10] network: separate Start/Shutdown functions for new network types

2011-07-08 Thread Daniel P. Berrange
On Tue, Jul 05, 2011 at 03:45:56AM -0400, Laine Stump wrote: Previously all networks were composed of bridge devices created and managed by libvirt, and the same operations needed to be done for all of them when they were started and stopped (create and start the bridge device, configure its

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-07-08 Thread Jes Sorensen
On 07/08/11 10:58, Stefan Hajnoczi wrote: On Thu, Jul 7, 2011 at 8:34 PM, Eric Blake ebl...@redhat.com wrote: Well, the best thing (from libvirt's point of view) would be if snapshot_blkdev took a single string argument, which is either a /path/to/filename (and qemu does open()) or fd:name

Re: [libvirt] [PATCH] Add domain type checking

2011-07-08 Thread Eric Blake
On 07/08/2011 02:13 AM, Matthias Bolte wrote: The drivers were accepting domain configs without checking if those were actually meant for them. For example the LXC driver happily accepts configs with type QEMU. For convenience add an optional check for the domain type for the

Re: [libvirt] [PATCH] Define remote wire protocol impls for virDomainQemuAttach

2011-07-08 Thread Eric Blake
On 07/08/2011 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This tweaks the RPC generator to cope with some naming conventions used for the QEMU specific APIs * daemon/remote.c: Server side dispatcher * src/remote/remote_driver.c: Client side dispatcher

Re: [libvirt] [PATCH] util: Don't try to fchown files opened as non-root

2011-07-08 Thread Eric Blake
On 07/08/2011 07:30 AM, Jiri Denemark wrote: When virFileOpenAs is called with VIR_FILE_OPEN_AS_UID flag and uid/gid different from root/root while libvirtd is running as root, we fork a new child, change its effective UID/GID to uid/gid and run virFileOpenAsNoFork. It doesn't make any sense

Re: [libvirt] RFC: API additions for enhanced snapshot support

2011-07-08 Thread Eric Blake
On 07/08/2011 07:35 AM, Jes Sorensen wrote: On 07/08/11 10:58, Stefan Hajnoczi wrote: On Thu, Jul 7, 2011 at 8:34 PM, Eric Blake ebl...@redhat.com wrote: Well, the best thing (from libvirt's point of view) would be if snapshot_blkdev took a single string argument, which is either a

[libvirt] [PATCH v3] bios: Add support for SGA

2011-07-08 Thread Michal Privoznik
This patch creates new bios element which, at this time has the only attribute useserial='yes|no'. This attribute allow users to use Serial Graphics Adapter and see BIOS messages from the very first moment domain boots up. Therefore, users can choose boot medium, set PXE, etc. --- diff to v2:

[libvirt] Exposing qemu support for SDL via capabilities

2011-07-08 Thread Adam Litke
Hi all, In order to nicely support domains that use qemu's SDL support, libvirt-cim is looking for a way to confirm if the underlying qemu emulator can support SDL. Libvirt already knows this information internally. It seems to me that the best way to provide this information is by reporting it

Re: [libvirt] [PATCH] Don't exist if the libvirtd config does not exist

2011-07-08 Thread Matthias Bolte
2011/7/8 Daniel P. Berrange berra...@redhat.com: From: Daniel P. Berrange berra...@redhat.com It is common for the $HOME/.libvirt/libvirtd.conf file to not exist. Treat this situation as non-fatal since we can carry on with our default settings just fine. * daemon/libvirtd.c: Treat ENOENT

Re: [libvirt] [PATCH] Fix mistaken order of server cert/key parameters in constructor

2011-07-08 Thread Jiri Denemark
On Fri, Jul 08, 2011 at 11:16:03 +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virNetTLSContextNew was being passed key/cert parameters in the wrong order. This wasn't immediately visible because if virNetTLSContextNewPath was used, a second bug reversed

Re: [libvirt] [PATCH 1/5] Fix potential crash in libvirtd with active streams

2011-07-08 Thread Eric Blake
On 07/08/2011 05:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If a client disconnects while it has a stream active, there is a race condition which could see libvirtd crash. This is because the client struct may be freed before the last stream event has

Re: [libvirt] [PATCH 2/5] Fix leak of 'msg' object in client stream code

2011-07-08 Thread Eric Blake
On 07/08/2011 05:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com In one exit path we forgot to free the virNetMessage object causing a large memory leak for streams which send alot of data. Some other s/alot/a lot/ paths were calling VIR_FREE directly instead

Re: [libvirt] [PATCH 3/5] Fix release of outgoing stream confirmation/abort message

2011-07-08 Thread Eric Blake
On 07/08/2011 05:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When sending back the final OK or ERROR message on completion of a stream, we were not decrementing the 'nrequests' tracker on the client. With the default requests limit of '5', this meant once a

Re: [libvirt] [PATCH 4/5] Fix leak of remote driver if final 'CLOSE' RPC call fails

2011-07-08 Thread Eric Blake
On 07/08/2011 05:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When closing a remote connection we issue a (fairly pointless) 'CLOSE' RPC call to the daemon. If this fails we skip all the cleanup of private data, but the virConnectPtr object still gets

Re: [libvirt] [PATCH 5/5] Fix sending of reply to final RPC message

2011-07-08 Thread Eric Blake
On 07/08/2011 05:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The dispatch for the CLOSE RPC call was invoking the method virNetServerClientClose(). This caused the client connection to be immediately terminated. This meant the reply to the final RPC message

Re: [libvirt] [PATCH v4] graphics: add support for action_if_connected in qemu

2011-07-08 Thread Michal Privoznik
On 07.07.2011 20:25, Eric Blake wrote: On 07/07/2011 02:59 AM, Michal Privoznik wrote: On 06.07.2011 00:34, Eric Blake wrote: This patch changes the .xml, but not the corresponding .args file, which to me says it is probably incomplete. We covered the case of changing the attribute affecting

[libvirt] [PATCH 1/2] qemu: return error condition

2011-07-08 Thread Michael Santos
--- src/qemu/qemu_bridge_filter.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_bridge_filter.c b/src/qemu/qemu_bridge_filter.c index f700631..03ed284 100644 --- a/src/qemu/qemu_bridge_filter.c +++ b/src/qemu/qemu_bridge_filter.c @@ -78,6 +78,7 @@

[libvirt] [PATCH 2/2] qemu: clean up OOM checks

2011-07-08 Thread Michael Santos
--- src/qemu/qemu_command.c | 40 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6e4480e..19151ce 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5712,6

Re: [libvirt] Exposing qemu support for SDL via capabilities

2011-07-08 Thread Richard W.M. Jones
On Fri, Jul 08, 2011 at 09:19:46AM -0500, Adam Litke wrote: Hi all, In order to nicely support domains that use qemu's SDL support, libvirt-cim is looking for a way to confirm if the underlying qemu emulator can support SDL. Libvirt already knows this information internally. It seems to

[libvirt] testsuite formatting bugs [was: [PATCH] Skip some xen tests if xend is not running]

2011-07-08 Thread Eric Blake
On 07/07/2011 04:21 PM, Eric Blake wrote: Oh, and our testsuite has a cosmetic bug. After applying your patch, I see this during 'make check': TEST: xencapstest .. 10 OK PASS: xencapstest SKIP: reconnect TEST: statstest 0 FAIL SKIP:

Re: [libvirt] Exposing qemu support for SDL via capabilities

2011-07-08 Thread Adam Litke
On 07/08/2011 10:14 AM, Richard W.M. Jones wrote: On Fri, Jul 08, 2011 at 09:19:46AM -0500, Adam Litke wrote: Hi all, In order to nicely support domains that use qemu's SDL support, libvirt-cim is looking for a way to confirm if the underlying qemu emulator can support SDL. Libvirt

Re: [libvirt] [PATCH] Don't exist if the libvirtd config does not exist

2011-07-08 Thread Eric Blake
On 07/08/2011 08:28 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com It is common for the $HOME/.libvirt/libvirtd.conf file to not exist. Treat this situation as non-fatal since we can carry on with our default settings just fine. * daemon/libvirtd.c: Treat

Re: [libvirt] [PATCH] Don't exist if the libvirtd config does not exist

2011-07-08 Thread Eric Blake
On 07/08/2011 10:07 AM, Eric Blake wrote: On 07/08/2011 08:28 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com It is common for the $HOME/.libvirt/libvirtd.conf file to not exist. Treat this situation as non-fatal since we can carry on with our default settings just

[libvirt] [PATCH] libvirtd: diagnose explicitly requested but missing conf file

2011-07-08 Thread Eric Blake
Fixes test regression introduced in commit 8e2e4780. * daemon/libvirtd.c (daemonConfigLoad): Add argument. (main): Update caller. --- Pushing under the build-breaker rule, since it is detected by 'make check'. daemon/libvirtd.c | 19 --- 1 files changed, 12 insertions(+), 7

[libvirt] [PATCHv2 01/27] maint: exclude more files from syntax check

2011-07-08 Thread Eric Blake
* cfg.mk (VC_LIST_ALWAYS_EXCLUDE_REGEX): Exempt docs/api_extension/*.patch. (exclude_file_name_regexp--sc_prohibit_always_true_header_tests) (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF) (exclude_file_name_regexp--sc_prohibit_fork_wrappers)

[libvirt] [PATCHv2 04/27] libvirt-qemu: use unsigned flags

2011-07-08 Thread Eric Blake
Like commit 1740c381, but for libvirt-qemu. * src/remote/qemu_protocol.x (qemu_monitor_command_args): Adjust type to match API. * src/qemu_protocol-structs: Update accordingly. --- v2: new patch src/qemu_protocol-structs |2 +- src/remote/qemu_protocol.x |4 ++-- 2 files changed, 3

[libvirt] [PATCHv2 00/27] flags cleanup

2011-07-08 Thread Eric Blake
Addressing my review comments from round 1, and introducing a few more goodies along the way. I've added some syntax checks to make it easier to stick with this style in the future. v1 was at https://www.redhat.com/archives/libvir-list/2011-July/msg00264.html, with patches 1-5 already applied,

[libvirt] [PATCHv2 08/27] esx: reject unknown flags

2011-07-08 Thread Eric Blake
Silently ignored flags get in the way of new features that use those flags. * src/esx/esx_device_monitor.c (esxDeviceOpen): Reject unknown flags. * src/esx/esx_driver.c (esxOpen, esxDomainReboot) (esxDomainXMLFromNative, esxDomainXMLToNative) (esxDomainMigratePrepare, esxDomainMigratePerform)

[libvirt] [PATCHv2 02/27] maint: print flags in hex during debug

2011-07-08 Thread Eric Blake
Continuation of commit 313ac7fd, and enforce things with a syntax check. Technically, virNetServerClientCalculateHandleMode is not printing a mode_t, but rather a collection of VIR_EVENT_HANDLE_* bits; however, these bits are 8, so there is no different in the output, and that was the easiest

[libvirt] [PATCHv2 07/27] storage: reject unknown flags

2011-07-08 Thread Eric Blake
* src/storage/storage_backend.c (virStorageBackendCreateBlockFrom) (virStorageBackendCreateQemuImg) (virStorageBackendCreateQcowCreate): Reject unknown flags. * src/storage/storage_backend_disk.c (virStorageBackendDiskBuildPool) (virStorageBackendDiskDeleteVol): Likewise. *

[libvirt] [PATCHv2 10/27] lxc: reject unknown flags

2011-07-08 Thread Eric Blake
* src/lxc/lxc_driver.c (lxcOpen, lxcDomainSetMemoryParameters) (lxcDomainGetMemoryParameters): Reject unknown flags. * src/lxc/lxc_container.c (lxcContainerStart): Use unsigned flags. --- src/lxc/lxc_container.c |4 ++-- src/lxc/lxc_driver.c| 12 +--- 2 files changed, 11

[libvirt] [PATCHv2 12/27] phyp: reject unknown flags

2011-07-08 Thread Eric Blake
* src/phyp/phyp_driver.c (phypOpen, phypDomainReboot) (phypVIOSDriverOpen): Reject unknown flags. --- src/phyp/phyp_driver.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index d1ab5b4..dd5ab85 100644 ---

[libvirt] [PATCHv2 05/27] util: reject unknown flags, and prefer unsigned flags

2011-07-08 Thread Eric Blake
Silently ignored flags get in the way of new features that use those flags. Also, an upcoming syntax check will favor unsigned flags. * src/nodeinfo.h (nodeGetCPUStats, nodeGetMemoryStats): Drop unused attribute. * src/interface/netcf_driver.c (interfaceOpenInterface) (interfaceDefineXML,

[libvirt] [PATCHv2 17/27] vmware: reject unknown flags

2011-07-08 Thread Eric Blake
* src/vmware/vmware_driver.c (vmwareOpen, vmwareDomainReboot) (vmwareDomainCreateXML, vmwareDomainCreateWithFlags): Reject unknown flags. --- src/vmware/vmware_driver.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/vmware/vmware_driver.c

[libvirt] [PATCHv2 15/27] uml: reject unknown flags

2011-07-08 Thread Eric Blake
* src/uml/uml_driver.c (umlOpen, umlDomainGetXMLDesc) (umlDomainBlockPeek): Reject unknown flags. --- src/uml/uml_driver.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 6a396e4..9f66aee 100644 ---

[libvirt] [PATCHv2 06/27] node_device: reject unknown flags

2011-07-08 Thread Eric Blake
* src/node_device/node_device_driver.c (nodeNumOfDevices) (nodeListDevices, nodeDeviceGetXMLDesc, nodeDeviceCreateXML): Reject unknown flags. * src/node_device/node_device_hal.c (halNodeDrvOpen): Likewise. * src/node_device/node_device_udev.c (udevNodeDrvOpen): Likewise. ---

[libvirt] [PATCHv2 18/27] xen: reject unknown flags

2011-07-08 Thread Eric Blake
* src/xen/xen_driver.c (xenUnifiedDomainXMLFromNative) (xenUnifiedDomainXMLToNative, xenUnifiedDomainBlockPeek): Reject unknown flags. * src/xen/xen_hypervisor.c (xenHypervisorOpen) (xenHypervisorGetDomainState): Likewise. * src/xen/xen_inotify.c (xenInotifyOpen): Likewise. * src/xen/xs_internal.c

[libvirt] [PATCHv2 09/27] libxl: reject unknown flags

2011-07-08 Thread Eric Blake
* src/libxl/libxl_driver.c (libxlOpen, libxlDomainReboot) (libxlDomainXMLFromNative, libxlDomainXMLToNative) (libxlDomainCreateWithFlags): Reject unknown flags. --- src/libxl/libxl_driver.c | 18 +- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git

[libvirt] [PATCHv2 19/27] xenapi: reject unknown flags

2011-07-08 Thread Eric Blake
* src/xenapi/xenapi_driver.c (xenapiOpen, xenapiDomainReboot) (xenapiDomainGetXMLDesc): Reject unknown flags. --- src/xenapi/xenapi_driver.c | 13 ++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index

[libvirt] [PATCHv2 21/27] node_device: avoid implicit int

2011-07-08 Thread Eric Blake
'unsigned a' and 'unsigned int a' are synonyms, but we generally always spell out the 'int' in that case. Fixing this will avoid a false positive in the next syntax-check commit. * src/conf/node_device_conf.h (pci_config_address) (_virNodeDevCapsDef): Prefer 'unsigned int' over 'unsigned'. ---

[libvirt] [PATCHv2 26/27] remote: prefer unsigned flags

2011-07-08 Thread Eric Blake
* src/remote/remote_driver.c (call, remoteOpenSecondaryDriver): Prefer unsigned flags. --- v2: new patch src/remote/remote_driver.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 8dff6a8..2bfb15b 100644

[libvirt] [PATCHv2 16/27] vbox: reject unknown flags

2011-07-08 Thread Eric Blake
* src/vbox/vbox_driver.c (vboxOpenDummy): Reject unknown flags. * src/vbox/vbox_tmpl.c (vboxOpen, vboxDomainReboot) (vboxNetworkOpen, vboxNetworkGetXMLDesc, vboxStorageOpen) (vboxStorageVolCreateXML, vboxStorageVolDelete) (vboxStorageVolGetXMLDesc, vboxDomainScreenshot): Likewise. ---

[libvirt] [PATCHv2 20/27] virsh, daemon: prefer unsigned flags

2011-07-08 Thread Eric Blake
* tools/virsh.c (vshCmdDef): Change flags type. * daemon/remote.c (remoteDispatchOpen): Likewise. --- v2: new patch daemon/remote.c |2 +- tools/virsh.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index a2e79ef..1ade187

[libvirt] [PATCHv2 24/27] build: don't hand-roll cloexec code

2011-07-08 Thread Eric Blake
No need to repeat common code. * src/util/bridge.c (brInit): Use virSetCloseExec. (brSetInterfaceUp): Prefer unsigned flags. * src/uml/uml_driver.c (umlSetCloseExec): Delete. (umlStartVMDaemon): Use util version instead. --- v2: new patch src/uml/uml_driver.c | 19 +++

[libvirt] [PATCHv2 25/27] conf: delete unused flags arguments

2011-07-08 Thread Eric Blake
For static functions not used as callbacks, there's no need to keep an unused parameter. * src/conf/domain_conf.c (virDomainChrDefParseTargetXML) (virDomainTimerDefParseXML, virDomainHostdevSubsysUsbDefParseXML) (virDomainVcpuPinDefParseXML): Drop unused parameter. (virDomainChrDefParseXML,

[libvirt] [PATCHv2 27/27] build: add syntax check for proper flags use

2011-07-08 Thread Eric Blake
Enforce the recent flags cleanups - we want to use 'unsigned int flags' in any of our APIs (except where backwards compatibility is important, in the public migration APIs), and that all flags are checked for validity (except when there are stub functions that completely ignore the flags

Re: [libvirt] [PATCH 07/10] network: new XML to support virtual switch functionality

2011-07-08 Thread Eric Blake
On 07/05/2011 01:45 AM, Laine Stump wrote: This implements the changes to network and domain interface XML that were earlier specified in the RNG. +++ b/include/libvirt/libvirt.h.in @@ -1112,6 +1112,8 @@ typedef enum { VIR_DOMAIN_XML_SECURE = (1 0), /* dump security sensitive

Re: [libvirt] [PATCH 09/10] qemu: use virDomainNetGetActual*() functions where appropriate

2011-07-08 Thread Eric Blake
On 07/05/2011 01:45 AM, Laine Stump wrote: The qemu driver accesses fields in the virDomainNetDef directly, but with the advent of the virDomainActualNetDef, some pieces of information may be found in a different place (the ActualNetDef) if the network connection is of type='network' and that

Re: [libvirt] [PATCH 10/10] network: internal API functions to manage assignment of physdev to guest

2011-07-08 Thread Eric Blake
On 07/05/2011 01:45 AM, Laine Stump wrote: The network driver needs to assign physical devices for use by modes that use macvtap, keeping track of which physical devices are in use (and how many instances, when the devices can be shared). Three calls are added: networkAllocateActualDevice -

Re: [libvirt] [PATCH v3] bios: Add support for SGA

2011-07-08 Thread Eric Blake
On 07/08/2011 07:48 AM, Michal Privoznik wrote: This patch creates new bios element which, at this time has the only s/the only/only the/ attribute useserial='yes|no'. This attribute allow users to use Serial Graphics Adapter and see BIOS messages from the very first moment domain boots up.

Re: [libvirt] [PATCH] Define remote wire protocol impls for virDomainQemuAttach

2011-07-08 Thread Eric Blake
On 07/08/2011 07:40 AM, Eric Blake wrote: On 07/08/2011 06:20 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This tweaks the RPC generator to cope with some naming conventions used for the QEMU specific APIs * daemon/remote.c: Server side dispatcher *

Re: [libvirt] [PATCH 1/8] Define a QEMU specific API to attach to a running QEMU process

2011-07-08 Thread Eric Blake
On 07/04/2011 04:28 AM, Daniel P. Berrange wrote: Introduce a new API in libvirt-qemu.so virDomainPtr virDomainQemuAttach(virConnectPtr domain, unsigned long long pid, We already assert elsewhere in our code base that pid_t will always fit in int. For

Re: [libvirt] [PROPOSED PATCH] Change the creation of the TAP interface for generic ethernet interfaces

2011-07-08 Thread Eric Blake
On 07/07/2011 06:49 PM, Tyler Coumbes wrote: The code changes it so that the TAP interface is created by libvirt and then the file descriptor is passed to qemu. Much like what is done when using bridged networking. This is done using fd= instead of ifname= just like with the bridged

Re: [libvirt] [RFC] exporting KVM host power saving capabilities through libvirt

2011-07-08 Thread Dave Allan
On Mon, Jul 04, 2011 at 10:05:21PM +0530, Vaidyanathan Srinivasan wrote: * Dave Allan dal...@redhat.com [2011-07-01 16:56:29]: libvirt has virConnectGetCapabilities() that would export an XML file describing the capabilities of the host platform and guest features. KVM

Re: [libvirt] [RFC] exporting KVM host power saving capabilities through libvirt

2011-07-08 Thread Dave Allan
On Mon, Jul 04, 2011 at 10:00:20PM +0530, Vaidyanathan Srinivasan wrote: * Dave Allan dal...@redhat.com [2011-07-01 17:19:06]: On Fri, Jul 01, 2011 at 04:56:29PM -0400, Dave Allan wrote: On Tue, Jun 28, 2011 at 08:55:31PM +0530, Vaidyanathan Srinivasan wrote: Hi, Linux host

[libvirt] [PATCH] rpc: Fix whitespace problem in generated code

2011-07-08 Thread Matthias Bolte
Add missing line break and fix indention level. Reported by Cole Robinson. --- Pushing this under the trivial rule. src/rpc/gendispatch.pl |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 027560c..c69c5a2

Re: [libvirt] [PATCH 01/14] Remove unused virNetServerProgramErrorHander typedef

2011-07-08 Thread Eric Blake
On 07/07/2011 08:17 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com * src/rpc/virnetserverprogram.h: Remove unused typedef for virNetServerProgramErrorHander function callback * daemon/remote.h: Remove decl for non-existant variables --- daemon/remote.h

Re: [libvirt] 2/3 testsuite formatting bugs [was: [PATCH] Skip some xen tests if xend is not running]

2011-07-08 Thread Eric Blake
On 07/08/2011 05:28 PM, Matthias Bolte wrote: From a1508239af921289cd6e357e8521ff42faf535bd Mon Sep 17 00:00:00 2001 From: Matthias Bolte matthias.bo...@googlemail.com Date: Sat, 9 Jul 2011 01:24:16 +0200 Subject: [PATCH] tests: Add the logic to skip the statstest to the right place ---

Re: [libvirt] testsuite formatting bugs [was: [PATCH] Skip some xen tests if xend is not running]

2011-07-08 Thread Eric Blake
On 07/08/2011 05:28 PM, Matthias Bolte wrote: TEST: virsh-all 40 80 120 ... 159 OK PASS: virsh-all We're

Re: [libvirt] 1/3 testsuite formatting bugs [was: [PATCH] Skip some xen tests if xend is not running]

2011-07-08 Thread Eric Blake
On 07/08/2011 07:40 PM, Eric Blake wrote: Instead count from 0 to 39 to fix this. --- tests/test-lib.sh |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 768f96b..9eb6864 100644 --- a/tests/test-lib.sh +++