[libvirt] [PATCH] virpcimock: Fix memory leak in pci_driver_new

2017-07-12 Thread ZhiPeng Lu
@driverpath, allocated by virAsprintfQuiet, was not freed and leaked. Signed-off-by: Zhipeng Lu --- tests/virpcimock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index e9408aa..dec9e01 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -4

Re: [libvirt] [PATCH] qemu: hotplug virtio_scsi over lsilogic when sicsi controller is not present

2017-07-12 Thread Peter Krempa
On Wed, Jul 12, 2017 at 23:13:58 -0400, Liang Yan wrote: > > > On 7/12/17 2:49 AM, Peter Krempa wrote: > > On Tue, Jul 11, 2017 at 21:33:49 -0600, Liang Yan wrote: > >> It may be better to check virtio-scsi controller first since it is > >> supported better in qemu level. > > This is not true for

Re: [libvirt] [PATCH] qemu: hotplug virtio_scsi over lsilogic when sicsi controller is not present

2017-07-12 Thread Liang Yan
On 7/12/17 2:49 AM, Peter Krempa wrote: > On Tue, Jul 11, 2017 at 21:33:49 -0600, Liang Yan wrote: >> It may be better to check virtio-scsi controller first since it is >> supported better in qemu level. > This is not true for OS support. The old controller usually has drivers > shipped with the

Re: [libvirt] [PATCH v4 2/3] conf: Introduce TLS options for VxHS block device clients

2017-07-12 Thread ashish mittal
On Fri, Jun 30, 2017 at 1:29 PM, John Ferlan wrote: > > > On 06/29/2017 10:02 PM, Ashish Mittal wrote: >> From: Ashish Mittal >> >> Add a new TLS X.509 certificate type - "vxhs". This will handle the >> creation of a TLS certificate capability for properly configured >> VxHS network block device

Re: [libvirt] Trouble with /var/lib/libvirt/qemu/save mount

2017-07-12 Thread Orion Poplawski
On 07/12/2017 10:14 AM, Daniel P. Berrange wrote: > On Wed, Jul 12, 2017 at 10:11:34AM -0600, Orion Poplawski wrote: >> I'm trying to get libvirt-guests ON_SHUTDOWN=suspend to work on EL7 with a >> separate mount point for /var/lib/libvirt/qemu/save. It appears that during >> host shutdown that /v

Re: [libvirt] Trouble with /var/lib/libvirt/qemu/save mount

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 10:11:34AM -0600, Orion Poplawski wrote: > I'm trying to get libvirt-guests ON_SHUTDOWN=suspend to work on EL7 with a > separate mount point for /var/lib/libvirt/qemu/save. It appears that during > host shutdown that /var/lib/libvirt/qemu/save gets unmounted before > libvir

[libvirt] Trouble with /var/lib/libvirt/qemu/save mount

2017-07-12 Thread Orion Poplawski
I'm trying to get libvirt-guests ON_SHUTDOWN=suspend to work on EL7 with a separate mount point for /var/lib/libvirt/qemu/save. It appears that during host shutdown that /var/lib/libvirt/qemu/save gets unmounted before libvirt-guests gets run, resulting in the save images running out of space on m

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > > This rever

[libvirt] [PATCH] Rewrite the way mockable functions are handled.

2017-07-12 Thread Daniel P. Berrange
Currently any mockable functions are marked with attributes noinline, noclone and weak. This prevents the compiler from optimizing away the impl of these functions. It has an unfortunate side effect with the libtool convenience libraries, if executables directly link to them. For example virlockd,

[libvirt] [PATCH] qemu: shared disks with cache=directsync should be safe for migration

2017-07-12 Thread Peng Hao
From: Hao Peng At present shared disks can be migrated with either readonly or cache=none. But cache=directsync should be safe for migration, because both cache=directsync and cache=none don't use the host page cache, and cache=direct write through qemu block layer cache. Signed-off-by: Peng H

Re: [libvirt] Xen device section defaults miss name='qemu'

2017-07-12 Thread Christian Ehrhardt
​Not sure how stupid it might be so clearly just a very humble RFC, but the following seems to work for me: Therefore no nicely polished patch, but just inline diff --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -367,8 +367,9 @@ int actual_type = virStorageSourceGetActua

Re: [libvirt] [Qemu-devel] change x86 default machine type to Q35?

2017-07-12 Thread Eduardo Habkost
On Wed, Jul 12, 2017 at 09:39:39AM +0300, Marcel Apfelbaum wrote: > On 11/07/2017 17:47, Paolo Bonzini wrote: > > On 11/07/2017 16:42, Kevin Wolf wrote: > > > > > Concerning QEMU, could we maybe simply emit a warning a la > > > > > > > > > > "you did not specify a machine type with the -M opti

Re: [libvirt] [PATCH 7/7] qemu: Update host-model CPUs on reconnect

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:53PM +0200, Jiri Denemark wrote: > When libvirt starts a new QEMU domain, it replaces host-model CPUs with > the appropriate custom CPU definition. However, when reconnecting to a > domain started by older libvirt (< 2.3), the domain would still have a > host-model CPU

Re: [libvirt] [PATCH] news: qemu platform serial devices now use -chardev

2017-07-12 Thread Cole Robinson
On 07/11/2017 02:45 AM, Andrea Bolognani wrote: > On Mon, 2017-07-10 at 17:38 -0400, Cole Robinson wrote: >> Signed-off-by: Cole Robinson >> --- >> docs/news.xml | 11 +++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/docs/news.xml b/docs/news.xml >> index f44d676c1..10faad67

Re: [libvirt] [PATCH] qemu: process: Remove unused qemuCaps

2017-07-12 Thread Cole Robinson
On 07/11/2017 02:37 AM, Andrea Bolognani wrote: > On Mon, 2017-07-10 at 17:37 -0400, Cole Robinson wrote: >> After 405c0f07f5 > > The commit that changed qemuProcessLookupPTYs() is actually > 426dc5eb28bade109bf27bdd10d7305a040b4a3e, isn't it? > >> qemuCaps is unused here, remove it from the call

[libvirt] [PATCH 4/5] qemu: process: Extract gathering of 'numad' placement into a function

2017-07-12 Thread Peter Krempa
Remove the code from qemuProcessPrepareDomain so that it won't get even more bloated. --- src/qemu/qemu_process.c | 61 - 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e6522a29

[libvirt] [PATCH 1/5] util: bitmap: Modify virBitmapSubtract to virBitmapIntersect

2017-07-12 Thread Peter Krempa
Since virBitmapSubtract is unused modify it to perform bitmap intersection. --- src/libvirt_private.syms | 2 +- src/util/virbitmap.c | 14 +++--- src/util/virbitmap.h | 2 +- tests/virbitmaptest.c| 14 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff -

[libvirt] [PATCH 2/5] qemu: domain: Extract parsing and formatting of priv->autoNodeset

2017-07-12 Thread Peter Krempa
Move the code to separate functions to avoid complicating the existing ones with changes. --- src/qemu/qemu_domain.c | 84 +++--- 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 6772f1

[libvirt] [PATCH 5/5] qemu: process: Don't put memoryless NUMA nodes into autoNodeset

2017-07-12 Thread Peter Krempa
'numad' may return a nodeset which contains NUMA nodes without memory for certain configurations. Since cgroups code will not be happy using nodes without memory we need to store only numa nodes with memory in autoNodeset. On the other hand autoCpuset should contain cpus also for nodes which do no

[libvirt] [PATCH 0/5] qemu: process: Don't try to use NUMA nodes without memory from numad advice

2017-07-12 Thread Peter Krempa
Cgroups code fails if it's instructed to bind memory usage of a qemu process to a NUMA node which does not have any memory. First four patches are preliminary cleanups and the fix to keep the autoCpuset private data entry in the status XML necessary to modify autoNodeset in the future. The last p

[libvirt] [PATCH 3/5] qemu: domain: Store and restore autoCpuset to status XML

2017-07-12 Thread Peter Krempa
Decouple them by storing them in the XML separately rather than regenerating them. This will simplify upcoming fixes. --- src/qemu/qemu_domain.c | 32 +--- tests/qemuxml2xmltest.c | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_do

Re: [libvirt] [PATCH 6/7] qemu: Move qemuProcessReconnect to the end of qemu_process.c

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:52PM +0200, Jiri Denemark wrote: > qemuProcessReconnect will need to call additional functions which were > originally defined further in qemu_process.c. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 645 > --

[libvirt] [PATCH go-xml] Add support for DNS in network

2017-07-12 Thread Thomas Hipp
Add support for DNS in network, and add test code. Signed-off-by: Thomas Hipp --- network.go | 39 ++ network_test.go | 65 - 2 files changed, 99 insertions(+), 5 deletions(-) diff --git a/network.go b/

Re: [libvirt] [PATCH 5/7] qemu: Export virQEMUCapsGuestIsNative

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:51PM +0200, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_capabilities.c | 2 +- > src/qemu/qemu_capabilities.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Pavel Hrdina signature.asc Description: Digital sig

Re: [libvirt] [PATCH 4/7] qemu: Add qemuProcessUpdateLiveGuestCPU

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:50PM +0200, Jiri Denemark wrote: > Separated from qemuProcessUpdateAndVerifyCPU to handle updating of an > active guest CPU definition according to live data from QEMU. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 70 >

Re: [libvirt] [PATCH 3/7] qemu: Rename qemuProcessUpdateLiveGuestCPU

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:49PM +0200, Jiri Denemark wrote: > In addition to updating a guest CPU definition the function verifies > that all required features are provided to the guest. Let's make it > obvious by calling it qemuProcessUpdateAndVerifyCPU. > > Signed-off-by: Jiri Denemark > ---

Re: [libvirt] [PATCH 2/7] qemu: Add qemuProcessVerifyCPU

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:48PM +0200, Jiri Denemark wrote: > Separated from qemuProcessUpdateLiveGuestCPU. The function makes sure > a guest CPU provides all features required by a domain definition. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_process.c | 35 ++

Re: [libvirt] [PATCH 1/7] qemu: Add qemuProcessFetchGuestCPU

2017-07-12 Thread Pavel Hrdina
On Wed, Jul 12, 2017 at 02:56:47PM +0200, Jiri Denemark wrote: > Separated from qemuProcessUpdateLiveGuestCPU. Its purpose is to fetch > guest CPU data from a running QEMU process. The data can later be used > to verify and update the active guest CPU definition. > > Signed-off-by: Jiri Denemark

[libvirt] [PATCH 6/7] qemu: Move qemuProcessReconnect to the end of qemu_process.c

2017-07-12 Thread Jiri Denemark
qemuProcessReconnect will need to call additional functions which were originally defined further in qemu_process.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 645 1 file changed, 323 insertions(+), 322 deletions(-) diff --git a/

[libvirt] [PATCH 5/7] qemu: Export virQEMUCapsGuestIsNative

2017-07-12 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index db9f9b8b1..7cce4b18d 100644 --- a/src/qemu/qemu_capabilities.

[libvirt] [PATCH 7/7] qemu: Update host-model CPUs on reconnect

2017-07-12 Thread Jiri Denemark
When libvirt starts a new QEMU domain, it replaces host-model CPUs with the appropriate custom CPU definition. However, when reconnecting to a domain started by older libvirt (< 2.3), the domain would still have a host-model CPU in its active definition. https://bugzilla.redhat.com/show_bug.cgi?id

[libvirt] [PATCH 0/7] qemu: Update host-model CPUs on reconnect

2017-07-12 Thread Jiri Denemark
This series fixes migration of a domain with a host-model CPU started by an old libvirt (< 2.3). https://bugzilla.redhat.com/show_bug.cgi?id=1463957 Jiri Denemark (7): qemu: Add qemuProcessFetchGuestCPU qemu: Add qemuProcessVerifyCPU qemu: Rename qemuProcessUpdateLiveGuestCPU qemu: Add qe

[libvirt] [PATCH 3/7] qemu: Rename qemuProcessUpdateLiveGuestCPU

2017-07-12 Thread Jiri Denemark
In addition to updating a guest CPU definition the function verifies that all required features are provided to the guest. Let's make it obvious by calling it qemuProcessUpdateAndVerifyCPU. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[libvirt] [PATCH 1/7] qemu: Add qemuProcessFetchGuestCPU

2017-07-12 Thread Jiri Denemark
Separated from qemuProcessUpdateLiveGuestCPU. Its purpose is to fetch guest CPU data from a running QEMU process. The data can later be used to verify and update the active guest CPU definition. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 58 +--

[libvirt] [PATCH 2/7] qemu: Add qemuProcessVerifyCPU

2017-07-12 Thread Jiri Denemark
Separated from qemuProcessUpdateLiveGuestCPU. The function makes sure a guest CPU provides all features required by a domain definition. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git

[libvirt] [PATCH 4/7] qemu: Add qemuProcessUpdateLiveGuestCPU

2017-07-12 Thread Jiri Denemark
Separated from qemuProcessUpdateAndVerifyCPU to handle updating of an active guest CPU definition according to live data from QEMU. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 70 + 1 file changed, 42 insertions(+), 28 deletions(-)

Re: [libvirt] [PATCH] Avoid hidden cgroup mount points

2017-07-12 Thread Juan Antonio Hernandez Fernandez
On Tue, Jul 11, 2017 at 9:25 AM, Martin Kletzander wrote: > On Thu, Jul 06, 2017 at 05:03:31PM +0200, Juan Hernandez wrote: > >> Currently the scan of the /proc/mounts file used to find cgroup mount >> points doesn't take into account that mount points may hidden by other >> mount points. For, ex

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-12 Thread Greg Kurz
On Wed, 12 Jul 2017 12:55:34 +0200 Andrea Bolognani wrote: > [libvir-list added to the loop] > > On Tue, 2017-07-04 at 10:47 +0200, Greg Kurz wrote: > > On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson > > wrote: > > > On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: > > > >  > > >

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:56:47PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: > > On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > > > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > > > This rever

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 01:49:04PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are m

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-12 Thread Shivaprasad G Bhat
On 07/12/2017 04:25 PM, Andrea Bolognani wrote: [libvir-list added to the loop] On Tue, 2017-07-04 at 10:47 +0200, Greg Kurz wrote: On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson wrote: On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: The sPAPR machine always create a default

Re: [libvirt] [PATCH RESEND] qemu: Remove inactive vm when failed tostart it

2017-07-12 Thread wang.yi59
Hi John, Thanks for your review! > This seems to be a strange sequence of operations, but the claim is that > by adding this logic to CreateWithFlags, then the problem you're facing > is resolved. However, is adding this to the Create logic the right thing > to do? > IIUC: This condition is

[libvirt] [PATCH go-xml] Add support for NAT in network forward

2017-07-12 Thread Thomas Hipp
Add support for NAT in network forward, and add test code. Signed-off-by: Thomas Hipp --- network.go | 20 ++-- network_test.go | 31 +-- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/network.go b/network.go index cc850a1..3635ad

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
On Wed, Jul 12, 2017 at 01:10:08PM +0200, Martin Kletzander wrote: > On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: > > This reverts commit e4b980c853d2114b25fa805a84ea288384416221. > > > > When a binary links against a .a archive (as opposed to a shared library), > > any symb

Re: [libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Martin Kletzander
On Wed, Jul 12, 2017 at 11:14:16AM +0100, Daniel P. Berrange wrote: This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are marked as 'weak' get silently dropped. As a result when the binary la

Re: [libvirt] [PATCH] spapr: make default PHB optionnal

2017-07-12 Thread Andrea Bolognani
[libvir-list added to the loop] On Tue, 2017-07-04 at 10:47 +0200, Greg Kurz wrote: > On Tue, 4 Jul 2017 17:29:01 +1000 David Gibson > wrote: > > On Mon, Jul 03, 2017 at 06:48:25PM +0200, Greg Kurz wrote: > > >  > > > The sPAPR machine always create a default PHB during initialization, even > >

[libvirt] [PATCH 2/2] Revert "Prevent more compiler optimization of mockable functions"

2017-07-12 Thread Daniel P. Berrange
This reverts commit e4b980c853d2114b25fa805a84ea288384416221. When a binary links against a .a archive (as opposed to a shared library), any symbols which are marked as 'weak' get silently dropped. As a result when the binary later runs, those 'weak' functions have an address of 0x0 and thus crash

[libvirt] [PATCH 0/2] Revert use of weak symbols

2017-07-12 Thread Daniel P. Berrange
This series reverts the use of the __weak__ attribute which we did to fix the test suite with CLang. It cause unintended problems elsewhere which are not practical to fix. See the second patch for details. Daniel P. Berrange (2): Revert "internal: don't use weak symbols for Win32 platform" Rev

[libvirt] [PATCH 1/2] Revert "internal: don't use weak symbols for Win32 platform"

2017-07-12 Thread Daniel P. Berrange
This reverts commit b9473d8b11d79c8990dcbba13bbf7d4051288a1e. --- src/internal.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/internal.h b/src/internal.h index edc3587..00edd4f 100644 --- a/src/internal.h +++ b/src/internal.h @@ -128,14 +128,10 @@ * */ #

Re: [libvirt] [PATCH v2 5/5] Prevent more compiler optimization of mockable functions

2017-07-12 Thread Daniel P. Berrange
On Tue, Jul 11, 2017 at 11:54:21PM +, Marc-André Lureau wrote: > Hi > > On Mon, Jul 10, 2017 at 1:14 PM Peter Krempa wrote: > > > On Wed, Jul 05, 2017 at 12:58:51 +0100, Daniel Berrange wrote: > > > Currently all mockable functions are annotated with the 'noinline' > > > attribute. This is i

Re: [libvirt] [Qemu-devel] change x86 default machine type to Q35?

2017-07-12 Thread Kevin Wolf
Am 12.07.2017 um 07:51 hat Gerd Hoffmann geschrieben: > > > I think simply not having a default > > > machine type (as already suggested elsewhere in this thread) is the > > > best way to deal with this. > > > > I would absolutely hate this. One of the nice things about qemu has > > always been th

Re: [libvirt] [PATCH 07/19] storage: Use consistent variable names in virstorageobj

2017-07-12 Thread Pavel Hrdina
On Tue, May 09, 2017 at 11:30:14AM -0400, John Ferlan wrote: > A virStoragePoolObjPtr will be an 'obj'. > > A virStoragePoolPtr will be a 'pool'. There is no such change in this commit. > > NB: Also modify the @matchpool to @matchobj. > Signed-off-by: John Ferlan > --- > src/conf/virstorageob

[libvirt] [PATCH] qemuDomainGetPreservedMountPath: rename @mount

2017-07-12 Thread Michal Privoznik
Obviously, old gcc-s ale sad when a variable shares the name with a function. And we do have such variable (added in 4d8a914be0): @mount. Rename it to @mountpoint so that compiler's happy again. Signed-off-by: Michal Privoznik --- Pushed under build-breaker and trivial rules. src/qemu/qemu_dom