Re: [libvirt] [PATCH v3 2/3] build command line for pci-bridge device of qemu

2013-01-16 Thread li guang
在 2013-01-15二的 09:27 +,Daniel P. Berrange写道: On Mon, Jan 14, 2013 at 05:23:54PM +0100, Ján Tomko wrote: On 01/10/13 02:04, liguang wrote: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 04a9512..48b4f46 100644 --- a/src/qemu/qemu_command.c +++

Re: [libvirt] [PATCH v3 2/3] build command line for pci-bridge device of qemu

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 04:24:55PM +0800, li guang wrote: 在 2013-01-15二的 09:27 +,Daniel P. Berrange写道: On Mon, Jan 14, 2013 at 05:23:54PM +0100, Ján Tomko wrote: On 01/10/13 02:04, liguang wrote: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

Re: [libvirt] libvirt boolean type

2013-01-16 Thread Daniel P. Berrange
On Tue, Jan 15, 2013 at 03:34:42PM -0700, Eric Blake wrote: On 01/14/2013 01:02 AM, Claudio Bley wrote: Nonetheless, I think it still would be valuable as point 2 and 3 still hold. Just change the definition to: typedef int virBool; I'm not too fond of using the term 'bool' for

Re: [libvirt] [PATCH 0/6] add qemu usb-scsi controller support

2013-01-16 Thread Guannan Ren
On 01/14/2013 05:04 PM, Guannan Ren wrote: This patchset tries to add usb-scsi model for SCSI controller. http://lists.gnu.org/archive/html/qemu-devel/2012-06/msg03382.html usb-uas is a pure UAS (usb attached scsi) emulation. The emulation works like any other scsi hba emulation (eps, lsi,

Re: [libvirt] [RFC PATCH v1 6/7] deploy the newly introduced virCgroupItem.

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:08AM +0800, Hu Tao wrote: diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 7cb99b1..92e3292 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1442,6 +1442,9 @@ int main(int argc, char **argv) { VIR_FORCE_CLOSE(statuswrite); }

Re: [libvirt] [RFC PATCH v1 5/7] cgroup: refactor virCgroup

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:07AM +0800, Hu Tao wrote: This patch adds a new structure, virCgroupItem, to represent a cgroup directory(named cgroup item). cgroup directory is created when needed and removed if no one is using it. --- src/libvirt_private.syms | 7 + src/util/vircgroup.c

Re: [libvirt] [RFC PATCH v1 2/7] include util.h in cgroup.h

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:04AM +0800, Hu Tao wrote: required by VIR_ENUM_DECL. --- src/util/vircgroup.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 8b6d3b2..05f2e54 100644 --- a/src/util/vircgroup.h +++

Re: [libvirt] [RFC PATCH v1 3/7] include virterror_internal.h in threads.h

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:05AM +0800, Hu Tao wrote: required by virSetError. --- src/util/virthread.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virthread.h b/src/util/virthread.h index b11a251..c209440 100644 --- a/src/util/virthread.h +++ b/src/util/virthread.h

Re: [libvirt] [RFC PATCH v1 1/7] call virstateCleanup to do the cleanup before libvirtd exits

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:03AM +0800, Hu Tao wrote: --- daemon/libvirtd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 9cdf4d9..7cb99b1 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1500,5 +1500,7 @@ cleanup:

Re: [libvirt] [PATCH 2/2 v2] docs: Add some style and color to the HTML documentation

2013-01-16 Thread Jiri Denemark
On Thu, Jan 10, 2013 at 15:49:22 +0100, Claudio Bley wrote: At Thu, 10 Jan 2013 13:58:28 +0100, Jiri Denemark wrote: + +tt, pre { + font-family: Ubuntu Monospace, Consolas, Lucida Console, monospace; +} Do not do this. Default font-family for tt/pre is just good enough. If

Re: [libvirt] [PATCH v2 1/4] rpc: Check and message setsockopt()

2013-01-16 Thread Martin Kletzander
On 01/15/2013 07:12 PM, John Ferlan wrote: Check status when attempting to set SO_REUSEADDR flag on outgoing connection On failure, VIR_WARN(), but continue to connect. This code path is on the sender side where the setting is just a hint and would only take effect if the sender is overflowed

Re: [libvirt] [RFC PATCH v1 0/7] virCgroup refactor

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:02AM +0800, Hu Tao wrote: Hi, This series is posted for early review. This series refactors virCgroup. The changes are: - virCgroupItem is associated with a cgroup directory. The directory is created only when needed, and removed if no one is using

Re: [libvirt] [RFC PATCH v1 7/7] tests for virCgroup.

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 10:53:09AM +0800, Hu Tao wrote: --- tests/Makefile.am | 5 +++ tests/vircgrouptest.c | 103 ++ 2 files changed, 108 insertions(+) create mode 100644 tests/vircgrouptest.c diff --git a/tests/Makefile.am

Re: [libvirt] [PATCH v2 4/4] util: Check for negative indent in virBufferAdd

2013-01-16 Thread Martin Kletzander
On 01/15/2013 07:12 PM, John Ferlan wrote: --- src/util/virbuffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c index 969dcbf..693e4b2 100644 --- a/src/util/virbuffer.c +++ b/src/util/virbuffer.c @@ -153,10 +153,9

Re: [libvirt] [PATCH v2 2/4] tools: Check return status on virBufferTrim()

2013-01-16 Thread Martin Kletzander
On 01/15/2013 07:12 PM, John Ferlan wrote: --- tools/virsh.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index eadc519..669c9c9 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -536,6 +536,8 @@

Re: [libvirt] [PATCH v2 3/4] xen: Ignore return status for TCP_NODELAY

2013-01-16 Thread Martin Kletzander
On 01/15/2013 07:12 PM, John Ferlan wrote: --- src/xen/xend_internal.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index 959225c..038dd1e 100644 --- a/src/xen/xend_internal.c +++ b/src/xen/xend_internal.c @@

Re: [libvirt] [PATCH 3/7] Convert virDomainObj, qemuAgent, qemuMonitor, lxcMonitor to virObjectLockable

2013-01-16 Thread Daniel P. Berrange
On Tue, Jan 15, 2013 at 04:25:54PM -0700, Eric Blake wrote: On 01/11/2013 05:13 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The virDomainObj, qemuAgent, qemuMonitor, lxcMonitor classes all require a mutex, so can be switched to use virObjectLockable ---

Re: [libvirt] [PATCH 5/7] Add a port allocator class

2013-01-16 Thread Daniel P. Berrange
On Tue, Jan 15, 2013 at 05:30:23PM -0700, Eric Blake wrote: On 01/11/2013 05:13 AM, Daniel P. Berrange wrote: + +unsigned int start; +unsigned int end; +}; + +virPortAllocatorPtr virPortAllocatorNew(unsigned short start, +unsigned

[libvirt] [PATCH] lock_daemon: Simplify error handling

2013-01-16 Thread Peter Krempa
No need to check the run_dir variable twice for NULL. --- src/locking/lock_daemon.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index f0eba48..97e5d74 100644 --- a/src/locking/lock_daemon.c +++

[libvirt] Libvirt daemon not getting started

2013-01-16 Thread Varun Bhatnagar
Hi, Earlier I was having libvirt-0.7.5 but now I have installed 0.9.8 version of libvirt now. I am trying to start libvirt daemon using the command below but daemon it is not getting started and the PID file is not getting created. Tried /usr/loval/sbin/libvirtd -d option too. In that case I

Re: [libvirt] [PATCH] lock_daemon: Simplify error handling

2013-01-16 Thread Guannan Ren
On 01/16/2013 07:07 PM, Peter Krempa wrote: No need to check the run_dir variable twice for NULL. --- src/locking/lock_daemon.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index f0eba48..97e5d74 100644

[libvirt] iptables --physdev-out warnings

2013-01-16 Thread Reinier Schoof
Hi, we've experienced some issues with starting lots of KVM based VM's with libvirt. Since I couldn't find any clues on the libvirt mailing list, I'm posting the way I fixed the issues. When starting a VM, /var/log/messages was spammed with the following message: xt_physdev: using

[libvirt] iptables --physdev-out warnings

2013-01-16 Thread Reinier Schoof
Hi, we've experienced some issues with starting lots of KVM based VM's with libvirt. Since I couldn't find any clues on the libvirt mailing list, I'm posting the way I fixed the issues. When starting a VM, /var/log/messages was spammed with the following message: xt_physdev: using

[libvirt] [PATCH 00/13] More refactoring of QEMU driver objects locking

2013-01-16 Thread Daniel P. Berrange
This series does more general refactoring to help in the goal of killing the big QEMU driver lock. There are 3 key changes in this series - Isolating all QEMU configuration parameters in one struct. - Making virDomainObjList self-locking - Add dedicated locking to PCI/USB device lists There

[libvirt] [PATCH 03/13] Turn virDomainObjList into an opaque virObject

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com As a step towards making virDomainObjList thread-safe turn it into an opaque virObject, preventing any direct access to its internals. As part of this a new method virDomainObjListForEach is introduced to replace all existing usage of virHashForEach

[libvirt] [PATCH 04/13] Merge virDomainObjListIsDuplicate into virDomainObjListAdd

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The duplicate VM checking should be done atomically with virDomainObjListAdd, so shoud not be a separate function. Instead just use flags to indicate what kind of checks are required. This pair, used in virDomainCreateXML: if

Re: [libvirt] [PATCH 00/13] More refactoring of QEMU driver objects locking

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 02:06:11PM +, Daniel P. Berrange wrote: This series does more general refactoring to help in the goal of killing the big QEMU driver lock. There are 3 key changes in this series - Isolating all QEMU configuration parameters in one struct. - Making

[libvirt] [PATCH 06/13] Prevent nwfilter driver running on SIGHUP in session libvirtd

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Although the nwfilter driver skips startup when running in a session libvirtd, it did not skip reload or shutdown. This caused errors to be reported when sending SIGHUP to libvirtd --- src/conf/nwfilter_conf.h | 1 +

[libvirt] [PATCH 13/13] Introduce annotations for virQEMUDriverPtr fields

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Annotate the fields in virQEMUDriverPtr to indicate the locking rules for their use Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/qemu/qemu_conf.h | 22 ++ 1 file changed, 22 insertions(+) diff --git

[libvirt] [PATCH 12/13] Protect USB/PCI device list access in QEMU with dedicated locks

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Currently the activePciHostdevs, inactivePciHostdevsd and activeUsbHostdevs lists are all implicitly protected by the QEMU driver lock. Now that the lists all inherit from the virObjectLockable, we can make the locking explicit, removing the dependency

[libvirt] [PATCH 11/13] Convert virPCIDeviceList and virUSBDeviceList into virObjectLockable

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com To allow modifications to the lists to be synchronized, convert virPCIDeviceList and virUSBDeviceList into virObjectLockable classes. The locking, however, will not be self-contained. The users of these classes will have to call virObjectLock/Unlock in

[libvirt] [PATCH 08/13] Remove pointless 'qemuVersion' field from virQEMUDriverPtr

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The QEMU driver struct has a 'qemuVersion' field that was previously used to cache the version lookup from capabilities. With the recent QEMU capabilities rewrite the caching happens at a lower level so this field is pointless. Removing it avoids

[libvirt] [PATCH 07/13] Use atomic ops to increment nextvmid

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Use atomic ops to increment nextvmid and encapsulate it in a methd to prevent accidental non-atomic access --- src/qemu/qemu_conf.c| 6 ++ src/qemu/qemu_conf.h| 2 ++ src/qemu/qemu_process.c | 4 ++-- 3 files changed, 10 insertions(+), 2

[libvirt] [PATCH 05/13] Make virDomainObjList self-locking via virObjectLockable

2013-01-16 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Switch virDomainObjList to inherit from virObjectLockable and make all the APIs acquire/release the mutex when running. This makes virDomainObjList completely self-locking and no longer reliant on the hypervisor driver locks --- src/conf/domain_conf.c

[libvirt] [PATCH 04/12] virsh: Use virTypedParams* APIs in domiftune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 122 --- 1 file changed, 48 insertions(+), 74 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 74ea4b4..10b0a11 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2093,6 +2093,7 @@

[libvirt] [PATCH 02/12] virsh: Use virTypedParams* APIs in blkdeviotune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 134 +-- 1 file changed, 45 insertions(+), 89 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e3ff5d3..2d57601 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -851,9 +851,9 @@

[libvirt] [PATCH 08/12] virsh: Use virTypedParams* APIs in numatune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 88 +--- 1 file changed, 35 insertions(+), 53 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ff620b6..bcb855f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6313,8 +6313,9 @@

[libvirt] [PATCH 00/12] Introduce public APIs for dealing with virTypedParameters

2013-01-16 Thread Jiri Denemark
Working with virTypedParameters in clients written in C is ugly and requires all clients to duplicate the same code. This set of APIs makes this code for manipulating with virTypedParameters integral part of libvirt so that all clients may benefit from it. Jiri Denemark (12): Add

[libvirt] [PATCH 01/12] Add virTypedParams* APIs

2013-01-16 Thread Jiri Denemark
Working with virTypedParameters in clients written in C is ugly and requires all clients to duplicate the same code. This set of APIs makes this code for manipulating with virTypedParameters integral part of libvirt so that all clients may benefit from it. --- include/libvirt/libvirt.h.in | 92

[libvirt] [PATCH 11/12] Introduce virTypedParamsClear public API

2013-01-16 Thread Jiri Denemark
The function is just a renamed public version of former virTypedParameterArrayClear. --- daemon/remote.c | 34 + include/libvirt/libvirt.h.in | 3 +++ python/generator.py | 1 + python/libvirt-override.c| 59

[libvirt] [PATCH 09/12] virsh: Use virTypedParams* APIs in node-memory-tune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-host.c | 78 +- 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 352c49a..80e30df 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -748,42 +748,41 @@

[libvirt] [PATCH 05/12] virsh: Use virTypedParams* APIs in schedinfo

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 10b0a11..20a7a17 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -3386,11 +3386,10 @@

[libvirt] [PATCH 12/12] python: Avoid freeing uninitialized new_params pointer

2013-01-16 Thread Jiri Denemark
--- python/libvirt-override.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index f9dff8c..8154024 100644 --- a/python/libvirt-override.c +++ b/python/libvirt-override.c @@ -803,7 +803,7 @@

[libvirt] [PATCH 03/12] virsh: Use virTypedParams* APIs in blkiotune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 64 +++- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2d57601..74ea4b4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -1014,9 +1014,10

[libvirt] [PATCH 07/12] virsh: Use virTypedParams* APIs in memtune

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 99 +--- 1 file changed, 39 insertions(+), 60 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 20a7a17..ff620b6 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6163,8 +6163,9 @@

[libvirt] [PATCH 06/12] virsh: Use virTypedParams* APIs in domblkstat

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain-monitor.c | 5 ++--- tools/virsh.c| 20 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index f4940fa..72d2af1 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH 10/12] virsh: Use virTypedParams* APIs in cpu-stats

2013-01-16 Thread Jiri Denemark
--- tools/virsh-domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index bcb855f..9d50298 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5409,8 +5409,7 @@ do_show_total: VIR_FREE(s); }

Re: [libvirt] [PATCH] Add RESUME event listener to qemu monitor.

2013-01-16 Thread Andres Lagar-Cavilla
On Jan 15, 2013, at 5:13 PM, Eric Blake ebl...@redhat.com wrote: On 01/07/2013 02:25 PM, Andres Lagar-Cavilla wrote: Perform all the appropriate plumbing. When qemu/KVM VMs are paused manually through a monitor not-owned by libvirt, libvirt will think of them as paused event after they are

Re: [libvirt] [PATCH 2/5] conf: add domain NIC model enum macro

2013-01-16 Thread Daniel P. Berrange
On Sun, Jan 13, 2013 at 11:34:32PM +0800, Guannan Ren wrote: --- src/conf/domain_conf.c | 44 src/conf/domain_conf.h | 36 2 files changed, 80 insertions(+) diff --git a/src/conf/domain_conf.c

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file include/uapi/linux/in6.h, both define struct in6_addr, and both are visible to user applications. Thomas reported a conflict below. So, how can we handle this? /me is

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Ben Hutchings
On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file include/uapi/linux/in6.h, both define struct in6_addr, and both are visible to user applications.

[libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Peter Krempa
Hi everybody, a while ago there was a discussion about changing the data that is returned in the topology sub-element: capabilities host cpu archx86_64/arch modelSandyBridge/model vendorIntel/vendor topology sockets='1' cores='2' threads='2'/ The data provided

[libvirt] RFC: libxl race fixes

2013-01-16 Thread Jim Fehlig
I've been investigating some races in the libxl driver and would like to get comments on some potential solutions. The first race is in the fd/timeout event handling code, which maps libxl's osevent interface to libvirt's event loop interface. This mapping opens the possibility for libvirt's

Re: [libvirt] [PATCH v2 5/14] locking: Resolve resource leaks on non error path

2013-01-16 Thread Ján Tomko
On 01/15/13 15:23, John Ferlan wrote: Both 'dir' and 'path' were not free'd on successful return --- src/locking/lock_driver_sanlock.c | 2 ++ 1 file changed, 2 insertions(+) ACK and pushed. -- libvir-list mailing list libvir-list@redhat.com

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

2013-01-16 Thread Ján Tomko
On 01/16/13 00:04, Eric Blake wrote: On 12/21/2012 06:38 AM, 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

Re: [libvirt] [PATCH] conf: fix leak in virDomainVcpuPinAdd

2013-01-16 Thread Ján Tomko
On 01/15/13 17:31, Laine Stump wrote: On 01/15/2013 09:48 AM, Ján Tomko wrote: Fix the leak of vcpupin on failure to allocate cpumask and the leak of cpumask if we fail to expand vcpupin_list. ACK. Thanks, both pushed now. -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Ben Hutchings
On Wed, 2013-01-16 at 12:04 -0500, Mike Frysinger wrote: On Wednesday 16 January 2013 10:47:12 Ben Hutchings wrote: On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file

Re: [libvirt] [PATCH 5/5] libxl: Fix cleanup on domain start error

2013-01-16 Thread Jim Fehlig
Osier Yang wrote: On 2013年01月16日 07:15, Jim Fehlig wrote: If building the libxl domain config fails, cleanup before returning failure. --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c

Re: [libvirt] [PATCH] conf: fix leak in virDomainVcpuPinAdd

2013-01-16 Thread John Ferlan
On 01/15/2013 09:48 AM, Ján Tomko wrote: Fix the leak of vcpupin on failure to allocate cpumask and the leak of cpumask if we fail to expand vcpupin_list. --- src/conf/domain_conf.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH] network: use bandwidth from portgroup when appropriate

2013-01-16 Thread Laine Stump
The bandwidth plug and unplug functions were assuming that an interface's bandwidth setting was always specified directly in the domain's interface definition, but that's not necessarily true - it could have been obtained from a portgroup definition in the network definition. This patch fixes

[libvirt] [PATCH] network: Resolve some issues around vlan copying

2013-01-16 Thread Laine Stump
From: John Ferlan jfer...@redhat.com Remove extraneous check for 'netdef' when dereferencing for vlan.nTags. Prior code would already check if netdef was NULL. Coverity complained about a path where the 'vlan' was potentially valid, but a prior checks may not have allocated

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 05:28:57PM +0100, Peter Krempa wrote: Hi everybody, a while ago there was a discussion about changing the data that is returned in the topology sub-element: capabilities host cpu archx86_64/arch modelSandyBridge/model vendorIntel/vendor

[libvirt] [PATCH] safe{read,write}: Don't lie on nonblocking FD

2013-01-16 Thread Michal Privoznik
Currently, whenever somebody calls saferead() on nonblocking FD (safewrite() is totally interchangeable for purpose of this message) he might get wrong return value. For instance, in the first iteration some data is read. The number of bytes read is stored into local variable 'nread'. However, in

Re: [libvirt] [PATCH] safe{read, write}: Don't lie on nonblocking FD

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 07:27:46PM +0100, Michal Privoznik wrote: Currently, whenever somebody calls saferead() on nonblocking FD (safewrite() is totally interchangeable for purpose of this message) he might get wrong return value. For instance, in the first iteration some data is read. The

Re: [libvirt] [PATCH] safe{read, write}: Don't lie on nonblocking FD

2013-01-16 Thread Michal Privoznik
On 16.01.2013 19:31, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 07:27:46PM +0100, Michal Privoznik wrote: Currently, whenever somebody calls saferead() on nonblocking FD (safewrite() is totally interchangeable for purpose of this message) he might get wrong return value. For instance,

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Peter Krempa
On 01/16/13 19:11, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 05:28:57PM +0100, Peter Krempa wrote: Hi everybody, a while ago there was a discussion about changing the data that is returned in the topology sub-element: capabilities host cpu archx86_64/arch

Re: [libvirt] [PATCH] safe{read, write}: Don't lie on nonblocking FD

2013-01-16 Thread Michal Privoznik
On 16.01.2013 19:40, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 07:39:53PM +0100, Michal Privoznik wrote: On 16.01.2013 19:31, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 07:27:46PM +0100, Michal Privoznik wrote: Currently, whenever somebody calls saferead() on nonblocking FD

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 07:31:02PM +0100, Peter Krempa wrote: On 01/16/13 19:11, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 05:28:57PM +0100, Peter Krempa wrote: Hi everybody, a while ago there was a discussion about changing the data that is returned in the topology sub-element:

Re: [libvirt] [PATCH] safe{read, write}: Don't lie on nonblocking FD

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 07:39:53PM +0100, Michal Privoznik wrote: On 16.01.2013 19:31, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 07:27:46PM +0100, Michal Privoznik wrote: Currently, whenever somebody calls saferead() on nonblocking FD (safewrite() is totally interchangeable for

Re: [libvirt] [PATCH 0/2] add qemu machine type q35 support

2013-01-16 Thread Laine Stump
On 01/14/2013 12:32 PM, Ján Tomko wrote: On 01/10/13 03:24, Laine Stump wrote: In addition there is the issue that libvirt currently makes assumptions about the bus topology of guests, and assigns pci addresses to guest devices accordingly. Beyond the basic layout of buses present on the

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Peter Krempa
- Original Message - From: Daniel P. Berrange berra...@redhat.com To: Peter Krempa pkre...@redhat.com Cc: Jiri Denemark jdene...@redhat.com, Amador Pahim apa...@redhat.com, libvirt-l...@redhat.com, dougsl...@redhat.com Sent: Wed, 16 Jan 2013 13:39:28 -0500 (EST) Subject: Re: [libvirt]

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 02:15:37PM -0500, Peter Krempa wrote: - Original Message - From: Daniel P. Berrange berra...@redhat.com To: Peter Krempa pkre...@redhat.com Cc: Jiri Denemark jdene...@redhat.com, Amador Pahim apa...@redhat.com, libvirt-l...@redhat.com, dougsl...@redhat.com

[libvirt] [PATCH] Fix typo in variable name

2013-01-16 Thread Guido Günther
Hi, I pushed that under the build breaker rule: that broke the build like: CC libvirt_conf_la-domain_conf.lo conf/domain_conf.c: In function 'virDomainVcpuPinAdd': conf/domain_conf.c:11920:29: error: 'vpcupin' undeclared (first use in this function) conf/domain_conf.c:11920:29:

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Amador Pahim
On 01/16/2013 04:30 PM, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 02:15:37PM -0500, Peter Krempa wrote: - Original Message - From: Daniel P. Berrange berra...@redhat.com To: Peter Krempa pkre...@redhat.com Cc: Jiri Denemark jdene...@redhat.com, Amador Pahim apa...@redhat.com,

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Daniel P. Berrange
On Wed, Jan 16, 2013 at 05:06:21PM -0300, Amador Pahim wrote: On 01/16/2013 04:30 PM, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 02:15:37PM -0500, Peter Krempa wrote: - Original Message - From: Daniel P. Berrange berra...@redhat.com To: Peter Krempa pkre...@redhat.com Cc: Jiri

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 14:22:16 -0500 On Wednesday 16 January 2013 13:59:59 David Miller wrote: This has been done for decades, wake up. and it's been broken for just as long. no need to be a dick. By being ignorant and having such a simplistic view

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:04:56 -0500 certainly true, but the current expectation is that you don't mix your ABIs. if you're programming with the C library API, then use the C library headers. if you're banging directly on the kernel, then use the

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:28:39 -0500 if you're not calling the kernel directly, why are you including the kernel headers ? what is the problem people are actually trying to address here (and no, i want to include both headers is not the answer) ?

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Ben Hutchings bhutchi...@solarflare.com Date: Wed, 16 Jan 2013 15:47:12 + On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file

Re: [libvirt] [RFC] Data in the topology element in the capabilities XML

2013-01-16 Thread Peter Krempa
On 01/16/13 21:24, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 05:06:21PM -0300, Amador Pahim wrote: On 01/16/2013 04:30 PM, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 02:15:37PM -0500, Peter Krempa wrote: - Original Message - From: Daniel P. Berrange berra...@redhat.com

Re: [libvirt] [RFC PATCH v1 2/7] include util.h in cgroup.h

2013-01-16 Thread Eric Blake
On 01/16/2013 03:12 AM, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 10:53:04AM +0800, Hu Tao wrote: required by VIR_ENUM_DECL. --- src/util/vircgroup.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 8b6d3b2..05f2e54 100644 ---

Re: [libvirt] iptables --physdev-out warnings

2013-01-16 Thread Eric Blake
On 01/16/2013 03:23 AM, Reinier Schoof wrote: I patched the libvirt source (version 1.0.0) to test whether this works or not: --- src/nwfilter/nwfilter_ebiptables_driver.c.orig 2013-01-16 10:51:43.0 +0100 +++ src/nwfilter/nwfilter_ebiptables_driver.c 2013-01-16

[libvirt] aiding first-time posters [was: iptables --physdev-out warnings]

2013-01-16 Thread Eric Blake
On 01/16/2013 04:36 AM, Reinier Schoof wrote: Hi, we've experienced some issues with starting lots of KVM based VM's with libvirt. Since I couldn't find any clues on the libvirt mailing list, I'm posting the way I fixed the issues. Any reason you posted this message twice? Oh, probably

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 20:58:47 -0500 So I just went down the rabbit hole, and the further I get the closer I get to having two exact copies of the same definitions in both glibc and the kernel and using whichever one was included first. Is

Re: [libvirt] [PATCH 5/5] libxl: Fix cleanup on domain start error

2013-01-16 Thread Osier Yang
On 2013年01月16日 07:15, Jim Fehlig wrote: If building the libxl domain config fails, cleanup before returning failure. --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index baa05e8..6da0272

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c372..a2b16a5 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h : #define IPV6_PRIORITY_14 0x0e00 #define IPV6_PRIORITY_15 0x0f00 + +#ifndef

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 21:15:03 -0500 +/* If a glibc-based userspace has already included in.h, then we will not + * define in6_addr (nor the defines), sockaddr_in6, or ipv6_mreq. The + * ABI used by the kernel and by glibc match exactly. Neither

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c372..a2b16a5 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h @@ -23,6 +23,13 @@ #include linux/types.h +/* If a glibc-based userspace has already included in.h, then

Re: [libvirt] [PATCH 5/5] libxl: Fix cleanup on domain start error

2013-01-16 Thread Osier Yang
On 2013年01月17日 01:17, Jim Fehlig wrote: Osier Yang wrote: On 2013年01月16日 07:15, Jim Fehlig wrote: If building the libxl domain config fails, cleanup before returning failure. --- src/libxl/libxl_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
On Wed, 2013-01-16 at 14:22 -0500, Mike Frysinger wrote: but this is still too vague. what headers/definitions do people want to see simultaneously included ? changes would be needed on both sides (kernel C library). Hi, Mike, Please take a look at my first email in this thread. The

Re: [libvirt] [RFC PATCH v1 6/7] deploy the newly introduced virCgroupItem.

2013-01-16 Thread Hu Tao
On Wed, Jan 16, 2013 at 10:10:50AM +, Daniel P. Berrange wrote: On Wed, Jan 16, 2013 at 10:53:08AM +0800, Hu Tao wrote: diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 7cb99b1..92e3292 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1442,6 +1442,9 @@ int main(int

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Jike Song
On Thu, Jan 17, 2013 at 2:59 AM, David Miller da...@davemloft.net wrote: When GLIBC doesn't provide it's own definition of some networking macros or interfaces that the kernel provides, people include the kernel header. Recently I got a problem when copying a structure from kernel to

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Carlos O'Donell
On 01/16/2013 04:45 PM, David Miller wrote: From: Ben Hutchings bhutchi...@solarflare.com Date: Wed, 16 Jan 2013 15:47:12 + On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Carlos O'Donell
On 01/16/2013 01:57 PM, David Miller wrote: From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:04:56 -0500 certainly true, but the current expectation is that you don't mix your ABIs. if you're programming with the C library API, then use the C library headers. if

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
On Thu, 2013-01-17 at 11:55 +0800, Jike Song wrote: On Thu, Jan 17, 2013 at 2:59 AM, David Miller da...@davemloft.net wrote: When GLIBC doesn't provide it's own definition of some networking macros or interfaces that the kernel provides, people include the kernel header. Recently I

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
- Original Message - I see no reason, even although I don't know why it is 46 instead of 40. Ok, for ::::::255.255.255.255. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 2/3] build command line for pci-bridge device of qemu

2013-01-16 Thread li guang
在 2013-01-16三的 09:26 +,Daniel P. Berrange写道: On Wed, Jan 16, 2013 at 04:24:55PM +0800, li guang wrote: 在 2013-01-15二的 09:27 +,Daniel P. Berrange写道: On Mon, Jan 14, 2013 at 05:23:54PM +0100, Ján Tomko wrote: On 01/10/13 02:04, liguang wrote: This would allow any bus

Re: [libvirt] [PATCH 2/5] conf: add domain NIC model enum macro

2013-01-16 Thread Guannan Ren
On 01/16/2013 11:43 PM, Daniel P. Berrange wrote: On Sun, Jan 13, 2013 at 11:34:32PM +0800, Guannan Ren wrote: --- src/conf/domain_conf.c | 44 src/conf/domain_conf.h | 36 2 files changed, 80 insertions(+)

[libvirt] [PATCH] safe{read, write}: Document usage with nonblocking FD

2013-01-16 Thread Michal Privoznik
Currently, whenever somebody calls saferead() on nonblocking FD (safewrite() is totally interchangeable for purpose of this message) he might get wrong return value. For instance, in the first iteration some data is read. The number of bytes read is stored into local variable 'nread'. However, in