[libvirt] [PATCH 02/13] Makefile.am: Add new multiple trace backend supporting framework

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Add the new multiple trace backend framework, and the 'Dtrace' should be one of the trace backends libvirt supporting. Using the macro exported by configure.ac to decide which trace backend to build for libvirt. We got 2 trace macros below:

[libvirt] [PATCH 01/13] configure.ac: Define new macro 'WITH_TRACE_PROBES' to indicate trace function are available

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Define new 'WITH_TRACE_PROBES' macros which indicate the trace function are available and this macro will be used in Makefile.am and source codes. Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- config-post.h | 2 +- configure.ac | 4 2

[libvirt] [PATCH 04/13] src: Add scripts 'tracetool' to supporting the translation from tracepoint files to multiple trace backend supporting files

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com This 'tracetool' is used for converting the tracepoint format file to all other files we need to supporting dtrace, ftrace or them together. Signed-off-by: Yang Zhiyong yangzy.f...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com Cc:

[libvirt] [PATCH 09/13] src/locking/lock_daemon.c: Init ftrace backend in program 'virtlockd'

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/locking/lock_daemon.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index e047751..2de5331 100644 ---

[libvirt] [PATCH 00/13] Add multiple trace backend function and add new ftrace backend for libvirt

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com This patch set will let libvirt to support multiple trace backend function and add a new 'ftrace' backend at the same time. Then, libvirt would have 2 trace backend: dtrace, ftrace.They can be used alone or together. Patchs 1,2,3,4,5 are used for

[libvirt] [PATCH 07/13] src/libvirt.c: Init ftrace backend in libvirt library so that programs containing it can use ftrace

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/libvirt.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index a385935..5d519d4 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -69,6 +69,10 @@

[libvirt] [PATCH 13/13] src/security/virt-aa-helper.c: Init ftrace backend in program 'virt-aa-helper'

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/security/virt-aa-helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index e7f1359..fa8894f 100644 ---

[libvirt] [PATCH 08/13] src/qemu/qemu_driver.c: Init ftrace backend in qemu driver so that qemu driver can support ftrace

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/qemu/qemu_driver.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9aad2dc..6c5299f 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 05/13] daemon, src: Use new tracepoint function calls to replace old PROBE macro calls to support multiple trace function

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Remove the macro PROBE's definition in 'internal.h' and repalce the old 'PROBE' calls with new tracepoint function in source codes. Preprocess judgement by 'WITH_TRACE_PROBES' is to avoid the undefined errors which come from 'virt-login-shell' which

[libvirt] [PATCH 06/13] configure.ac, Makefile.am, src: Add new ftrace backend

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Using the macro exported by configure.ac to decide which trace backend to build for libvirt. We got 3 trace macros now: WITH_TRACE_PROBES, if --with-ftrace or --with-dtrace option was set, this macro would be true and it tell the codes that we will use

[libvirt] [PATCH 12/13] src/lxc/lxc_controller.c: Init ftrace backend in program 'libvirt_lxc'

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 5ca960f..e726afd 100644 --- a/src/lxc/lxc_controller.c

[libvirt] [PATCH 03/13] src: Use new tracepoint declaration files to replace the old dtrace declaration files to support multiple trace function

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com In order to support multiple trace backend, we have to quit the existing dtrace points definition files for they are only used by dtrace and their format are not easy to use for supporting multiple trace backend. The new tracepoint format files can

[libvirt] [PATCH 10/13] src/util/iohelper.c: Init ftrace backend in program 'libvirt_iohelper'

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/util/iohelper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index 9610063..3b33c07 100644 --- a/src/util/iohelper.c +++

[libvirt] [PATCH 11/13] src/storage/parthelper.c: Init ftrace backend in program 'libvirt_parthelper'

2014-03-10 Thread yangzy.f...@cn.fujitsu.com
From: Xinghai Yu yuxing...@cn.fujitsu.com Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- src/storage/parthelper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c index c04f1bd..e9b56fe 100644 --- a/src/storage/parthelper.c

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-03-10 Thread Claudio Bley
At Mon, 24 Feb 2014 15:18:21 +0100, Michal Privoznik wrote: On 19.02.2014 13:03, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the VIR_DOMAIN_VCPU_* instances to VIR_DOMAIN_AFFECT_* instances for

Re: [libvirt] [PATCH] make virDomainGetMaxVcpus work on inactive domains

2014-03-10 Thread Claudio Bley
At Mon, 10 Mar 2014 09:22:53 +0100, Claudio Bley wrote: At Mon, 24 Feb 2014 15:18:21 +0100, Michal Privoznik wrote: On 19.02.2014 13:03, Claudio Bley wrote: Signed-off-by: Claudio Bley cb...@av-test.de --- OK, how about this patch? While at it, should I convert the

[libvirt] [PATCH] tests: Fix SELinux tests in VPATH build

2014-03-10 Thread Jiri Denemark
Signed-off-by: Jiri Denemark jdene...@redhat.com --- Pushed as a build-breaker. Notes: abs_builddir is used in more places in tests/securityselinuxhelper.c but since the path they are used in does not exist in abs_srcdir either, I guess it doesn't really matter what prefix is used

Re: [libvirt] [PATCH 1/4] virsh: Sort options alphabetically

2014-03-10 Thread Martin Kletzander
On Fri, Mar 07, 2014 at 04:50:55PM +0100, Michal Privoznik wrote: On 07.03.2014 11:49, Martin Kletzander wrote: Man page, help output and also parsing is sorted in order to find options smoothly. Signed-off-by: Martin Kletzander mklet...@redhat.com --- tools/virsh.c | 64

Re: [libvirt] [PATCH 5/7] Add virLogSource variables to all source files

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 10:43:04AM -0700, Eric Blake wrote: On 03/03/2014 12:18 PM, Daniel P. Berrange wrote: Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT(source.name) declaration at the start of the file. This provides a static variable of the

Re: [libvirt] [PATCH 6/7] Switch to filtering based on log source name instead of filename

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 11:05:28AM -0700, Eric Blake wrote: On 03/03/2014 12:18 PM, Daniel P. Berrange wrote: Both of these options have a notable performance impact, however, and it is believed that worst case behaviour where the fields are read concurrently with being written would

Re: [libvirt] [bug-report] libvirtd can't be connected by using the master branch with lots of VMs

2014-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2014 at 10:59:08AM +0800, Wangpan wrote: Please try out this patch https://www.redhat.com/archives/libvir-list/2014-March/msg00501.html I have tested this patch on master branch, and it works OK now, thanks Daniel ! Thanks for testing. I'll get this back onto the stable

Re: [libvirt] Seeking for advice on 'virsh console' problems debugging

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 10:04:48PM +0400, Roman Bogorodskiy wrote: Daniel P. Berrange wrote: On Fri, Mar 07, 2014 at 07:49:04PM +0400, Roman Bogorodskiy wrote: Daniel P. Berrange wrote: On Fri, Mar 07, 2014 at 06:15:24PM +0400, Roman Bogorodskiy wrote: Daniel P. Berrange

Re: [libvirt] How to detect if qemu supports discard?

2014-03-10 Thread Daniel P. Berrange
On Sun, Mar 09, 2014 at 11:19:47PM +0100, Martin Kletzander wrote: On Sun, Mar 09, 2014 at 03:23:25PM +, Richard W.M. Jones wrote: from src/qemu/qemu_command.c: if (disk-discard) { if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_DISCARD)) {

[libvirt] [PATCH] Fix locking in virsh console

2014-03-10 Thread Roman Bogorodskiy
While I'm still fighting with console on FreeBSD, I decided to sumbit that fix as it seems to be useful on its own. With that change I'm able to run virsh on FreeBSD to connect to libvirtd on Linux and get console working properly there. Roman Bogorodskiy (1): Fix locking in virsh console

[libvirt] [PATCH] Fix locking in virsh console

2014-03-10 Thread Roman Bogorodskiy
vshRunConsole() uses virCondWait() which is a wrapper around pthread_cond_wait(). On FreeBSD, pthread_cond_wait needs mutex to be locked, otherwise it immediately fails with EPERM. On Linux, the behaviour in this case is undefined. So lock the mutex before calling virCondWait(). ---

Re: [libvirt] [PATCH] Fix locking in virsh console

2014-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2014 at 03:04:15PM +0400, Roman Bogorodskiy wrote: vshRunConsole() uses virCondWait() which is a wrapper around pthread_cond_wait(). On FreeBSD, pthread_cond_wait needs mutex to be locked, otherwise it immediately fails with EPERM. On Linux, the behaviour in this case is

[libvirt] [PATCH v2 0/3] Add keepalive support in virsh

2014-03-10 Thread Martin Kletzander
This series adds client keepalive support into virsh. This was previously almost done by Guannan around 2 years ago, but not finished. Martin Kletzander (3): virsh: Add keepalive in new vshConnect function virsh: Prohibit virConnectOpen* functions in virsh [DO_NOT_APPLY_UPSTREAM] virsh:

[libvirt] [PATCH v2 2/3] virsh: Prohibit virConnectOpen* functions in virsh

2014-03-10 Thread Martin Kletzander
Addition of vshConnect() makes virConnectOpen() functions obsolete in virsh. Thus all virsh-*.[ch] files should be left only with vshConnect() in the case of need. Signed-off-by: Martin Kletzander mklet...@redhat.com --- cfg.mk | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff

[libvirt] [PATCH v2 3/3] [DO_NOT_APPLY_UPSTREAM] virsh: add connection monitoring into vshWatchJob

2014-03-10 Thread Martin Kletzander
Similarly to Guannan's patches in 2012, this one does add the connection monitoring into vshWatchJob function. *But Beware*, while testing this I discovered it adds no new functionality. Probably since we're catching disconnects by a callback, there is no way to get to the code introduced.

Re: [libvirt] [PATCH] Fix locking in virsh console

2014-03-10 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: On Mon, Mar 10, 2014 at 03:04:15PM +0400, Roman Bogorodskiy wrote: vshRunConsole() uses virCondWait() which is a wrapper around pthread_cond_wait(). On FreeBSD, pthread_cond_wait needs mutex to be locked, otherwise it immediately fails with EPERM. On Linux, the

[libvirt] [PATCH] Introduce virFDStreamOpenPTY

2014-03-10 Thread Roman Bogorodskiy
Add virFDStreamOpenPTY() function which is a wrapper around virFDStreamOpenFileInternal() with putting the device it opens into a raw mode. Make virChrdevOpen() use virFDStreamOpenPTY() for VIR_DOMAIN_CHR_TYPE_PTY devices. This fixes mangled console output when libvirt runs on FreeBSD as it

Re: [libvirt] [PATCH] Add a mutex to serialize updates to firewall

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 09:33:52AM -0700, Eric Blake wrote: On 03/07/2014 09:15 AM, Daniel P. Berrange wrote: For https://bugzilla.redhat.com/show_bug.cgi?id=1066801 The nwfilter conf update mutex previously serialized updates to the internal data structures for firewall rules,

Re: [libvirt] [PATCH] libvirt-tck: Ignore SIGPIPE in 051-daemon-hook.t

2014-03-10 Thread Osier Yang
On 07/03/14 23:46, Mike Latimer wrote: On Friday, March 07, 2014 05:16:48 PM Osier Yang wrote: $hook-cleanup(); + +# Restarting libvirtd broke the tck connection, so ignore sigpipe and +# undefine $tck to avoid a return code of 141 +$SIG{PIPE} = 'IGNORE'; +undef $tck; We

Re: [libvirt] [PATCH] Wildcard ignore tests/*test instead of listing every one

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:30:30AM -0700, Eric Blake wrote: On 03/07/2014 06:18 AM, Martin Kletzander wrote: On Fri, Mar 07, 2014 at 01:59:31PM +0100, Michal Privoznik wrote: On 07.03.2014 12:59, Daniel P. Berrange wrote: There is a forever growing list of test cases. It is just not worth

[libvirt] [PATCH 2/8] Remove decl of method which doesn't exist in virebtables.h

2014-03-10 Thread Daniel P. Berrange
There is no impl of the ebtablesSaveRules method and nothing attempts to use it. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/virebtables.h b/src/util/virebtables.h index c0d443d..91ef8b5 100644 ---

[libvirt] [PATCH 1/8] Remove many decls from bridge driver platform header

2014-03-10 Thread Daniel P. Berrange
The bridge_driver_platform.h defines many functions that a platform driver must implement. Only two of these functions are actually called from the main bridge driver code. The remainder can be made internal to the linux driver only. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH 0/8] Misc ebtables cleanup patches

2014-03-10 Thread Daniel P. Berrange
In doing some work on the firewall code in libvirt I came across lots of cruft which could usefully be cleaned up.. Daniel P. Berrange (8): Remove many decls from bridge driver platform header Remove decl of method which doesn't exist in virebtables.h Make ebtablesForwardPolicyReject static

[libvirt] [PATCH 4/8] Remove unused variables from ebtablesContext

2014-03-10 Thread Daniel P. Berrange
The input_filter and nat_postrouting variables were never used to create any firewall rules. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/util/virebtables.c

[libvirt] [PATCH 5/8] Remove data structure holding list of ebtables rules

2014-03-10 Thread Daniel P. Berrange
When adding/removing ebtables rules, the code would keep an array of all rules in memory. This list of rules was never used for any purpose and would be lost if libvirtd restarted. Delete all the unused code. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.c | 88

[libvirt] [PATCH 8/8] Remove broken error reporting in QEMU mac filtering

2014-03-10 Thread Daniel P. Berrange
The qemu_bridge_filter.c file had some helpers for calling the ebtablesXXX functions todo bridge filtering. The only thing these helpers did was to overwrite the original error message from the ebtables code. For added fun, the callers of these helpers overwrote the errors yet again. For even more

[libvirt] [PATCH 7/8] Remove unused ebtablesRemoveForwardPolicyReject method

2014-03-10 Thread Daniel P. Berrange
The ebtablesRemoveForwardPolicyReject method was unused and would not do anything useful even if called. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.c | 28 ++-- src/util/virebtables.h | 2 -- 2 files changed, 6 insertions(+), 24

[libvirt] [PATCH 6/8] Remove worthless ebtRules data structure

2014-03-10 Thread Daniel P. Berrange
The ebtRules data structure serves no useful purpose as the table name is never used and only 1 single chain name needs to be stored. Just store the chain name directly in the ebtablesContext instead. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.c | 104

Re: [libvirt] Seeking for advice on 'virsh console' problems debugging

2014-03-10 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: One further idea I just had - in QEMU code util/qemu-openpty.c we call cfmakeraw()/tcsetattr on the PTY slave file descriptor. On Linux at least this affects both ends of the device, but I wonder if there's perhaps a need to call this on the master file descriptor

[libvirt] [PATCH 3/8] Make ebtablesForwardPolicyReject static

2014-03-10 Thread Daniel P. Berrange
The ebtablesForwardPolicyReject method is only used internally to the ebtables code and thus should have been static. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/util/virebtables.c | 28 ++-- src/util/virebtables.h | 3 --- 2 files changed, 14

Re: [libvirt] [PATCH] Change file names in comments to match the files they are in

2014-03-10 Thread Ján Tomko
On 03/07/2014 04:51 PM, Eric Blake wrote: On 03/07/2014 06:45 AM, Ján Tomko wrote: Some of these are leftovers from renaming the files, others are just typos. Also introduce an ugly awk script to enforce this. --- cfg.mk | 25 +

Re: [libvirt] [PATCH] qemu: Advertise qcow2discard/ in capabilities if discard works for qcow2 backing files.

2014-03-10 Thread Richard W.M. Jones
Please disregard this patch. Dan pointed out that it is possible to read the hypervisor version using virConnectGetVersion. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful

Re: [libvirt] [PATCH v2] qemu: Advertise drivediscard/ in capabilities if 'discard' is supported.

2014-03-10 Thread Richard W.M. Jones
Please disregard this patch. Dan pointed out that it is possible to read the hypervisor version using virConnectGetVersion. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful

Re: [libvirt] [PATCH] libvirt-tck: Update hook syntax for libvirt 0.9.0+

2014-03-10 Thread Mike Latimer
On Friday, March 07, 2014 08:54:26 AM Eric Blake wrote: On 03/07/2014 02:02 AM, Osier Yang wrote: On 07/03/14 00:27, Mike Latimer wrote: Starting with libvirt 0.9.0+, hook scripts can be called from several new locations. These locations must also be reflected in the expected logs of the

Re: [libvirt] [PATCH 7/7] Remove global log buffer feature entirely

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 11:27:53AM -0700, Eric Blake wrote: On 03/03/2014 12:18 PM, Daniel P. Berrange wrote: A earlier commit changed the global log buffer so that it only records messages that are explicitly requested via the log filters setting. This removes the performance burden, and

Re: [libvirt] [PATCH 0/8] Misc ebtables cleanup patches

2014-03-10 Thread Ján Tomko
On 03/10/2014 02:29 PM, Daniel P. Berrange wrote: In doing some work on the firewall code in libvirt I came across lots of cruft which could usefully be cleaned up.. Daniel P. Berrange (8): Remove many decls from bridge driver platform header Remove decl of method which doesn't exist in

Re: [libvirt] [PATCH 3/7] Move dtrace probe macros into separate header file

2014-03-10 Thread Daniel P. Berrange
On Wed, Mar 05, 2014 at 09:18:54AM -0500, John Ferlan wrote: On 03/03/2014 02:18 PM, Daniel P. Berrange wrote: The dtrace probe macros rely on the logging API. We can't make the internal.h header include the virlog.h header though since that'd be a circular include. Instead simply split

[libvirt] QEMU participating in Outreach Program for Women

2014-03-10 Thread Stefan Hajnoczi
I am delighted to announce that we are participating in Outreach Program for Women! The same QEMU, KVM, and libvirt project ideas are shared with Google Summer of Code. Outreach Program for Women was started by GNOME specifically for women who want to start contributing to open source. It has

[libvirt] limit downtime during life migration from xl/virsh

2014-03-10 Thread Olaf Hering
During live migration of VMs from one host to another the VM is suspended for an unpredictable amount of time. The actual downtime depends on how many new pages will be dirty and the band width to the destination host. Since VM memory size grows faster than transfer rates the currently available

Re: [libvirt] limit downtime during life migration from xl/virsh

2014-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2014 at 03:36:06PM +0100, Olaf Hering wrote: Here is my proposal for a new option for virsh and 2 new options for xl: [xl | virsh --live] --max-suspend-time N --timeout N VM host --max-suspend-time N: as the name suggests, the VM downtime must not be longer than specified.

Re: [libvirt] limit downtime during life migration from xl/virsh

2014-03-10 Thread Jiri Denemark
On Mon, Mar 10, 2014 at 15:36:06 +0100, Olaf Hering wrote: During live migration of VMs from one host to another the VM is suspended for an unpredictable amount of time. The actual downtime depends on how many new pages will be dirty and the band width to the destination host. Since VM

Re: [libvirt] limit downtime during life migration from xl/virsh

2014-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2014 at 03:47:49PM +0100, Jiri Denemark wrote: On Mon, Mar 10, 2014 at 15:36:06 +0100, Olaf Hering wrote: During live migration of VMs from one host to another the VM is suspended for an unpredictable amount of time. The actual downtime depends on how many new pages will

Re: [libvirt] [PATCH 4/7] Turn virLogSource into a struct instead of an enum

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 10:28:42AM -0700, Eric Blake wrote: On 03/03/2014 12:18 PM, Daniel P. Berrange wrote: As part of the goal to get away from doing string matching on filenames when deciding whether to emit a log message, turn the virLogSource enum into a struct which contains a log

[libvirt] Unable to start Nehalem VM on Nehalem host

2014-03-10 Thread Ruben Kerkhof
Hi list, I'm trying to debug a strange issue I have, and I'd appreciate some help. I've upgraded libvirt to 1.2.2, on Scientific Linux, with qemu-kvm-0.12.1.2-2.415.el6_5.3 Here’s my analysis so far: I figured out that libvirt uses HMP to get the list of models from qemu-kvm by running

[libvirt] [PATCH 1/7 v2] Reduce performance overhead of the global log buffer

2014-03-10 Thread Daniel P. Berrange
With the vast number of log debug statements in the code, the logging framework has a measurable performance impact on libvirt code, particularly in the daemon event loop. The global log buffer records every single log message triggered whether anyone cares to see them or not. This makes it

[libvirt] [PATCH 0/7 v2] Remove overhead of disabled logging calls

2014-03-10 Thread Daniel P. Berrange
A v2 of https://www.redhat.com/archives/libvir-list/2014-March/msg00124.html Looking at the performance of the libvirtd event loop when used with libvirt sandbox and apps which do lots of I/O I discovered that a huge amount of time was being spent in our logging APIs making the event loop

Re: [libvirt] [PATCH v3] Add helper program to create custom leases

2014-03-10 Thread Nehal J Wani
On Tue, Mar 4, 2014 at 12:18 AM, Nehal J Wani nehaljw.k...@gmail.com wrote: On Mon, Feb 24, 2014 at 5:27 PM, Nehal J Wani nehaljw.k...@gmail.com wrote: Introduce helper program to catch events from dnsmasq and maintain a custom lease file per network. It supports dhcpv4 and dhcpv6. The file

[libvirt] [PATCH 2/7 v2] Refactor code that skips logging of error messages

2014-03-10 Thread Daniel P. Berrange
The error reporting code will invoke a callback when any error is raised and the default callback will print to stderr. The virRaiseErrorFull method also sends all error messages on to the logging code, which also prints to stderr by default. To avoid duplicated data on stderr, the logging code

[libvirt] [PATCH 4/7 v2] Turn virLogSource into a struct instead of an enum

2014-03-10 Thread Daniel P. Berrange
As part of the goal to get away from doing string matching on filenames when deciding whether to emit a log message, turn the virLogSource enum into a struct which contains a log name. There will eventually be one virLogSource instance statically declared per source file. To minimise churn in this

[libvirt] [PATCH 3/7 v2] Move dtrace probe macros into separate header file

2014-03-10 Thread Daniel P. Berrange
The dtrace probe macros rely on the logging API. We can't make the internal.h header include the virlog.h header though since that'd be a circular include. Instead simply split the dtrace probes into their own header file, since there's no compelling reason for them to be in the main internal.h

[libvirt] [PATCH 6/7 v2] Switch to filtering based on log source name instead of filename

2014-03-10 Thread Daniel P. Berrange
Currently the log filter strings are used in a string comparison against the source filename each time log message is emitted. If no log filters at all are set, there's obviously no string comparison to be done. If any single log filter is set though, this imposes a compute burden on every logging

[libvirt] [PATCH 7/7 v2] Remove global log buffer feature entirely

2014-03-10 Thread Daniel P. Berrange
A earlier commit changed the global log buffer so that it only records messages that are explicitly requested via the log filters setting. This removes the performance burden, and improves the signal/noise ratio for messages in the global buffer. At the same time though, it is somewhat pointless,

Re: [libvirt] limit downtime during life migration from xl/virsh

2014-03-10 Thread Olaf Hering
On Mon, Mar 10, Jiri Denemark wrote: Libvirt already has virDomainMigrateSetMaxDowntime API with this semantics. However, using virsh, one can set it with virsh migrate-setmaxdowntime command while migration is happening. Not sure if exposing it as yet another parameter of already quite

Re: [libvirt] Unable to start Nehalem VM on Nehalem host

2014-03-10 Thread Jiri Denemark
On Mon, Mar 10, 2014 at 15:58:01 +0100, Ruben Kerkhof wrote: Hi list, I'm trying to debug a strange issue I have, and I'd appreciate some help. I've upgraded libvirt to 1.2.2, on Scientific Linux, with qemu-kvm-0.12.1.2-2.415.el6_5.3 cpuModellsAllowed then does a strcmp between

[libvirt] [PATCH] Load CPU map from builddir when run uninstalled

2014-03-10 Thread Jiri Denemark
When libvirtd is run from a build directory without being installed, it should not depend on files from a libvirt package installed in the system. Not only because there may not be any libvirt installed at all. We already do a good job for plugins but cpu_map.xml was still loaded from the system.

Re: [libvirt] [PATCH 6/7] Switch to filtering based on log source name instead of filename

2014-03-10 Thread Eric Blake
On 03/10/2014 04:18 AM, Daniel P. Berrange wrote: On Fri, Mar 07, 2014 at 11:05:28AM -0700, Eric Blake wrote: On 03/03/2014 12:18 PM, Daniel P. Berrange wrote: Both of these options have a notable performance impact, however, and it is believed that worst case behaviour where the fields are

Re: [libvirt] [PATCH 7/7] Remove global log buffer feature entirely

2014-03-10 Thread Eric Blake
On 03/10/2014 08:10 AM, Daniel P. Berrange wrote: If we were to keep the global log buffer pretty much none of this patch series is worthwhile, because as long as the global log buffer exists the other performance improvements in this patch are dwarved by the printf. Just minimizing

Re: [libvirt] [PATCH] Load CPU map from builddir when run uninstalled

2014-03-10 Thread Richard W.M. Jones
On Mon, Mar 10, 2014 at 04:26:30PM +0100, Jiri Denemark wrote: When libvirtd is run from a build directory without being installed, it should not depend on files from a libvirt package installed in the system. Not only because there may not be any libvirt installed at all. We already do a good

[libvirt] [PATCH] virSecurityDACSetSecurityImageLabel: Unmark @def as unused

2014-03-10 Thread Michal Privoznik
The @def is clearly used just a few lines below. There's no need to use ATTRIBUTE_UNUSED for it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/security/security_dac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/security_dac.c

[libvirt] [PATCH v2 1/3] Add helper APIs to track if libvirtd or loadable modules have changed

2014-03-10 Thread Daniel P. Berrange
The future QEMU capabilities cache needs to be able to invalidate itself if the libvirtd binary or any loadable modules are changed on disk. Record the 'ctime' value for these binaries and provide helper APIs to query it. This approach assumes that if libvirt.so is changed, then libvirtd will also

[libvirt] [PATCH v2 2/3] Change QEMU capabilities cache to check ctime instead of mtime

2014-03-10 Thread Daniel P. Berrange
Debian's package manager will preserve mtime timesatmp on binaries from the time they are built, rather than installed. So if a user downgrades their QEMU dpkg, the libvirt capabilities cache will not refresh. The fix is to use ctime instead of mtime since it cannot be faked. Signed-off-by:

[libvirt] [PATCH v2 0/3] Add caching of QEMU probed capabilities

2014-03-10 Thread Daniel P. Berrange
A followup to https://www.redhat.com/archives/libvir-list/2014-March/msg00297.html Probing capabilities takes 200-300ms per binary and we have as many as 26 binaries. This noticably slows down libvirtd startup. It does not look like performance of probing QEMU can be improved, so this series

[libvirt] [PATCH v2 3/3] Cache result of QEMU capabilities extraction

2014-03-10 Thread Daniel P. Berrange
Extracting capabilities from QEMU takes a notable amount of time when all QEMU binaries are installed. Each system emulator needs about 200-300ms multiplied by 26 binaries == ~5-8 seconds. This change causes the QEMU driver to save an XML file containing the content of the virQEMUCaps object

Re: [libvirt] [PATCH v3 0/2] Introduce max_anonymous_clients

2014-03-10 Thread Michal Privoznik
On 05.03.2014 13:08, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981729 So far we can limit how many clients are connected, how many are waiting in accept() line but we could not control the count of accepted but not authenticated yet. diff to v2: -Dan's suggestions

Re: [libvirt] [PATCH] virSecurityDACSetSecurityImageLabel: Unmark @def as unused

2014-03-10 Thread Daniel P. Berrange
On Mon, Mar 10, 2014 at 05:51:18PM +0100, Michal Privoznik wrote: The @def is clearly used just a few lines below. There's no need to use ATTRIBUTE_UNUSED for it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/security/security_dac.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH v14 01/49] virscsi: fix memory leak

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:28PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/util/virscsi.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) John already pushed an alternative patch, so we can skip this one. Regards, Daniel -- |:

Re: [libvirt] [PATCH v14 02/49] virhostdev: use virObject to virHostdevManager to keep reference

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:29PM +0800, Chunyan Liu wrote: Use virObject to virHostdevManager, so that each driver using virHostdevManager can keep a reference to it, and through counting refs to make virHostdevManager get freed. Signed-off-by: Chunyan Liu cy...@suse.com ---

Re: [libvirt] [PATCH v14 04/49] qemu: reuse hostdev interfaces to avoid duplicate

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:31PM +0800, Chunyan Liu wrote: Same logic of preparing/reattaching hostdevs could be used in attach/detach hotplug places, so reuse hostdev interfaces to avoid duplicate, also for later extracting general code to common library. Signed-off-by: Chunyan Liu

Re: [libvirt] [PATCH v14 03/49] update qemuPrepareHostUSBDevices parameters to keep consistency

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:30PM +0800, Chunyan Liu wrote: Update parameters from vm-def to specific name, hostdevs, nhostdevs to keep consistentcy with PreparePCIDevices and PrepareSCSIDevices. And, at the same time, make it reusable in later patch. Signed-off-by: Chunyan Liu

Re: [libvirt] [PATCH v14 05/49] qemu: remove functions used internally only from qemu_hostdev.h

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:32PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 12 ++-- src/qemu/qemu_hostdev.h | 13 - 2 files changed, 6 insertions(+), 19 deletions(-) ACK Regards, Daniel -- |:

Re: [libvirt] [PATCH v14 07/49] lxc: use general virhostdev lists instead of its own

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:34PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/lxc/lxc_conf.h| 5 ++--- src/lxc/lxc_driver.c | 12 +++- src/lxc/lxc_hostdev.c | 32 ++-- 3 files changed, 27 insertions(+), 22

Re: [libvirt] [PATCH v14 06/49] qemu: use general virhostdev lists instead of its own

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:33PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_conf.h| 9 +-- src/qemu/qemu_driver.c | 59 --- src/qemu/qemu_hostdev.c | 151 ++-- 3 files changed,

Re: [libvirt] [PATCH v14 10/49] qemu_hostdev: move netconfig file location to virhostdev stateDir

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:37PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH v14 11/49] extract general code from qemuPrepareHostdevPCIDevices

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:38PM +0800, Chunyan Liu wrote: Extract general code from qemuPrepareHostdevPCIDevices to virHostdevPrepareHostdevPCIDevices. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 44 +--- 1 file

Re: [libvirt] [PATCH v14 12/49] rename qemu*NetConfigRestore/Replace to virHostdevNetConfigRestore/Replace

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:39PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 64 - 1 file changed, 32 insertions(+), 32 deletions(-) ACK Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH v14 13/49] rename qemuGet*PciHostDeviceList to virHostdevGet*PciHostDeviceList

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:40PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH v14 14/49] pass driver name as a parameter to virHostdevPrepareHostdevPCIDevices

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:41PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/

Re: [libvirt] [PATCH v14 15/49] extract general code from qemuDomainReAttachHostdevDevices

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:42PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index

Re: [libvirt] [PATCH v14 16/49] pass driver name as a parameter to virHostdevReAttachPCIDevices

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:43PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/

Re: [libvirt] [PATCH v14 17/49] rename qemuReAttachPciDevice to virHostdevReAttachPciDevice

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:44PM +0800, Chunyan Liu wrote: Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index

Re: [libvirt] [PATCH v14 09/49] qemu_hostdev: move ColdBoot as a flag

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:36PM +0800, Chunyan Liu wrote: For extracting hostdev codes from qemu_hostdev.c to common library, change qemu specific COLD_BOOT handling to be a flag, and pass it to hostdev functions. Signed-off-by: Chunyan Liu cy...@suse.com --- src/qemu/qemu_hostdev.c |

Re: [libvirt] [PATCH v14 08/49] qemu_hostdev: move cfg-relaxedACS as a flag

2014-03-10 Thread Daniel P. Berrange
On Fri, Mar 07, 2014 at 06:52:35PM +0800, Chunyan Liu wrote: For extracting hostdev codes from qemu_hostdev.c to common library, change qemu specific cfg-relaxedACS handling to be a flag, and pass it to hostdev functions. Signed-off-by: Chunyan Liu cy...@suse.com ---

Re: [libvirt] [Qemu-devel] [PATCH v4 2/2] query-command-line-options: query all the options in qemu-options.hx

2014-03-10 Thread Eric Blake
On 03/07/2014 02:54 AM, Markus Armbruster wrote: Eric Blake ebl...@redhat.com writes: On 03/05/2014 07:36 PM, Amos Kong wrote: vm_config_groups[] only contains part of the options which have argument, and all options which have no argument aren't added to vm_config_groups[]. Current

[libvirt] [PATCH] libxl: support sexpr in native to XML conversion

2014-03-10 Thread Jim Fehlig
Supporting sexpr in connectDomainXMLFromNative in the libxl driver adds flexibility for users importing legacy Xen configuration into libvirt. E.g. this patch allows importing previous xend-managed domains from /var/lib/xend/domains/dom-uuid/config.sxp into the libvirt libxl driver.

Re: [libvirt] [PATCH v14 49/49] add pci passthrough to libxl driver

2014-03-10 Thread Jim Fehlig
Chunyan Liu wrote: Add pci passthrough to libxl driver, support attach-device, detach-device and start a vm with pci hostdev specified. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 63 +++ src/libxl/libxl_conf.h | 7 +- src/libxl/libxl_driver.c | 454

Re: [libvirt] [PATCH] BZ1072677: Avoid freeing of 0 file descriptor

2014-03-10 Thread Eric Blake
On 03/08/2014 04:29 PM, Stefan Berger wrote: From: Stefan Berger stef...@linux.vnet.ibm.com Avoid the freeing of an array of zero file descriptors in case of error. Introduce a macro VIR_INIT_N_FD to initialize such an array's elements to -1. Signed-off-by: Stefan Berger

  1   2   >