[libvirt] [PATCH] add pci passthrough impl to libxl

2013-05-16 Thread Chunyan Liu
Add pci passthrough implementation to libxl driver, using hostdev common library. --- src/libxl/libxl_conf.c | 44 src/libxl/libxl_driver.c | 21 - 2 files changed, 64 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH] add hostdev passthrough common library

2013-05-16 Thread Chunyan Liu
Write separate module for hostdev passthrough so that it could be used by all hypervisor drivers and maintain a global hostdev state. --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt.c|5 + src/libvirt_private.syms | 15 +

[libvirt] [PATCH]write separate module for hostdev passthrough

2013-05-16 Thread Chunyan Liu
This patch sets include two patches: 1/2 is the implementation of the hostdev passthrough common library. To meet two purposes: a. move qemu hostdev APIs to common library so that it could be used by all hypervisor drivers. b. maintain a global hostdev in-use state. 2/2 is the implementation of

Re: [libvirt] [PATCH v2 07/12] qemu: Allow multiple vhost-net openings

2013-05-16 Thread Laine Stump
On 05/13/2013 01:23 PM, Michal Privoznik wrote: With multiqueue network feature, we are advised to pass multiple vhost-net FDs as well. The ratio should be 1:1. Therefore we must alter the qemuOpenVhostNet function to allow that. --- src/qemu/qemu_command.c | 40

[libvirt] [PATCH 1/2] add hostdev passthrough common library

2013-05-16 Thread Chunyan Liu
Write separate module for hostdev passthrough so that it could be used by all hypervisor drivers and maintain a global hostdev state. Signed-off-by: Chunyan Liu cy...@suse.com --- po/POTFILES.in |1 + src/Makefile.am |1 + src/libvirt.c|5 +

[libvirt] [PATCH 0/2]write separate module for hostdev passthrough

2013-05-16 Thread Chunyan Liu
This patch sets include two patches: 1/2 is the implementation of the hostdev passthrough common library. To meet two purposes: a. move qemu hostdev APIs to common library so that it could be used by all hypervisor drivers. b. maintain a global hostdev in-use state. 2/2 is the implementation of

[libvirt] [PATCH 2/2] add pci passthrough impl to libxl

2013-05-16 Thread Chunyan Liu
Add pci passthrough implementation to libxl driver, using hostdev common library. Signed-off-by: Chunyan Liu cy...@suse.com --- src/libxl/libxl_conf.c | 44 src/libxl/libxl_driver.c | 21 - 2 files changed, 64 insertions(+),

[libvirt] [PATCH] build: Fix check-driverimpls in VPATH

2013-05-16 Thread Jiri Denemark
DRIVER_SOURCE_FILES mixes files with absolute path (inherited from REMOTE_DRIVER_GENERATED) with file paths that are relative to srcdir but check-driverimpls.pl needs full paths. --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am

Re: [libvirt] [PATCH 1/4] maint: use LGPL correctly

2013-05-16 Thread Martin Kletzander
On 05/16/2013 02:23 AM, Eric Blake wrote: Several files called out COPYING or COPYING.LIB instead of using the normal boilerplate. It's especially important that we don't call out COPYING from an LGPL file, since COPYING is traditionally used for the GPL. A few files were lacking copyright

Re: [libvirt] [PATCH 2/4] maint: follow recommended practice for using LGPL

2013-05-16 Thread Martin Kletzander
On 05/16/2013 02:23 AM, Eric Blake wrote: https://www.gnu.org/licenses/gpl-howto.html states: You should also include a copy of the license itself somewhere in the distribution of your program. All programs, whether they are released under the GPL or LGPL, should include the text version of

Re: [libvirt] [PATCH 3/4] maint: refer to correct license file

2013-05-16 Thread Martin Kletzander
On 05/16/2013 02:23 AM, Eric Blake wrote: Now that COPYING no longer contains the text of the LGPL, modify the LGPLv2-only files from vbox to call out the correct file. * src/vbox/vbox_CAPI_v2_2.h: Refer to correct file. * src/vbox/vbox_CAPI_v3_0.h: Likewise. * src/vbox/vbox_CAPI_v3_1.h:

Re: [libvirt] [PATCH 4/4] maint: enforce correct copyright usage

2013-05-16 Thread Martin Kletzander
On 05/16/2013 02:23 AM, Eric Blake wrote: To ensure we don't regress and cause the need for further cleanups, add a 'make syntax-check' rule that ensures new files have proper copyright contents. * cfg.mk (sc_copyright_file): New rule. Signed-off-by: Eric Blake ebl...@redhat.com ---

Re: [libvirt] [PATCH] Move VirtualBox driver into libvirtd

2013-05-16 Thread Martin Kletzander
On 05/15/2013 12:33 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Change the build process driver initialization so that the VirtualBox driver is built into libvirtd, instead of libvirt.so This change avoids the VirtualBox GPLv2-only license causing

Re: [libvirt] [PATCH v3 27/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmware/*

2013-05-16 Thread Michal Privoznik
On 15.05.2013 23:23, Matthias Bolte wrote: 2013/5/3 Michal Privoznik mpriv...@redhat.com: --- src/vmware/vmware_conf.c | 28 ++-- src/vmware/vmware_driver.c | 11 +-- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/vmware/vmware_conf.c

Re: [libvirt] [PATCH 1/3] qemu: Allow to specify the sysfs root for qemuBuildCommandLine

2013-05-16 Thread Daniel P. Berrange
On Wed, May 15, 2013 at 01:09:44PM -0400, Laine Stump wrote: On 05/15/2013 07:23 AM, Osier Yang wrote: On 15/05/13 19:09, Daniel P. Berrange wrote: Instead of adding many parameters to the API, we could provide a struct Agreed, many params is always not good. . containing all the

Re: [libvirt] [PATCH 2/2] libvirt patch to write a mcs translation file to /run/setrans directory

2013-05-16 Thread Daniel P. Berrange
On Wed, May 15, 2013 at 02:36:32PM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com mcstransd is a translation tool that can translate MCS Labels into human understandable code. I have patched it to watch for translation files in the /run/setrans directory. This allows us

Re: [libvirt] [PATCH 0/2]write separate module for hostdev passthrough

2013-05-16 Thread Osier Yang
On 16/05/13 14:07, Chunyan Liu wrote: This patch sets include two patches: 1/2 is the implementation of the hostdev passthrough common library. To meet two purposes: a. move qemu hostdev APIs to common library so that it could be used by all hypervisor drivers. b. maintain a global hostdev

Re: [libvirt] [PATCH 1/2] add hostdev passthrough common library

2013-05-16 Thread Osier Yang
On 16/05/13 14:07, Chunyan Liu wrote: Write separate module for hostdev passthrough so that it could be used by all hypervisor drivers and maintain a global hostdev state. Signed-off-by: Chunyan Liucy...@suse.com --- po/POTFILES.in |1 + src/Makefile.am |1

Re: [libvirt] [PATCH 1/2] qemu: Add callback struct for qemuBuildCommandLine

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 12:33:56AM +0800, Osier Yang wrote: On 15/05/13 23:32, Daniel P. Berrange wrote: On Wed, May 15, 2013 at 11:25:19PM +0800, Osier Yang wrote: Since 0d70656afded, it starts to access the sysfs files to build the qemu command line (by virSCSIDeviceGetSgName, which is to

Re: [libvirt] [PATCH 2/2] tests: Move fchostdata into sysfsroot

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 12:37:23AM +0800, Osier Yang wrote: On 15/05/13 23:36, Daniel P. Berrange wrote: On Wed, May 15, 2013 at 11:25:20PM +0800, Osier Yang wrote: fchostdata is also about sysfs files, it can go home now. --- Not sure I really agree with this change. The 'fchostdata' files

[libvirt] [PATCH] util: Fix build without devmapper

2013-05-16 Thread Jiri Denemark
stdlib.h header file needed for getenv was only transitively included through libdevmapper.h. --- Pushed as a trivial build-breaker. src/util/virutil.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virutil.c b/src/util/virutil.c index ab3c82f..7f4ecd6 100644 ---

[libvirt] [PATCH 0/8] Add qcow2 extensions support

2013-05-16 Thread Ján Tomko
Since QEMU 1.1 qcow2 supports a features bitfield, allowing to implement additional features without breaking compatibility with older QEMU versions. The version header on-disk is bumped to 3, however the format name is still 'qcow2', not 'qcow3' (which is what I used in v2). v2:

[libvirt] [PATCH 1/8] storage: rework qemu-img command line generation

2013-05-16 Thread Ján Tomko
Split out option string generation to make adding new options easier and simplify the code. --- src/storage/storage_backend.c | 111 ++ 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/src/storage/storage_backend.c

[libvirt] [PATCH 7/8] Add qcow2 features support to snapshots

2013-05-16 Thread Ján Tomko
--- docs/schemas/domainsnapshot.rng | 7 +++ src/conf/snapshot_conf.c | 74 src/conf/snapshot_conf.h | 2 + tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 5 ++

[libvirt] [PATCH 4/8] conf: add features to volume target XML

2013-05-16 Thread Ján Tomko
Add features and compat elements to volume target XML. compat is a string which for qcow2 represents the QEMU version it should be compatible with. Valid values are 0.10 and 1.1. 1.1 is implicit if the features element is present, otherwise qemu-img default is used. 0.10 can be specified to

[libvirt] [PATCH 2/8] tests: don't overwrite error in storage xml-to-argv test

2013-05-16 Thread Ján Tomko
When cmd is NULL, virCommandToString reports an OOM error, overwriting the error reported by virStorageBackendCreateQemuImgCmd. --- tests/storagevolxml2argvtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/storagevolxml2argvtest.c

[libvirt] [PATCH 8/8] qemu: add qcow2 extension support to inactive external snapshots

2013-05-16 Thread Ján Tomko
For live external snapshots, the image creation is done by QEMU and we can't pass the needed options. --- docs/formatsnapshot.html.in | 5 src/qemu/qemu_driver.c | 72 +++-- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git

[libvirt] [PATCH 6/8] conf: split out snapshot disk XML formatting

2013-05-16 Thread Ján Tomko
Just to reduce the indentation levels. Remove the unneeded NULL check for disk-file, as virBufferEscapeString doesn't print anything with NULL arguments. --- src/conf/snapshot_conf.c | 53 ++-- 1 file changed, 29 insertions(+), 24 deletions(-) diff

[libvirt] [PATCH 3/8] util: add support for qcow2v3 image detection

2013-05-16 Thread Ján Tomko
Detect qcow2 images with version 3 in the image header as VIR_STORAGE_FILE_QCOW2. These images have a feature bitfield, with just one feature supported so far: lazy_refcounts. The header length changed too, moving the location of the backing format name. --- src/util/virstoragefile.c | 164

[libvirt] [PATCH 5/8] storage: add support for creating qcow2 images with extensions

2013-05-16 Thread Ján Tomko
Add -o compat= and -o lazy_refcounts options for qemu-img. --- src/storage/storage_backend.c | 36 +++-- tests/storagevolxml2argvdata/qcow2-1.1.argv | 1 + tests/storagevolxml2argvdata/qcow2-lazy.argv| 1 +

[libvirt] [PATCH 3/5] storage_conf: Various fixes or improvements on pool def parsing

2013-05-16 Thread Osier Yang
virStorageDefParsePerms: * Use uid_t/gid_t to do casting virStoragePoolDefParseSource: * Improve the error message for source name parsing * Remove the useless casting (const char *) virStoragePoolDefParseAuthChap: * Fix the wrong error message virStoragePoolDefParseAuthCephx: * Don't

[libvirt] [PATCH 0/5] storage_conf: cleanups

2013-05-16 Thread Osier Yang
*** BLURB HERE *** Osier Yang (5): storage_conf: Fix the coding stype in storage_conf.c storage_conf: Fix indentions in storage_conf.c storage_conf: Various fixes or improvements on pool def parsing storage_conf: Left fixes or improvements for storage_conf.c storage_conf: Improve the

[libvirt] [PATCH 1/5] storage_conf: Fix the coding stype in storage_conf.c

2013-05-16 Thread Osier Yang
Changes: * Remove the useless space in for statement (e.g. for (i = 0 ; i something ; i++) * Change the function's style to: void foo(bar) { printf(foo is not bar\n); } * Don't lose {} for if...else branches if one of the branch has more than one line

[libvirt] [PATCH 4/5] storage_conf: Left fixes or improvements for storage_conf.c

2013-05-16 Thread Osier Yang
virStorageVolDefParseXML: * Create virStorageVolDefPtr def, and use ret to track the return value; frees the strings at cleanup label instead of freeing them in the middle. virStorageVolDefFormat: * Use macro NULLSTR --- src/conf/storage_conf.c | 93

[libvirt] [PATCH] qemu: Fix crash in migration of graphics-less guests.

2013-05-16 Thread Viktor Mihajlovski
Commit 7f15ebc7a2b599ab10dbc15bca6f823591213e67 introduced a bug happening when guests without a graphics element are migrated. The initialization of listenAddress happens unconditionally from the cookie even if the cookie-graphics pointer was NULL. Moved the initialization to where it is safe.

[libvirt] [PATCH 2/5] storage_conf: Fix indentions in storage_conf.c

2013-05-16 Thread Osier Yang
Uses the 4 spaces for indention. --- src/conf/storage_conf.c | 176 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 643c3cc..8fa805b 100644 --- a/src/conf/storage_conf.c +++

[libvirt] [PATCH] qemu: Add support for locking domain's memory pages

2013-05-16 Thread Jiri Denemark
--- docs/formatdomain.html.in | 26 +- docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c | 20 + src/conf/domain_conf.h | 1 +

[libvirt] [PATCH 5/5] storage_conf: Improve the coding style in storage_conf.h

2013-05-16 Thread Osier Yang
Changes: * Remove useless comments * Remove useless blank lines * If the struct member is a enum type, comment it like /* enum fooBar */ * Break the long lines * Prefer the common function style for the inline function --- src/conf/storage_conf.h | 120

[libvirt] [PATCHv3 03/11] qemu: Make qemuMonitorAddNetdev to pass multiple FDs

2013-05-16 Thread Michal Privoznik
Currently, only one tapfd and one vhostfd could be passed. However, multiqueue network requires several FDs to be passed to qemu so we must adapt out monitor handling functions to cope with that. --- src/qemu/qemu_hotplug.c | 7 +-- src/qemu/qemu_monitor.c | 39

[libvirt] [PATCHv3 08/11] qemu: Rework qemuNetworkIfaceConnect

2013-05-16 Thread Michal Privoznik
For future work it's better, if tapfd is passed as pointer. Moreover, we need to be able to return multiple values now. --- src/qemu/qemu_command.c | 89 ++--- src/qemu/qemu_command.h | 4 ++- src/qemu/qemu_hotplug.c | 4 +-- 3 files changed, 53

[libvirt] [PATCHv3 06/11] util: Learn virNetDevTapCreate multiqueue network

2013-05-16 Thread Michal Privoznik
Currently, the function knows how to open a TAP device for a single time. However, in case of multiqueue network we need to open it multiple times. Moreover, when doing TUNSETIFF ioctl, the IFF_MULTI_QUEUE flag shall be requested. This commit changes a behaviour slightly as well. Till now it was

[libvirt] [PATCHv3 00/11] Multiple TX queue support

2013-05-16 Thread Michal Privoznik
Fixed version with Laine's comments worked in [1]. Patches 2, 3 and 5 has been ACKed already. BTW, patch 4 is really a different to patch 3. The only thing they share is a commit message body. Kernel and subsequently QEMU learned multiple transmit queues a while ago. The feature has a nice

[libvirt] [PATCHv3 11/11] qemu: Enable multiqueue network

2013-05-16 Thread Michal Privoznik
--- src/qemu/qemu_command.c | 26 ++ src/qemu/qemu_hotplug.c | 27 --- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5d64705..7661b13 100644 --- a/src/qemu/qemu_command.c +++

[libvirt] [PATCHv3 02/11] qemu: Move interface cmd line construction into a separate function

2013-05-16 Thread Michal Privoznik
Currently, we have one huge function to construct qemu command line. This is very ineffective esp. if there's a fault somewhere. --- src/qemu/qemu_command.c | 224 +--- 1 file changed, 117 insertions(+), 107 deletions(-) diff --git

[libvirt] [PATCHv3 09/11] qemu: Adapt qemuDomainAttachNetDevice to multiqueue net

2013-05-16 Thread Michal Privoznik
--- src/qemu/qemu_hotplug.c | 96 +++-- 1 file changed, 61 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 953339b..695edc7 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[libvirt] [PATCHv3 05/11] qemu: Adapt command line generation to multiqueue net

2013-05-16 Thread Michal Privoznik
The qemuBuildHostNetStr() function which is responsible for generating command line for a network interface needs to be aware of multiqueue network interface as we are required to use: - fd=%d in case of one FD - fds=%d:%d:%d:...:%d in case of multiple FDs These two approaches can't be

Re: [libvirt] [PATCH 5/5] storage_conf: Improve the coding style in storage_conf.h

2013-05-16 Thread Osier Yang
On 16/05/13 20:40, Osier Yang wrote: Changes: * Remove useless comments * Remove useless blank lines * If the struct member is a enum type, comment it like /* enum fooBar */ * Break the long lines * Prefer the common function style for the inline function ---

[libvirt] [PATCHv3 04/11] qemu: Make qemuMonitorAddHostNetwork to pass multiple FDs

2013-05-16 Thread Michal Privoznik
Currently, only one tapfd and one vhostfd could be passed. However, multiqueue network requires several FDs to be passed to qemu so we must adapt out monitor handling functions to cope with that. --- src/qemu/qemu_hotplug.c | 7 +-- src/qemu/qemu_monitor.c | 39

[libvirt] [PATCHv3 10/11] qemu: Adapt qemuBuildInterfaceCommandLine to to multiqueue net

2013-05-16 Thread Michal Privoznik
--- src/qemu/qemu_command.c | 82 ++--- 1 file changed, 58 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f2c6d47..5d64705 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@

[libvirt] [PATCHv3 01/11] Introduce /domain/devices/interface/driver/@queues attribute

2013-05-16 Thread Michal Privoznik
This attribute is going to represent number of queues for multique vhost network interface. This commit implements XML extension part of the feature and add one test as well. For now, we can only do xml2xml test as qemu command line generation code is not adapted yet. ---

[libvirt] [PATCHv3 07/11] qemu: Allow multiple vhost-net openings

2013-05-16 Thread Michal Privoznik
With multiqueue network feature, we are advised to pass multiple vhost-net FDs as well. The ratio should be 1:1. Therefore we must alter the qemuOpenVhostNet function to allow that. --- src/qemu/qemu_command.c | 60 - src/qemu/qemu_command.h | 3

[libvirt] [PATCH] qemu: Fix cgroup handling when setting VCPU BW

2013-05-16 Thread Martin Kletzander
Commit 632f78c introduced a regression which causes schedinfo being unable to set some parameters. When migrating to priv-cgroup there was missing variable left out and due to passed NULL to underlying function, the setting failed. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963592 ---

[libvirt] [PATCH 1/3 v3] qemu: new vnc display sharing policy caps flag

2013-05-16 Thread Guannan Ren
QEMU_CAPS_VNC_SHARE_POLICY (qemu = 1.1) --- src/qemu/qemu_capabilities.c | 6 +- src/qemu/qemu_capabilities.h | 1 + tests/qemuhelptest.c | 9 ++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 0/3 v3]add 'sharePolicy' attribute for qemu vnc sharing policy

2013-05-16 Thread Guannan Ren
v2-v3 rebase work. v1-v2: changed attribute name from 'policy' to 'sharePolicy' renamed caps flag name: QEMU_CAPS_VNC_SHARE_POLICY fixed issues pointed out in v1 review have to keep hard-coded version probe after checking qemu -help and qmp command. As there were some vnc patches

[libvirt] [PATCH 3/3 v3] qemu: add ', share=policy' to qemu commandline

2013-05-16 Thread Guannan Ren
example: qemu ${otherargs} \ -vnc 127.0.0.1:0,share=allow-exclusive --- src/qemu/qemu_command.c | 36 tests/qemuargv2xmltest.c | 1 + tests/qemuxml2argvtest.c | 1 + 3 files changed, 38 insertions(+) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH 2/3 v3] conf: add 'sharePolicy' attribute to graphics element for vnc

2013-05-16 Thread Guannan Ren
-vnc :5900,share=allow-exclusive allows clients to ask for exclusive access which is implemented by dropping other connections Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch) -vnc :5900,share=force-shared disables exclusive

Re: [libvirt] [PATCH] build: Fix check-driverimpls in VPATH

2013-05-16 Thread Eric Blake
On 05/16/2013 12:20 AM, Jiri Denemark wrote: DRIVER_SOURCE_FILES mixes files with absolute path (inherited from REMOTE_DRIVER_GENERATED) with file paths that are relative to srcdir but check-driverimpls.pl needs full paths. --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [libvirt] [PATCH] qemu: Fix cgroup handling when setting VCPU BW

2013-05-16 Thread Osier Yang
On 16/05/13 21:02, Martin Kletzander wrote: Commit 632f78c introduced a regression which causes schedinfo being unable to set some parameters. When migrating to priv-cgroup there was missing variable left out and due to passed NULL to underlying function, the setting failed. Resolves:

Re: [libvirt] [PATCH] build: Fix check-driverimpls in VPATH

2013-05-16 Thread Jiri Denemark
On Thu, May 16, 2013 at 06:58:56 -0600, Eric Blake wrote: On 05/16/2013 12:20 AM, Jiri Denemark wrote: DRIVER_SOURCE_FILES mixes files with absolute path (inherited from REMOTE_DRIVER_GENERATED) with file paths that are relative to srcdir but check-driverimpls.pl needs full paths. ---

Re: [libvirt] [PATCH] qemu: Fix crash in migration of graphics-less guests.

2013-05-16 Thread Jiri Denemark
On Thu, May 16, 2013 at 14:41:29 +0200, Viktor Mihajlovski wrote: Commit 7f15ebc7a2b599ab10dbc15bca6f823591213e67 introduced a bug happening when guests without a graphics element are migrated. The initialization of listenAddress happens unconditionally from the cookie even if the

[libvirt] [PATCH 1/3] lxc_process: Resolve Coverity NULL_RETURNS error

2013-05-16 Thread John Ferlan
In virLXCProcessReboot, if the 'conn' value is NULL, the eventual call to virLXCNetworkLookupByName() via virLXCProcessStart() and virLXCProcessSetupInterfaces() will cause a core since it references conn-networkDriver directly. --- src/lxc/lxc_process.c | 4 ++-- 1 file changed, 2 insertions(+),

[libvirt] [PATCH 3/3] shunloadtest: Resolve Coverity CHECKED_RETURN error

2013-05-16 Thread John Ferlan
The shunloadStart function didn't check the status of virInitialize which was flagged by Coverity. Adjust the function and shunloadtest in order to handle the situation. --- tests/shunloadhelper.c | 12 tests/shunloadtest.c | 26 +- 2 files changed, 25

[libvirt] [PATCH 2/3] xencapstest: Resolve Coverity CHECKED_RETURN error

2013-05-16 Thread John Ferlan
The return from virInitialize() needs to be checked. --- tests/xencapstest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/xencapstest.c b/tests/xencapstest.c index e220234..8bdd6cd 100644 --- a/tests/xencapstest.c +++ b/tests/xencapstest.c @@ -161,7 +161,8 @@

[libvirt] [PATCH 0/3] Resolve Coverity found issues

2013-05-16 Thread John Ferlan
Upgraded to Coverity 6.5.3 which uncovered a few code paths with issues. John Ferlan (3): lxc_process: Resolve Coverity NULL_RETURNS error xencapstest: Resolve Coverity CHECKED_RETURN error shunloadtest: Resolve Coverity CHECKED_RETURN error src/lxc/lxc_process.c | 4 ++--

[libvirt] [PATCH] daemon: fix leak after listing all volumes

2013-05-16 Thread Ján Tomko
CVE-2013-1962 remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool. The pool also held a reference to the connection, preventing it from getting freed and closing the netcf interface driver, which held two sockets open. --- daemon/remote.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [libvirt] [PATCH] daemon: fix leak after listing all volumes

2013-05-16 Thread Eric Blake
On 05/16/2013 08:03 AM, Ján Tomko wrote: CVE-2013-1962 remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool. The pool also held a reference to the connection, preventing it from getting freed and closing the netcf interface driver, which held two sockets open. ---

Re: [libvirt] [PATCH] daemon: fix leak after listing all volumes

2013-05-16 Thread Ján Tomko
On 05/16/2013 04:06 PM, Eric Blake wrote: On 05/16/2013 08:03 AM, Ján Tomko wrote: CVE-2013-1962 remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool. The pool also held a reference to the connection, preventing it from getting freed and closing the netcf interface driver, which

Re: [libvirt] [PATCH 1/3] lxc_process: Resolve Coverity NULL_RETURNS error

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 10:01:51AM -0400, John Ferlan wrote: In virLXCProcessReboot, if the 'conn' value is NULL, the eventual call to virLXCNetworkLookupByName() via virLXCProcessStart() and virLXCProcessSetupInterfaces() will cause a core since it references conn-networkDriver directly. ---

Re: [libvirt] [PATCHv3 00/11] Multiple TX queue support

2013-05-16 Thread Laine Stump
On 05/16/2013 08:49 AM, Michal Privoznik wrote: Fixed version with Laine's comments worked in [1]. Patches 2, 3 and 5 has been ACKed already. BTW, patch 4 is really a different to patch 3. The only thing they share is a commit message body. Ah, I see now. I started reading through patch 4

Re: [libvirt] [PATCH 1/3] lxc_process: Resolve Coverity NULL_RETURNS error

2013-05-16 Thread Eric Blake
On 05/16/2013 08:01 AM, John Ferlan wrote: In virLXCProcessReboot, if the 'conn' value is NULL, the eventual call to virLXCNetworkLookupByName() via virLXCProcessStart() and virLXCProcessSetupInterfaces() will cause a core since it references conn-networkDriver directly. Did you investigate

Re: [libvirt] [PATCH 3/3] shunloadtest: Resolve Coverity CHECKED_RETURN error

2013-05-16 Thread Eric Blake
On 05/16/2013 08:01 AM, John Ferlan wrote: The shunloadStart function didn't check the status of virInitialize which was flagged by Coverity. Adjust the function and shunloadtest in order to handle the situation. --- tests/shunloadhelper.c | 12 tests/shunloadtest.c | 26

Re: [libvirt] [PATCH 2/3] xencapstest: Resolve Coverity CHECKED_RETURN error

2013-05-16 Thread Eric Blake
On 05/16/2013 08:01 AM, John Ferlan wrote: The return from virInitialize() needs to be checked. --- tests/xencapstest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ACK. diff --git a/tests/xencapstest.c b/tests/xencapstest.c index e220234..8bdd6cd 100644 ---

[libvirt] [PATCH] datatypes: fix virGetStoragePool's comment

2013-05-16 Thread Ján Tomko
--- Pushed under the trivial rule. src/datatypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatypes.c b/src/datatypes.c index 884eb3e..940d968 100644 --- a/src/datatypes.c +++ b/src/datatypes.c @@ -421,7 +421,7 @@ virInterfaceDispose(void *obj) * and register

[libvirt] [PATCH 1/2] schema: require target path in storage pool xml

2013-05-16 Thread Ján Tomko
Make target path mandatory for pool types that require target, since we refuse to parse a target without a path. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagepool.rng | 8 +++- tests/Makefile.am

[libvirt] [PATCH 2/2] schema: make source optional in volume XML

2013-05-16 Thread Ján Tomko
We don't parse it anyway. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagevol.rng| 4 +++- tests/Makefile.am | 3 ++- tests/storagevolschemadata/qcow2-no-source.xml | 29 ++

[libvirt] [PATCH 0/2] Fix storage schema issues

2013-05-16 Thread Ján Tomko
Fix https://bugzilla.redhat.com/show_bug.cgi?id=893273 Ján Tomko (2): schema: require target path in storage pool xml schema: make source optional in volume XML docs/schemas/storagepool.rng | 8 +++--- docs/schemas/storagevol.rng| 4 ++-

Re: [libvirt] [libvirt PATCH] conf: Fix the bug of disk-copy_on_read formating

2013-05-16 Thread Ján Tomko
On 05/14/2013 02:56 PM, Osier Yang wrote: On 14/05/13 17:29, Ján Tomko wrote: On 05/14/2013 11:03 AM, Osier Yang wrote: The reason for it's not exposed for such long time is that there is no xml2xml test for it. This fixes the bug and adds test. It was not exposed, because

Re: [libvirt] [PATCH 1/3] lxc_process: Resolve Coverity NULL_RETURNS error

2013-05-16 Thread John Ferlan
On 05/16/2013 10:19 AM, Eric Blake wrote: On 05/16/2013 08:01 AM, John Ferlan wrote: In virLXCProcessReboot, if the 'conn' value is NULL, the eventual call to virLXCNetworkLookupByName() via virLXCProcessStart() and virLXCProcessSetupInterfaces() will cause a core since it references

[libvirt] [PATCH v3] qemu: Add callback struct for qemuBuildCommandLine

2013-05-16 Thread Osier Yang
Since 0d70656afded, it starts to access the sysfs files to build the qemu command line (by virSCSIDeviceGetSgName, which is to find out the scsi generic device name by adpater:bus:target:unit), there is no way to work around, qemu wants to see the scsi generic device like /dev/sg6 anyway. And

Re: [libvirt] [libvirt PATCH] conf: Fix the bug of disk-copy_on_read formating

2013-05-16 Thread Osier Yang
On 16/05/13 22:44, Ján Tomko wrote: On 05/14/2013 02:56 PM, Osier Yang wrote: On 14/05/13 17:29, Ján Tomko wrote: On 05/14/2013 11:03 AM, Osier Yang wrote: The reason for it's not exposed for such long time is that there is no xml2xml test for it. This fixes the bug and adds test. It was not

Re: [libvirt] [PATCH 14/25] conf: Introduce shareable for hostdev

2013-05-16 Thread Osier Yang
On 07/05/13 21:45, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: Unlike disk device, the scsi-generic always writethrough the data, so no need to introduce a cache tag, and set cache=off. --- docs/formatdomain.html.in | 6

[libvirt] [PATCH] test: fix VPATH fchosttest failure

2013-05-16 Thread Viktor Mihajlovski
Running make check in a VPATH configured build directory fails in fchosttest as the test data files are searched for relative to the current working directory. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- This may become obsolete with Osier's pending patches, but it helps

Re: [libvirt] [PATCH 17/25] utils: Add a helper to get the device name that sg device mapped to

2013-05-16 Thread Osier Yang
On 07/05/13 22:51, Osier Yang wrote: On 07/05/13 22:00, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: E.g. % sg_map /dev/sg0 /dev/sda /dev/sg1 /dev/sr0 What the helper gets for /dev/sg0 is /dev/sda, it will be used by later patch. --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH 16/25] qemu: Rename qemu_driver-sharedDisks to qemu_driver-sharedDevices

2013-05-16 Thread Osier Yang
On 07/05/13 21:52, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: Shared disk is not only the thing we should care about after scsi hostdev is introduced. A same scsi device can be used as disk for one domain, and as scsi hostdev for another domain at the same time. That's why

[libvirt] [PATCH 2/2] libxl: fix leaking libxl events

2013-05-16 Thread Jim Fehlig
libxl expects the event handler to free the event passed to it. From libxl_event.h: event becomes owned by the application and must be freed, either by event_occurs or later --- src/libxl/libxl_driver.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH 1/2] libxl: fix build with Xen4.3

2013-05-16 Thread Jim Fehlig
Xen 4.3 fixes a mistake in the libxl event handler signature where the event owned by the application was defined as const. Detect this and define the libvirt libxl event handler signature appropriately. --- src/libxl/libxl_driver.c |7 ++- 1 files changed, 6 insertions(+), 1

Re: [libvirt] [PATCH] Change label of fusefs mounted at /proc/meminfo in lxc containers

2013-05-16 Thread Daniel P. Berrange
On Wed, May 15, 2013 at 10:35:48AM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com We do not want to allow contained applications to be able to read fusefs_t. So we want /proc/meminfo label to match the system default proc_t. Fix checking of error codes ---

Re: [libvirt] [PATCH] Change label of fusefs mounted at /proc/meminfo in lxc containers

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 05:04:06PM +0100, Daniel P. Berrange wrote: On Wed, May 15, 2013 at 10:35:48AM -0400, dwa...@redhat.com wrote: From: Dan Walsh dwa...@redhat.com We do not want to allow contained applications to be able to read fusefs_t. So we want /proc/meminfo label to match the

[libvirt] [PATCH v2] [TCK] nwfilter: probe for inverted ctdir

2013-05-16 Thread Stefan Berger
Linux netfilter at some point inverted the meaning of the '--ctdir reply' and newer netfilter implementations now expect '--ctdir original' instead and vice-versa. We probe for this netfilter change via an IMCP message over loopback and 3 filtering rules applied to INPUT. If the sent byte

[libvirt] Ongoing work on lock contention in qemu driver?

2013-05-16 Thread Peter Feiner
Hello Daniel, I've been working on improving scalability in OpenStack on libvirt+kvm for the last couple of months. I'm particularly interested in reducing the time it takes to create VMs when many VMs are requested in parallel. One apparent bottleneck during virtual machine creation is libvirt.

Re: [libvirt] Ongoing work on lock contention in qemu driver?

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 12:09:39PM -0400, Peter Feiner wrote: Hello Daniel, I've been working on improving scalability in OpenStack on libvirt+kvm for the last couple of months. I'm particularly interested in reducing the time it takes to create VMs when many VMs are requested in parallel.

Re: [libvirt] [PATCH 19/25] qemu: Manage shared device entry for scsi host device

2013-05-16 Thread Osier Yang
On 08/05/13 03:01, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: This adds the shared device entry when starting domain (more exactly, when preparing host devices), and remove the entry when destroying domain (when reattaching host devices). --- src/qemu/qemu_hostdev.c | 25

Re: [libvirt] [PATCH 18/25] qemu: Refactor the helpers to track shared scsi host device

2013-05-16 Thread Osier Yang
On 08/05/13 02:57, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: This changes the helpers qemu{Add,Remove}SharedDisk into qemu{Add,Remove}SharedDevice, as most of the code in the helpers can be reused for scsi host device. To track the shared scsi host device, first it finds out

Re: [libvirt] [PATCH 21/25] conf: Introduce sgio for hostdev

2013-05-16 Thread Osier Yang
On 08/05/13 03:17, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: sgio is only valid for scsi host device. --- docs/formatdomain.html.in | 7 - docs/schemas/domaincommon.rng | 8 + src/conf/domain_conf.c

Re: [libvirt] [PATCH 22/25] qemu: Move qemuSetUnprivSGIO into qemu_conf.c

2013-05-16 Thread Osier Yang
On 08/05/13 07:42, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: unpriv_sgio setting is tight with the shared device helpers, let's put them together in qemu_conf.c --- src/qemu/qemu_conf.c| 36 src/qemu/qemu_conf.h| 2 ++

Re: [libvirt] [PATCH 23/25] qemu: Refactor qemuSetUnprivSGIO to support scsi host device

2013-05-16 Thread Osier Yang
On 08/05/13 07:44, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: Just like what previous patches do, it refactors qemuSetUnprivSGIO to take the virDomainDeviceDefPtr as argument instead. --- src/qemu/qemu_conf.c| 67 -

Re: [libvirt] [PATCH 24/25] qemu: Set unpriv_sgio for scsi host device

2013-05-16 Thread Osier Yang
On 08/05/13 07:54, John Ferlan wrote: On 05/03/2013 02:07 PM, Osier Yang wrote: --- src/qemu/qemu_hostdev.c | 3 +++ 1 file changed, 3 insertions(+) ACK Pushed. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Ongoing work on lock contention in qemu driver?

2013-05-16 Thread Peter Feiner
How many CPU cores are you testing on ? That's a good improvement, but I'd expect the improvement to be greater as # of core is larger. I'm testing on 12 Cores x 2 HT per code. As I'm working on teasing out software bottlenecks, I'm intentionally running fewer tasks (20 parallel creations)

[libvirt] [PATCH 0/2] libxl: a few fixes related to event handling

2013-05-16 Thread Jim Fehlig
Xen upstream commit 5fb11a07 fixed the signature of the event handler, causing build failures of the libxl driver on xen-unstable / Xen 4.3. While at it, plug leaking of libxl_event objects in the event handler. Jim Fehlig (2): libxl: fix build with Xen4.3 libxl: fix leaking libxl events

Re: [libvirt] Ongoing work on lock contention in qemu driver?

2013-05-16 Thread Daniel P. Berrange
On Thu, May 16, 2013 at 01:00:15PM -0400, Peter Feiner wrote: How many CPU cores are you testing on ? That's a good improvement, but I'd expect the improvement to be greater as # of core is larger. I'm testing on 12 Cores x 2 HT per code. As I'm working on teasing out software

  1   2   >