[libvirt] how to test libvirt?

2016-02-23 Thread Zhangbo (Oscar)
Hi all: AFAIK, there're several ways to test libvirt: 1) virt-test, which is driven by autotest or avocado-vt, based on qemu-kvm 2) test driver which is parall to other drivers such as qemu_driver and libxl_driver in libvirt. 3) make -c tests, which aims to do low level tests, that

[libvirt] [PATCH v3] This patch gives an error when migration is attempted with both --live and --offline options.

2016-02-23 Thread Nitesh Konkar
Signed-off-by: Nitesh Konkar --- tools/virsh-domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 43c8436..b9f678f 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9838,6 +9838,8 @@

Re: [libvirt] [PATCH] libxl: small fix in parsing network

2016-02-23 Thread Jim Fehlig
On 02/23/2016 01:07 AM, Chunyan Liu wrote: > Signed-off-by: Chunyan Liu > --- > src/libxl/libxl_conf.c | 2 +- > src/libxl/libxl_domain.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) I know it is super nit-picking, but ideally this should have been two patches. I

Re: [libvirt] [Xen-devel] [FOR 1.3.0 PATCH] conf: add net device prefix for Xen

2016-02-23 Thread Jim Fehlig
On 02/22/2016 04:15 PM, Joao Martins wrote: > > On 12/08/2015 04:06 PM, Jim Fehlig wrote: >> Daniel P. Berrange wrote: >>> On Mon, Dec 07, 2015 at 10:59:32PM -0700, Jim Fehlig wrote: On 12/07/2015 11:52 AM, Daniel P. Berrange wrote: > On Mon, Dec 07, 2015 at 09:42:21AM -0700, Jim Fehlig

Re: [libvirt] [PATCH V2 4/4] libxl: add support for rbd qdisk

2016-02-23 Thread Jim Fehlig
On 02/22/2016 07:35 AM, Ján Tomko wrote: > On Wed, Feb 17, 2016 at 05:33:45PM -0700, Jim Fehlig wrote: >> xl/libxl already supports qemu's network-based block backends >> such as nbd and rbd. libvirt has supported configuring such >> s for long time too. This patch adds support for rbd >> disks in

Re: [libvirt] [PATCH V2 4/4] libxl: add support for rbd qdisk

2016-02-23 Thread Jim Fehlig
Ján Tomko wrote: > On Wed, Feb 17, 2016 at 05:33:45PM -0700, Jim Fehlig wrote: >> xl/libxl already supports qemu's network-based block backends >> such as nbd and rbd. libvirt has supported configuring such >> s for long time too. This patch adds support for rbd >> disks in the libxl driver by

[libvirt] [PATCH] rbd: fix 32-bit build

2016-02-23 Thread Eric Blake
%zu is not always synonymous with uint64_t; on 32-bit machines, size_t is only 32 bits. Prefer "%llu"/'unsigned long long' when the variable is under our control, and "%"PRIu64 when we are stuck with 'uint64_t' from RBD. Fixes errors such as: ../../src/storage/storage_backend_rbd.c: In function

Re: [libvirt] [PATCH 2/5] rbd: Add support for wiping RBD volumes

2016-02-23 Thread Eric Blake
On 01/27/2016 03:20 AM, Wido den Hollander wrote: > When wiping the RBD image will be filled with zeros started > at offset 0 and until the end of the volume. > > This will result in the RBD volume growing to it's full allocation > on the Ceph cluster. All data on the volume will be overwritten >

[libvirt] [PATCH] libxl: fix bogus indentation from commit fb2bd208

2016-02-23 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- Found by Ján Tomko while reviewing fb2bd208. Pushing under the trivial rule. src/libxl/libxl_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 5133299..a109bb5 100644

Re: [libvirt] [FOR 1.3.0 PATCH] conf: add net device prefix for Xen

2016-02-23 Thread Joao Martins
On 02/22/2016 11:15 PM, Joao Martins wrote: > > > On 12/08/2015 04:06 PM, Jim Fehlig wrote: >> Daniel P. Berrange wrote: >>> On Mon, Dec 07, 2015 at 10:59:32PM -0700, Jim Fehlig wrote: On 12/07/2015 11:52 AM, Daniel P. Berrange wrote: > On Mon, Dec 07, 2015 at 09:42:21AM -0700, Jim

[libvirt] [PATCH v2 0/4] implement vram64 attribute for QXL video device

2016-02-23 Thread Pavel Hrdina
New in v2: - added patch to always set primary video device as primary - introduced new qemu monitor functions to update vram64 values after QEMU is started only if QEMU supports this parameter Pavel Hrdina (4): domain_conf: always set primary video device as primary docs/formatdomain:

[libvirt] [PATCH v2 2/4] docs/formatdomain: rewrite video documentation

2016-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- docs/formatdomain.html.in | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a524c17..3fcd728 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH v2 1/4] domain_conf: always set primary video device as primary

2016-02-23 Thread Pavel Hrdina
We always place primary video device at first place, to make it easier to create a qemu command or format an xml, but we should also set the primary boolean for primary video device to 'true'. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c

[libvirt] [PATCH v2 3/4] qemu_capabilities: introduce QEMU_CAPS_QXL(_VGA)_VRAM64

2016-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 2 ++ tests/qemucapabilitiesdata/caps_1.2.2-1.caps | 2 ++ tests/qemucapabilitiesdata/caps_1.3.1-1.caps | 2 ++

[libvirt] [PATCH v2 4/4] qemu: introduce vram64 attribute for QXL video device

2016-02-23 Thread Pavel Hrdina
This attribute is used to extend secondary PCI bar and expose it to the guest as 64bit memory. It works like this: attribute vram is there to set size of secondary PCI bar and guest sees it as 32bit memory, attribute vram64 can extend this secondary PCI bar. If both attributes are used, guest

[libvirt] [PATCH 0/5] Use virtlogd for chardevs & support logging

2016-02-23 Thread Daniel P. Berrange
This series of patches does two things * Converts the type=file chardev over to use virtlogd (assuming use of virtlogd is enabled in qemu.conf) * Adds a element to all chardev sources, allowing data to be captured to a logfile Both of these are important features wanted by openstack.

[libvirt] [PATCH 2/5] conf: allow use of a logfile with chardev backends

2016-02-23 Thread Daniel P. Berrange
Extend the chardev source XML so that there is a new optional element, which is applicable to all character device backend types. For example, to log output of a TCP backed serial port Not all hypervisors will support use of logfiles. Signed-off-by: Daniel

[libvirt] [PATCH 3/5] qemu: add support for logging chardev output to a file

2016-02-23 Thread Daniel P. Berrange
Honour the element in chardevs to output data to a file. This requires QEMU >= 2.6 Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c

[libvirt] [PATCH 5/5] qemu: support use of virtlogd with file based chardevs

2016-02-23 Thread Daniel P. Berrange
Currently the file based character devices let QEMU write directly to a file on disk. This allows a malicious QEMU to inflict a denial of service by consuming all free space. Switch QEMU to use a pipe to virtlogd, which will enforce file rollover. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH 4/5] qemu: use virtlogd for character device log files

2016-02-23 Thread Daniel P. Berrange
If use of virtlogd is enabled, then use it for backing the character device log files too. --- src/logging/log_daemon_dispatch.c | 3 +- src/logging/log_handler.c | 6 +- src/logging/log_handler.h | 2 +- src/logging/log_manager.h | 2 + src/logging/log_protocol.x

[libvirt] [PATCH 1/5] logging: allow inode/offset params to be NULL

2016-02-23 Thread Daniel P. Berrange
Not all callers of virLogManagerDomainOpenLogFile will care about getting the current inode/offset, so we should allow those parameters to be NULL Signed-off-by: Daniel P. Berrange --- src/logging/log_manager.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-)

Re: [libvirt] [PATCH v7 00/13] qemu: Add quorum support to libvirt

2016-02-23 Thread Alberto Garcia
On Thu, Feb 11, 2016 at 02:50:55PM +0100, Peter Krempa wrote: > > > Whoah. Data corruption accross network? I'm not quite sure > > > whether I'd use this to cover up a problem with the storage > > > technology or network rather than just fix the root cause. If > > > you have 3 copies, and manage

Re: [libvirt] [PATCH] make-kpkg: add support for "make olddefconfig"

2016-02-23 Thread Henning Schild
Sorry that one is unrelated. Ignore it. On Tue, 23 Feb 2016 16:58:35 +0100 Henning Schild wrote: > Signed-off-by: Henning Schild > --- > make-kpkg | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/make-kpkg

Re: [libvirt] [PATCH] add support for "make olddefconfig"

2016-02-23 Thread Henning Schild
Sorry that one is unrelated. Ignore it. On Tue, 23 Feb 2016 16:58:34 +0100 Henning Schild wrote: > Signed-off-by: Henning Schild > --- > make-kpkg | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/make-kpkg

[libvirt] [PATCH 8/9] qemu_cgroup: dont put qemu main thread into wrong cgroup

2016-02-23 Thread Henning Schild
Eventually all qemu threads are supposed to be in the final cgroup structure in one of the leaf cgroups (vcpuX, emulator). They should never be in the main machine cgroup. That is for all thread related controllers like cpuset, cpu, and cpuacct. By excluding the threading related controllers we do

[libvirt] [PATCH 4/9] util: cgroups do not implicitly add task to new machine cgroup

2016-02-23 Thread Henning Schild
virCgroupNewMachine used to add the pidleader to the newly created machine cgroup. Do not do this implicit anymore. Signed-off-by: Henning Schild --- src/lxc/lxc_cgroup.c | 11 +++ src/qemu/qemu_cgroup.c | 11 +++ src/util/vircgroup.c | 22

[libvirt] [PATCH 6/9] qemu_cgroup: use virCgroupAddTask instead of virCgroupMoveTask

2016-02-23 Thread Henning Schild
qemuSetupCgroupForEmulator runs at a point in time where there is only the qemu main thread. Use virCgroupAddTask to put just that one task into the emulator cgroup. That patch makes virCgroupMoveTask and virCgroupAddTaskStrController obsolete. Signed-off-by: Henning Schild

[libvirt] [PATCH 7/9] vircgroup: add controller mask to virCgroupAddTask

2016-02-23 Thread Henning Schild
Add a way to exclude controllers from virCgroupAddTask. In a cgroup hierarchy the parent might have controllers just to allow children cgroups to inherit them, not necessarily to put any tasks in them. Signed-off-by: Henning Schild --- src/lxc/lxc_cgroup.c | 2 +-

[libvirt] [PATCH 9/9] qemu_cgroup: assert threading cgroup layout for machine cgroup

2016-02-23 Thread Henning Schild
Make sure the thread related controls of the machine cgroup never get any tasks assigned. Signed-off-by: Henning Schild --- src/qemu/qemu_cgroup.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_cgroup.c

[libvirt] [PATCH 3/9] vircgroup: introduce controller mask for threads

2016-02-23 Thread Henning Schild
When using a cgroups hierarchy threads have child cgroups for certain controllers. Introduce an enum for later reuse. Signed-off-by: Henning Schild --- src/util/vircgroup.c | 12 +++- src/util/vircgroup.h | 7 +++ 2 files changed, 10 insertions(+), 9

[libvirt] [PATCH 1/9] vircgroup: one central point for adding tasks to cgroups

2016-02-23 Thread Henning Schild
Use virCgroupAddTaskController in virCgroupAddTask so we have one single point where we add tasks to cgroups. Signed-off-by: Henning Schild --- src/util/vircgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircgroup.c

[libvirt] [PATCH 2/9] vircgroup: add assertion to allow cgroup controllers to stay empty

2016-02-23 Thread Henning Schild
When using a hierarchy of cgroups we might want to add tasks just to the children cgroups but never to the parent. To make sure we do not use a parent cgroup by accident add a mechanism that lets us assert a correct implementation in cases we want such a hierarchy. i.e. for qemu cpusets we want

[libvirt] [PATCH 5/9] qemu_cgroup: put qemu right into emulator sub-cgroup

2016-02-23 Thread Henning Schild
Move qemuSetupCgroupForEmulator up under qemuSetupCgroup. That way we move the one main thread right into the emulator cgroup, instead of moving multiple threads later on. And we do not actually want any threads running in the parent cgroups (cpu cpuacct cpuset). Signed-off-by: Henning Schild

[libvirt] [PATCH] make-kpkg: add support for "make olddefconfig"

2016-02-23 Thread Henning Schild
Signed-off-by: Henning Schild --- make-kpkg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make-kpkg b/make-kpkg index 5cb8ec3..ba663c9 100755 --- a/make-kpkg +++ b/make-kpkg @@ -662,9 +662,10 @@ sub main () { } if ( $config_target -

[libvirt] [PATCH 0/9] fix thread related controllers in cgroups

2016-02-23 Thread Henning Schild
This series picks up the cgroups work i started earlier. My initial patches got in and later reverted before 1.3.1. The problem the series is solving is about qemu-threads becoming runnable on pcpus outside the pinning masks configured for the machine. That only happens for a short time before

[libvirt] [PATCH] add support for "make olddefconfig"

2016-02-23 Thread Henning Schild
Signed-off-by: Henning Schild --- make-kpkg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make-kpkg b/make-kpkg index 5cb8ec3..ba663c9 100755 --- a/make-kpkg +++ b/make-kpkg @@ -662,9 +662,10 @@ sub main () { } if ( $config_target -

[libvirt] [PATCH 0/7] Fix and enhance statistics of a completed job

2016-02-23 Thread Jiri Denemark
Jiri Denemark (7): qemu: Store completed stats at the very end of migration qemu: Properly update completed migration stats qemu: Don't explicitly stop CPUs after migration qemu: Fix a race when computing migration downtime qemu: Do not report completed stats until the job finishes

[libvirt] [PATCH 2/7] qemu: Properly update completed migration stats

2016-02-23 Thread Jiri Denemark
We should not overwrite all migration statistics on the source with the numbers sent by the destination since the source may have an updated view in some cases (such as post-copy migration). It's safer to update just the timing info we need to get from the destination and be prepared for the

[libvirt] [PATCH 7/7] qemu: Add support for job completed event

2016-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 25 + src/qemu/qemu_domain.h| 2 ++ src/qemu/qemu_migration.c | 7 +-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 1/7] qemu: Store completed stats at the very end of migration

2016-02-23 Thread Jiri Denemark
Statistics for a completed migration only make sense if the migration was successful. Let's don't store them in priv->job.completed until we are sure it was a success. Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 20 1 file changed, 12

[libvirt] [PATCH 3/7] qemu: Don't explicitly stop CPUs after migration

2016-02-23 Thread Jiri Denemark
With a very old QEMU which doesn't support events we need to explicitly call qemuMigrationSetOffline at the end of migration to update our internal state. On the other hand, if we talk to QEMU using QMP, we should just wait for the STOP event and let the event handler update the state and trigger

[libvirt] [PATCH 6/7] Introduce job completed event

2016-02-23 Thread Jiri Denemark
The VIR_DOMAIN_EVENT_ID_JOB_COMPLETED event will be triggered once a job (such as migration) finishes and it will contain statistics for the job as one would get by calling virDomainGetJobStats. Thanks to this event it is now possible to get statistics of a completed migration of a transient

[libvirt] [PATCH 4/7] qemu: Fix a race when computing migration downtime

2016-02-23 Thread Jiri Denemark
Computing a total downtime during a migration requires us to store a time stamp when guest CPUs get stopped. The value (and all other statistics) is then transferred to the destination to compute the downtime. Because the stopped time stamp is stored by a STOP event handler while the statistics

[libvirt] [PATCH 5/7] qemu: Do not report completed stats until the job finishes

2016-02-23 Thread Jiri Denemark
We would happily report and free statistics of a completed migration even before it actually completed (on the source host while migration is in the Finish phase). Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1

[libvirt] [PATCH v2 1/2] conf: Add support of zero-detection for disks

2016-02-23 Thread Martin Kletzander
This option allows or disallows detection of zero-writes if it is set to "on" or "off", respectively. It can be also set to "unmap" in which case it will try discarding that part of image based on the value of the "discard" option. Signed-off-by: Martin Kletzander ---

[libvirt] [PATCH v2 0/2] Enable detection for zero writes

2016-02-23 Thread Martin Kletzander
This is a second version with few things fixed. The main difference is that now this series uses zeroes instead of zeros. The latter was chosen at first just because there were more occurences in our codebase, but the former is used now to minimise the confusion -- mainly when none of the

[libvirt] [PATCH v2 2/2] qemu: Add support for zero-detection writes

2016-02-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c| 11 + tests/qemucapabilitiesdata/caps_2.1.1-1.caps |

Re: [libvirt] [PATCH] Miscellaneous for-loop syntax clean-ups

2016-02-23 Thread Martin Kletzander
On Tue, Feb 23, 2016 at 12:52:38PM +0100, Ján Tomko wrote: On Mon, Feb 22, 2016 at 11:29:54AM +0100, Martin Kletzander wrote: Checking whether x > 0 before looping over [0..x] items doesn't make sense and multi-line body must have curly brackets around it. Please don't mix cosmetic and

Re: [libvirt] [PATCH 2/2] Introduce safewrite_str

2016-02-23 Thread Daniel P. Berrange
On Tue, Feb 23, 2016 at 01:19:38PM +, Daniel P. Berrange wrote: > On Thu, Feb 18, 2016 at 07:40:12AM -0500, John Ferlan wrote: > > > > > > On 02/12/2016 08:59 AM, Ján Tomko wrote: > > > Just like safewrite, but calls strlen first to figure out > > > the length of the string. > > > --- > > >

Re: [libvirt] [PATCH 2/2] Introduce safewrite_str

2016-02-23 Thread Daniel P. Berrange
On Thu, Feb 18, 2016 at 07:40:12AM -0500, John Ferlan wrote: > > > On 02/12/2016 08:59 AM, Ján Tomko wrote: > > Just like safewrite, but calls strlen first to figure out > > the length of the string. > > --- > > src/conf/virchrdev.c | 2 +- > > src/libvirt_private.syms | 1 + > >

Re: [libvirt] [PATCH 2/2] Introduce safewrite_str

2016-02-23 Thread Ján Tomko
On Thu, Feb 18, 2016 at 07:40:12AM -0500, John Ferlan wrote: > > > On 02/12/2016 08:59 AM, Ján Tomko wrote: > > Just like safewrite, but calls strlen first to figure out > > the length of the string. > > --- > > src/conf/virchrdev.c | 2 +- > > src/libvirt_private.syms | 1 + > >

[libvirt] libvirt-guests.sh not correctly working - patch included

2016-02-23 Thread Draget
Greetings, this mail is sent via CC to ubunutu-devel, because I am not 100% sure if the found formating issue might originate from some ubuntu issue. libvirst-guests.sh on Ubuntu Xenial would not work correctly for me. Only one of the guests would be correctly suspended while the others were

[libvirt] [python PATCH 3/4] libvirt-override: fix PyArg_ParseTuple for unsigned long long

2016-02-23 Thread Pavel Hrdina
Format string uses 'L' for long long type and 'K' for unsigned long long type. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1260356 Signed-off-by: Pavel Hrdina --- libvirt-override.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [python PATCH 1/4] libvirt-override: all flags should be defined as unsigned int

2016-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- libvirt-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override.c b/libvirt-override.c index a8c019b..0e14d7b 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -2148,7 +2148,7 @@

[libvirt] [python PATCH 2/4] libvirt-override: fix PyArg_ParseTuple for unsigned int

2016-02-23 Thread Pavel Hrdina
Format string uses 'i' for int type and 'I' for unsigned int type. Signed-off-by: Pavel Hrdina --- libvirt-override.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index 0e14d7b..d6c8c13 100644 ---

[libvirt] [python PATCH 0/4] formatting and (un)signed improvements

2016-02-23 Thread Pavel Hrdina
Pavel Hrdina (4): libvirt-override: all flags should be defined as unsigned int libvirt-override: fix PyArg_ParseTuple for unsigned int libvirt-override: fix PyArg_ParseTuple for unsigned long long libvirt-override: fix PyArg_ParseTuple for size_t libvirt-override.c | 18

[libvirt] [python PATCH 4/4] libvirt-override: fix PyArg_ParseTuple for size_t

2016-02-23 Thread Pavel Hrdina
Format string uses 'n' for Py_ssize_t but size_t is unsigned long, we need to use 'k'. Signed-off-by: Pavel Hrdina --- libvirt-override.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index e99e8ff..2308802

Re: [libvirt] [PATCH] Miscellaneous for-loop syntax clean-ups

2016-02-23 Thread Ján Tomko
On Mon, Feb 22, 2016 at 11:29:54AM +0100, Martin Kletzander wrote: > Checking whether x > 0 before looping over [0..x] items doesn't make > sense and multi-line body must have curly brackets around it. Please don't mix cosmetic and functional changes. Jan > Best viewed with '-w'. > >

Re: [libvirt] [PATCH 3/3] qemuBuildCommandLine: Change the condition for -nographics

2016-02-23 Thread Ján Tomko
On Tue, Feb 23, 2016 at 09:49:09AM +0100, Michal Privoznik wrote: > There's this check when building command line that whenever > domain has no graphics card configured we put -nographics onto > qemu command line. The check is 'if (!def->graphics)'. This > makes coverity think that def->graphics

Re: [libvirt] [PATCH 1/3] vbox: Avoid signed and unsigned comparison

2016-02-23 Thread Ján Tomko
On Tue, Feb 23, 2016 at 09:49:07AM +0100, Michal Privoznik wrote: > After 457ff97fa there are two defects in our code. In both of > them we use a signed variable to hold up a number of snapshots > that domain has. We use a helper function to count the number. > However, the helper function may

Re: [libvirt] [PATCH 2/3] xen: Check return value of virStringReplace

2016-02-23 Thread Ján Tomko
On Tue, Feb 23, 2016 at 09:49:08AM +0100, Michal Privoznik wrote: > After 6604a3dd9f8 in which new helper function has been > introduced, the code calls virStringReplace and dereference the > result immediately. The string function can, however, return NULL > so this would SIGSEGV right away.

Re: [libvirt] [PATCH] docs: Try harder to uninstall

2016-02-23 Thread Ján Tomko
On Wed, Feb 17, 2016 at 10:58:29AM +0100, Michal Privoznik wrote: > Imagine you have partially installed libvirt, or maybe you're > just running 'make uninstall' from a different version than 'make > install' has been ran. One way or another, we are doing plain > 'rm' instead of 'rm -f' and thus

[libvirt] [PATCH] tests: Fix typo oaque -> opaque

2016-02-23 Thread Andrea Bolognani
No functional changes. --- Pushed under the trivial rule. tests/virhostdevtest.c | 16 tests/virpcitest.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 1b30681..cadb66a 100644 ---

Re: [libvirt] [PATCH 3/3] qemu: introduce vram64 attribute for QXL video device

2016-02-23 Thread Pavel Hrdina
On Tue, Feb 23, 2016 at 08:55:29AM +0100, Martin Kletzander wrote: > On Mon, Feb 22, 2016 at 07:26:42PM +0100, Pavel Hrdina wrote: > >On Mon, Feb 22, 2016 at 04:16:49PM +0100, Martin Kletzander wrote: > >> On Mon, Feb 22, 2016 at 02:34:14PM +0100, Pavel Hrdina wrote: > >> >This attribute is used

[libvirt] [PATCH 0/3] Couple of coverity fixes

2016-02-23 Thread Michal Privoznik
All of these were spotted by coverity tool. Michal Privoznik (3): vbox: Avoid signed and unsigned comparison xen: Check return value of virStringReplace qemuBuildCommandLine: Change the condition for -nographics src/qemu/qemu_command.c | 2 +- src/vbox/vbox_common.c | 8 +++-

[libvirt] [PATCH 2/3] xen: Check return value of virStringReplace

2016-02-23 Thread Michal Privoznik
After 6604a3dd9f8 in which new helper function has been introduced, the code calls virStringReplace and dereference the result immediately. The string function can, however, return NULL so this would SIGSEGV right away. Check for the return value of the string function. Signed-off-by: Michal

[libvirt] [PATCH 1/3] vbox: Avoid signed and unsigned comparison

2016-02-23 Thread Michal Privoznik
After 457ff97fa there are two defects in our code. In both of them we use a signed variable to hold up a number of snapshots that domain has. We use a helper function to count the number. However, the helper function may fail in which case it returns a negative one and control jumps to cleanup

[libvirt] [PATCH 3/3] qemuBuildCommandLine: Change the condition for -nographics

2016-02-23 Thread Michal Privoznik
There's this check when building command line that whenever domain has no graphics card configured we put -nographics onto qemu command line. The check is 'if (!def->graphics)'. This makes coverity think that def->graphics can be NULL, which is true. But later in the code every access to

[libvirt] [PATCH V2] libxl: support assignment from a pool of SRIOV VFs

2016-02-23 Thread Chunyan Liu
Add codes to support creating domain with network defition of assigning SRIOV VF from a pool. And fix hot plug and unplug SRIOV VF under this kind of network defition. Signed-off-by: Chunyan Liu --- Changes: * move bug fix to another patch * use virDomainNetGetActualType instead

[libvirt] [PATCH] libxl: small fix in parsing network

2016-02-23 Thread Chunyan Liu
Signed-off-by: Chunyan Liu --- src/libxl/libxl_conf.c | 2 +- src/libxl/libxl_domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 5133299..48b8826 100644 --- a/src/libxl/libxl_conf.c +++