Re: [libvirt] [RFC 0/2] Fix detection of slow guest shutdown

2018-08-05 Thread Christian Ehrhardt
On Fri, Aug 3, 2018 at 6:39 PM Alex Williamson wrote: > On Fri, 3 Aug 2018 08:29:39 +0200 > Christian Ehrhardt wrote: > > > Hi, > > I was recently looking into a case which essentially looked like this: > > 1. virsh shutdown guest > > 2. after <1 second the qemu process was gone from

Re: [libvirt] [PATCH] qemu: ensure "pc" machine is always used as default if available

2018-08-05 Thread Christian Ehrhardt
On Sun, Aug 5, 2018 at 10:53 AM Daniel P. Berrangé wrote: > It is increasingly likely that some distro is going to change the > default "x86" machine type in QEMU from "pc" to "q35". This will > certainly break existing applications which write their XML on the > assumption that its using a "pc"

[libvirt] [PATCH 3/3] libxl: initialize domain state with real data

2018-08-05 Thread Marek Marczykowski-Górecki
When libvirtd is started, initialize domain objects state with its real state, not only RUNNING/SHUTOFF. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_driver.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c

[libvirt] [PATCH 0/3] libxl: implement virDomainPM* functions

2018-08-05 Thread Marek Marczykowski-Górecki
Needed libxl_domain_suspend_only is supported in Xen >= 4.11. But wakeup should work with older versions. Marek Marczykowski-Górecki (3): libxl: send lifecycle event on suspend libxl: implement virDomainPM* functions libxl: initialize domain state with real data src/libxl/libxl_domain.c |

[libvirt] [PATCH 2/3] libxl: implement virDomainPM* functions

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_driver.c | 126 - 1 file changed, 126 insertions(+) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 5a5e792..10c7aab 100644 --- a/src/libxl/libxl_driver.c +++

[libvirt] [PATCH 1/3] libxl: send lifecycle event on suspend

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_domain.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 2ab78ac..b800bc9 100644 --- a/src/libxl/libxl_domain.c +++

[libvirt] [PATCH] Fix libvirt-driver-libxl check

2018-08-05 Thread Marek Marczykowski-Górecki
Fix saving CFLAGS in LIBVIRT_DRIVER_CHECK_LIBXL - LIBVIRT_CHECK_LIB will override old_CFLAGS, so use a different name. Signed-off-by: Marek Marczykowski-Górecki --- m4/virt-driver-libxl.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/virt-driver-libxl.m4

[libvirt] [PATCH 00/10] libxl: PVHv2 support

2018-08-05 Thread Marek Marczykowski-Górecki
This is a respin of my old PVHv1 patch[1], converted to PVHv2. Should the code use "PVH" name (as libxl does internally), or "PVHv2" as in many places in Xen documentation? I've chosen the former, but want to confirm it. Also, not sure about VIR_DOMAIN_OSTYPE_XENPVH (as discussed on PVHv1 patch)

[libvirt] [PATCH 08/10] tests: add basic Xen PVH test

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- tests/libxlxml2domconfigdata/basic-pvh.json | 49 ++- tests/libxlxml2domconfigdata/basic-pvh.xml | 28 +- tests/libxlxml2domconfigtest.c | 1 +- 3 files changed, 78 insertions(+) create mode 100644

[libvirt] [PATCH 09/10] xenconfig: add support for parsing type= xl config entry

2018-08-05 Thread Marek Marczykowski-Górecki
builder="hvm" is deprecated since Xen 4.10, new syntax is type="hvm" (or type="pv", which is default). Since the old one is still supported, still use it when writing native config, so the config will work on older Xen too (and will also not complicate tests). Signed-off-by: Marek

[libvirt] [PATCH 10/10] xenconfig: add support for type="pvh"

2018-08-05 Thread Marek Marczykowski-Górecki
Handle PVH domain type in both directions (xen-xl->xml, xml->xen-xl). And add a test for it. Signed-off-by: Marek Marczykowski-Górecki --- Does domain_conf.c (virDomainDefFormatInternal) still need to silently convert VIR_DOMAIN_OSTYPE_XEN to VIR_DOMAIN_OSTYPE_LINUX? In case of PVH,

[libvirt] [PATCH 07/10] libxl: add support for PVH

2018-08-05 Thread Marek Marczykowski-Górecki
Since this is something between PV and HVM, it makes sense to put the setting in place where domain type is specified. To enable it, use It is also included in capabilities.xml, for every supported HVM guest type - it doesn't seems to be any other requirement (besides new enough Xen).

[libvirt] [PATCH 02/10] docs: add documentation of arch element of capabilities.xml

2018-08-05 Thread Marek Marczykowski-Górecki
Specifically, list sub-elements and where they can be used. In addition, describe supported machine types for Xen. Signed-off-by: Marek Marczykowski-Górecki --- docs/formatcaps.html.in | 20 +++- docs/formatdomain.html.in | 8 2 files changed, 23 insertions(+), 5

[libvirt] [PATCH 04/10] libxl: set shadow memory for any guest type, not only HVM

2018-08-05 Thread Marek Marczykowski-Górecki
Otherwise starting PVH guest will result in "arch_setup_bootlate: mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error". After this change the behavior is the same as in `xl`. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c| 10

[libvirt] [PATCH 05/10] libxl: prefer new location of nested_hvm in libxl_domain_build_info

2018-08-05 Thread Marek Marczykowski-Górecki
If available, use b_info->nested_hvm instead of b_info->u.hvm.nested_hvm. This will make nested HVM config available also for PVH domains. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c | 13 -

[libvirt] [PATCH 01/10] docs: don't refer to deprecated 'linux' ostype in example

2018-08-05 Thread Marek Marczykowski-Górecki
Use preferred name: 'xen'. Signed-off-by: Marek Marczykowski-Górecki --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 19b7312..8043c7c 100644 --- a/docs/formatdomain.html.in +++

[libvirt] [PATCH 06/10] libxl: reorder libxlMakeDomBuildInfo for upcoming PVH support

2018-08-05 Thread Marek Marczykowski-Górecki
Make it easier to share HVM and PVH code where relevant. No functional change. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c

[libvirt] [PATCH 03/10] docs: update domain schema for machine attribute

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- docs/schemas/domaincommon.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ac04af5..eded1ca 100644 --- a/docs/schemas/domaincommon.rng +++

[libvirt] [PATCH] bhyve: fix process reconnect

2018-08-05 Thread Roman Bogorodskiy
To reconnect to the bhyve process after deamon restart, a process VM's pid points to is checked to have proctitle equal to 'bhyve: $vmname'. However, there could be a bug in bhyve(8) which prevents it from setting proctitle, so process arguments will look like: ['/usr/sbin/bhyve', ..., 'vmname',

Re: [libvirt] [PATCH v1 17/32] util: netdevopenvswitch: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-05 Thread Sukrit Bhatnagar
On Fri, 3 Aug 2018 at 19:02, Erik Skultety wrote: > > On Sat, Jul 28, 2018 at 11:31:32PM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOFREE macro for declaring scalar variables, majority > > of the VIR_FREE calls can be dropped, which in

Re: [libvirt] [RFC 0/2] Fix detection of slow guest shutdown

2018-08-05 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: 20180803062941.31641-1-christian.ehrha...@canonical.com Subject: [libvirt] [RFC 0/2] Fix detection of slow guest shutdown === TEST SCRIPT BEGIN ===

Re: [libvirt] [PATCH v3 0/4] iscsi-direct: first part

2018-08-05 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: 20180731084423.8607-1-c...@lse.epita.fr Subject: [libvirt] [PATCH v3 0/4] iscsi-direct: first part === TEST SCRIPT BEGIN === #!/bin/bash # Testing script

Re: [libvirt] [PATCH] qemu: ensure "pc" machine is always used as default if available

2018-08-05 Thread Eduardo Habkost
On Fri, Aug 03, 2018 at 01:59:47PM +0100, Daniel P. Berrangé wrote: > It is increasingly likely that some distro is going to change the > default "x86" machine type in QEMU from "pc" to "q35". This will > certainly break existing applications which write their XML on the > assumption that its

Re: [libvirt] [RFC 0/2] Fix detection of slow guest shutdown

2018-08-05 Thread Alex Williamson
On Fri, 3 Aug 2018 08:29:39 +0200 Christian Ehrhardt wrote: > Hi, > I was recently looking into a case which essentially looked like this: > 1. virsh shutdown guest > 2. after <1 second the qemu process was gone from /proc/ > 3. but libvirt spun in virProcessKillPainfully because the

Re: [libvirt] [PATCH v1 21/32] util: netdevveth: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:36PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

[libvirt] [PATCH] conf: rewrite filtering for capabilities lookup

2018-08-05 Thread Daniel P . Berrangé
The virCapabilitiesDomainDataLookupInternal() is given a list of parameters representing the desired domain characteristics. It then has to look throught the capabilities to identify an acceptable match. The virCapsDomainDataCompare() method is used for filtering out candidates which don't match

Re: [libvirt] [PATCH 3/3] conf: rename Match functions

2018-08-05 Thread Andrea Bolognani
On Mon, 2018-07-30 at 10:07 -0400, Anya Harter wrote: [...] > static bool > -virNetworkMatch(virNetworkObjPtr obj, > +virNetworkObjMatch(virNetworkObjPtr obj, > unsigned int flags) There are so many inconsistencies like this one in libvirt... Feel free to fix as many as you'd

Re: [libvirt] [PATCH v1 13/32] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Sukrit Bhatnagar
On Fri, 3 Aug 2018 at 18:58, Erik Skultety wrote: > > On Fri, Aug 03, 2018 at 06:46:28PM +0530, Sukrit Bhatnagar wrote: > > On Fri, 3 Aug 2018 at 18:41, Erik Skultety wrote: > > > > > > On Fri, Aug 03, 2018 at 06:38:30PM +0530, Sukrit Bhatnagar wrote: > > > > On Fri, 3 Aug 2018 at 18:32, Erik

Re: [libvirt] [PATCH v1 20/32] util: netdevveth: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:35PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOFREE macro for declaring scalar variables, majority > of the VIR_FREE calls can be dropped, which in turn leads to > getting rid of most of our cleanup sections.

Re: [libvirt] [PATCH v1 13/32] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Erik Skultety
On Fri, Aug 03, 2018 at 06:46:28PM +0530, Sukrit Bhatnagar wrote: > On Fri, 3 Aug 2018 at 18:41, Erik Skultety wrote: > > > > On Fri, Aug 03, 2018 at 06:38:30PM +0530, Sukrit Bhatnagar wrote: > > > On Fri, 3 Aug 2018 at 18:32, Erik Skultety wrote: > > > > > > > > On Sat, Jul 28, 2018 at

Re: [libvirt] [PATCH v1 13/32] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Sukrit Bhatnagar
On Fri, 3 Aug 2018 at 18:32, Erik Skultety wrote: > > On Sat, Jul 28, 2018 at 11:31:28PM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOPTR macro for declaring aggregate pointer variables, > > majority of the calls to *Free functions can

Re: [libvirt] [PATCH v1 13/32] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:28PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

Re: [libvirt] [PATCH v1 04/32] util: macaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-05 Thread Andrea Bolognani
On Fri, 2018-08-03 at 09:51 +0200, Erik Skultety wrote: > > > > +void > > > > +virMacAddrFree(virMacAddrPtr addr) > > > > +{ > > > > +VIR_FREE(addr); > > > > +} > > > > > > I understand the reason behind this change, however, I don't feel like > > > this > > > will bring any benefits only

Re: [libvirt] [PATCH v1 13/32] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-05 Thread Sukrit Bhatnagar
On Fri, 3 Aug 2018 at 18:41, Erik Skultety wrote: > > On Fri, Aug 03, 2018 at 06:38:30PM +0530, Sukrit Bhatnagar wrote: > > On Fri, 3 Aug 2018 at 18:32, Erik Skultety wrote: > > > > > > On Sat, Jul 28, 2018 at 11:31:28PM +0530, Sukrit Bhatnagar wrote: > > > > By making use of GNU C's cleanup

Re: [libvirt] [PATCH v1 04/32] util: macaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-05 Thread Erik Skultety
On Fri, Aug 03, 2018 at 09:34:51AM +0200, Erik Skultety wrote: > On Fri, Aug 03, 2018 at 09:30:22AM +0200, Erik Skultety wrote: > > On Sat, Jul 28, 2018 at 11:31:19PM +0530, Sukrit Bhatnagar wrote: > > > Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in > > > src/util/viralloc.h, define a new

[libvirt] [PATCH] qemu: ensure "pc" machine is always used as default if available

2018-08-05 Thread Daniel P . Berrangé
It is increasingly likely that some distro is going to change the default "x86" machine type in QEMU from "pc" to "q35". This will certainly break existing applications which write their XML on the assumption that its using a "pc" machine by default. For example they'll lack a IDE CDROM and get

Re: [libvirt] Matching the type of mediated devices in the migration

2018-08-05 Thread Wang, Zhi A
Hi: Thanks for unfolding your idea. The picture is clearer to me now. I didn't realize that you also want to support cross hardware migration. Well, I thought for a while, the cross hardware migration might be not popular in vGPU case but could be quite popular in other mdev cases. Let me

Re: [libvirt] [PATCH v1 12/32] util: netdevip: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:27PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOFREE macro for declaring scalar variables, majority > of the VIR_FREE calls can be dropped, which in turn leads to > getting rid of most of our cleanup sections.

Re: [libvirt] [PATCH v1 04/32] util: macaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:19PM +0530, Sukrit Bhatnagar wrote: > Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in > src/util/viralloc.h, define a new wrapper around an existing > cleanup function which will be called when a variable declared > with VIR_AUTOPTR macro goes out of scope.

[libvirt] [RFC 2/2] process: accept the lack of /proc/ as valid process removal

2018-08-05 Thread Christian Ehrhardt
There were cases where the process was gone (no /proc/ entry anymore), but kill with signal=0 still was able to reach the process. This can happen if the kernel still cleans up resources. In most common cases of this there would be a /proc/ entry left with the process in Zombie state until

[libvirt] [PATCH 4/5] phyp: Drop check for auth and auth->cb

2018-08-05 Thread Marcos Paulo de Souza
Since they are done inside virAuthGetPassword and virAuthGetUsername when needed. Signed-off-by: Marcos Paulo de Souza --- src/phyp/phyp_driver.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index d78de83231..5b17508dae 100644

[libvirt] [PATCH 0/5] Unify check for auth and auth->cb

2018-08-05 Thread Marcos Paulo de Souza
Hi guys, in some drivers, auth and auth->cb are checked in connectOpen function, while in xenapi, only auth is checked, which that could lead to a problem if cb if invalid. In phyp, auth and auth->cb are checked twice, in getUser and getPassword. So, this patchset adds the check for auth and

[libvirt] [PATCH 3/5] hyperv: Drop check for auth and auth->cb

2018-08-05 Thread Marcos Paulo de Souza
Since they are done inside virAuthGetPassword and virAuthGetUsername when needed. Signed-off-by: Marcos Paulo de Souza --- src/hyperv/hyperv_driver.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 6bc4c099e2..7ca145aef5

Re: [libvirt] [PATCH v2 0/2] ESX: Fixing SetAutoStart

2018-08-05 Thread Matthias Bolte
2018-08-02 18:16 GMT+02:00 John Ferlan : > > > On 08/02/2018 12:11 PM, Marcos Paulo de Souza wrote: >> On Thu, Aug 02, 2018 at 05:37:46PM +0200, Matthias Bolte wrote: >>> 2018-08-02 16:45 GMT+02:00 John Ferlan : On 08/02/2018 10:07 AM, Matthias Bolte wrote: > 2018-08-02 15:20

[libvirt] [PATCH] tests: Unify data structure for vircaps2xmltest

2018-08-05 Thread Andrea Bolognani
If all we achieve is reducing the depth by one for a single test case, the additional complexity (not to mention breaking the principle of least surprise) is not worth it: let's use simpler, more predictable code instead. This basically reverts fec6e4c48c9c (with a few adjustments).

Re: [libvirt] [PATCH v1 03/32] util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-05 Thread Sukrit Bhatnagar
On Thu, 2 Aug 2018 at 19:33, Erik Skultety wrote: > > On Sat, Jul 28, 2018 at 11:31:18PM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOFREE macro for declaring scalar variables, majority > > of the VIR_FREE calls can be dropped, which in

Re: [libvirt] [PATCH v1 03/32] util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-05 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:18PM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOFREE macro for declaring scalar variables, majority > of the VIR_FREE calls can be dropped, which in turn leads to > getting rid of most of our cleanup sections.

Re: [libvirt] [PATCH] storage: add findPoolSources to iscsi_direct pool backend

2018-08-05 Thread Erik Skultety
On Thu, Aug 02, 2018 at 10:33:27AM +0200, c...@lse.epita.fr wrote: > From: Clementine Hayat > > Change the SetContext function to be able to take the session type in > argument. > Took the function findPoolSources of iscsi backend and wired it to my > function since the formatting is essentially

Re: [libvirt] [PATCH] tests: mock virRandomBits to make it endian stable

2018-08-05 Thread Eric Blake
On 08/02/2018 06:37 AM, Daniel P. Berrangé wrote: virRandomBits is implemented in terms of virRandomBytes. Although we mock virRandomBytes to give a stable value, this is not sufficient to make virRandomBits give a stable value. The result of virRandomBits will vary depending on endianness. Thus

Re: [libvirt] [PATCH] tests: mock virRandomBits to make it endian stable

2018-08-05 Thread Daniel P . Berrangé
On Thu, Aug 02, 2018 at 08:17:25AM -0500, Eric Blake wrote: > On 08/02/2018 06:37 AM, Daniel P. Berrangé wrote: > > virRandomBits is implemented in terms of virRandomBytes. Although we > > mock virRandomBytes to give a stable value, this is not sufficient to > > make virRandomBits give a stable

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Daniel P . Berrangé
On Thu, Aug 02, 2018 at 01:12:02PM +0200, Pino Toscano wrote: > On Thursday, 2 August 2018 12:28:45 CEST Daniel P. Berrangé wrote: > > On Thu, Aug 02, 2018 at 10:17:32AM +0200, Bjoern Walk wrote: > > > Pino Toscano [2018-08-02, 10:02AM +0200]: > > > > I do not think this patch is correct: we are

Re: [libvirt] [PATCH] storage: add findPoolSources to iscsi_direct pool backend

2018-08-05 Thread Michal Privoznik
On 08/02/2018 10:33 AM, c...@lse.epita.fr wrote: > From: Clementine Hayat > > Change the SetContext function to be able to take the session type in > argument. > Took the function findPoolSources of iscsi backend and wired it to my > function since the formatting is essentially the same. > >

Re: [libvirt] [PATCH] tests: mock virRandomBits to make it endian stable

2018-08-05 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski and Tested-by: Boris Fiuczynski On 08/02/2018 01:37 PM, Daniel P. Berrangé wrote: virRandomBits is implemented in terms of virRandomBytes. Although we mock virRandomBytes to give a stable value, this is not sufficient to make virRandomBits give a stable value.

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Daniel P . Berrangé
On Thu, Aug 02, 2018 at 10:17:32AM +0200, Bjoern Walk wrote: > Pino Toscano [2018-08-02, 10:02AM +0200]: > > I do not think this patch is correct: we are dealing with random bytes, > > so there is no "endianness" for them. > > Well, it's not incorrect either, isn't it? I agree that endianness >

Re: [libvirt] [PATCH] util: virrandom: make virRandomBits endian-safe

2018-08-05 Thread Pino Toscano
On Thursday, 2 August 2018 09:56:49 CEST Bjoern Walk wrote: > Make the generation of random bits in virRandomBits independent of the > endianness of the running architecture. > > This also solves problems with the mocked random byte generation on > big-endian machines. > > Suggested-by: Daniel

[libvirt] [PATCH] virrandom: Avoid undefined behaviour in virRandomBits

2018-08-05 Thread Michal Privoznik
If nbits is 64 (or greater) then shifting 1ULL left is undefined. Signed-off-by: Michal Privoznik --- src/util/virrandom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virrandom.c b/src/util/virrandom.c index 3c011a8615..7915f6531e 100644 ---

Re: [libvirt] [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-05 Thread Fam Zheng
On Wed, Aug 1, 2018 at 9:18 PM Cornelia Huck wrote: > > On Wed, 1 Aug 2018 15:11:23 +0200 > Cornelia Huck wrote: > > > On Wed, 1 Aug 2018 14:54:51 +0200 > > Cornelia Huck wrote: > > > > > On Wed, 1 Aug 2018 18:21:27 +0800 > > > Fam Zheng wrote: > > > > > > > On Tue, 07/24 11:24, Cornelia Huck

[libvirt] [PATCH v2 1/2] esx: Do not crash SetAutoStart by double free

2018-08-05 Thread Marcos Paulo de Souza
SetAutoStart method cannot free virtualMachine using esxVI_ObjectContent_Free, since: esxVI_HostAutoStartManagerConfig_Free -> esxVI_AutoStartPowerInfo_Free -> esxVI_ManagedObjectReference_Free(item->key); item->key, in this context, is virtualMachine->obj, so calling

[libvirt] [PATCH 2/4] cpu: push more parsing logic into common code

2018-08-05 Thread Daniel P . Berrangé
The x86 and ppc impls both duplicate some logic when parsing CPU features. Change the callback signature so that this duplication can be pushed up a level to common code. Signed-off-by: Daniel P. Berrangé --- src/cpu/cpu_map.c | 106 +++- src/cpu/cpu_map.h | 22 ++---

Re: [libvirt] [PATCH 2/2] viriscsi: Request more random bits for interface name

2018-08-05 Thread Eric Blake
On 08/01/2018 06:44 AM, Michal Privoznik wrote: In virStorageBackendCreateIfaceIQN() the virRandomBits() is called in order to use random bits to generate random name for new interface. However, virAsprintf() is expecting 32 bits and we are requesting only 30. Signed-off-by: Michal Privoznik

[libvirt] [PATCH v3] conf: virDomainDefValidateInternal prohibit some characters in shmem name

2018-08-05 Thread Simon Kobyda
Validate that the provided XML shmem name is not directory specific "." or ".." names as well as ensuring that there is no path separator '/' in the name. https://bugzilla.redhat.com/show_bug.cgi?id=1192400 Signed-off-by: Simon Kobyda --- Changes in v3: - moved the functionality to

Re: [libvirt] [PATCH 1/2] util: Don't overflow in virRandomBits

2018-08-05 Thread Eric Blake
On 08/01/2018 07:16 AM, Daniel P. Berrangé wrote: On Wed, Aug 01, 2018 at 01:44:32PM +0200, Michal Privoznik wrote: The function is supposed to return up to 64bit long integer. In order to do that it calls virRandomBytes() to fill the integer with random bytes and then masks out everything but

Re: [libvirt] [PATCH for v4.6.0 0/2] Fix some random problems

2018-08-05 Thread Daniel P . Berrangé
On Wed, Aug 01, 2018 at 02:57:07PM +0200, Bjoern Walk wrote: > And here's the fix for the viriscsitest on big-endian machine like > Daniel suggested. > > Bjoern > > -- > IBM Systems > Linux on Z & Virtualization Development >

Re: [libvirt] [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-05 Thread Cornelia Huck
On Wed, 1 Aug 2018 15:11:23 +0200 Cornelia Huck wrote: > On Wed, 1 Aug 2018 14:54:51 +0200 > Cornelia Huck wrote: > > > On Wed, 1 Aug 2018 18:21:27 +0800 > > Fam Zheng wrote: > > > > > On Tue, 07/24 11:24, Cornelia Huck wrote: > > > > diff --git a/hw/s390x/css-bridge.c

Re: [libvirt] [jenkins-ci PATCH 2/8] lcitool: Use JSON to pass extra-vars

2018-08-05 Thread Erik Skultety
On Thu, Jul 19, 2018 at 06:32:02PM +0200, Andrea Bolognani wrote: > We're going to add more extra-vars later on, and they > will be in some cases more complex than simple strings; > using JSON allows us to do that and also be less verbose. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by:

Re: [libvirt] [PATCH for v4.6.0 0/2] Fix some random problems

2018-08-05 Thread Bjoern Walk
Pino Toscano [2018-08-01, 03:21PM +0200]: > Hi Bjoern, > > On Wednesday, 1 August 2018 14:57:07 CEST Bjoern Walk wrote: > > And here's the fix for the viriscsitest on big-endian machine like > > Daniel suggested. > > I sent an alternative fix, only for viriscsitest, while you sent this > patch.

Re: [libvirt] [PATCH for v4.6.0 0/2] Fix some random problems

2018-08-05 Thread Pino Toscano
Hi Bjoern, On Wednesday, 1 August 2018 14:57:07 CEST Bjoern Walk wrote: > And here's the fix for the viriscsitest on big-endian machine like > Daniel suggested. I sent an alternative fix, only for viriscsitest, while you sent this patch. IMHO virRandomBits() ought to not deal with endianness,

Re: [libvirt] [jenkins-ci PATCH 4/8] guests: Move update playbook and related resources

2018-08-05 Thread Erik Skultety
On Thu, Jul 19, 2018 at 06:32:04PM +0200, Andrea Bolognani wrote: > This has two advantages: it unclutters the top-level > directory, and opens the door for adding more playbooks > down the line without turning it into a mess. > > Thanks to the changes made earlier, moving the playbook > is almost

Re: [libvirt] [jenkins-ci PATCH 1/8] lcitool: Make the script location-independent

2018-08-05 Thread Erik Skultety
On Thu, Jul 19, 2018 at 06:32:01PM +0200, Andrea Bolognani wrote: > Up until now, the only way to run lcitool has been from > the same directory it lives. After this patch, the script > is able to figure out its own location and adjust all > paths accordingly. > > Suggested-by: Katerina Koukiou >

Re: [libvirt] [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-05 Thread Cornelia Huck
On Wed, 1 Aug 2018 14:54:51 +0200 Cornelia Huck wrote: > On Wed, 1 Aug 2018 18:21:27 +0800 > Fam Zheng wrote: > > > On Tue, 07/24 11:24, Cornelia Huck wrote: > > > diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c > > > index a02d708239..1bd6c8b458 100644 > > > ---

Re: [libvirt] [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-08-05 Thread Cornelia Huck
On Wed, 1 Aug 2018 18:21:27 +0800 Fam Zheng wrote: > On Tue, 07/24 11:24, Cornelia Huck wrote: > > diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c > > index a02d708239..1bd6c8b458 100644 > > --- a/hw/s390x/css-bridge.c > > +++ b/hw/s390x/css-bridge.c > > @@ -106,7 +106,6 @@

Re: [libvirt] [PATCH for v4.6.0 0/2] Fix some random problems

2018-08-05 Thread Pino Toscano
On Wednesday, 1 August 2018 13:44:31 CEST Michal Privoznik wrote: > Bad pun. But while debugging the issue Bjoern raised [1] I've noticed > these problems. > > https://www.redhat.com/archives/libvir-list/2018-July/msg02101.html > > Michal Prívozník (2): > util: Don't overflow in virRandomBits

Re: [libvirt] Availability of libvirt-4.6.0 Release Candidate 2

2018-08-05 Thread John Ferlan
On 08/01/2018 06:47 AM, Peter Krempa wrote: > On Wed, Aug 01, 2018 at 12:40:14 +0200, Michal Privoznik wrote: >> On 07/31/2018 07:19 PM, Ján Tomko wrote: >>> And I'm still unsure about leaving in >>> commit 55ce65646348884656fd7bf3f109ebf8f7603494 >>>    qemu: Use the correct vm def on cold

Re: [libvirt] Availability of libvirt-4.6.0 Release Candidate 2

2018-08-05 Thread Daniel P . Berrangé
On Wed, Aug 01, 2018 at 01:10:08PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 01, 2018 at 01:41:48PM +0200, Bjoern Walk wrote: > > Daniel P. Berrangé [2018-08-01, 11:51AM +0100]: > > > On Tue, Jul 31, 2018 at 03:54:43PM +0200, Bjoern Walk wrote: > > > > Bjoern Walk [2018-07-31, 03:16PM

Re: [libvirt] Availability of libvirt-4.6.0 Release Candidate 2

2018-08-05 Thread Daniel P . Berrangé
On Wed, Aug 01, 2018 at 01:41:48PM +0200, Bjoern Walk wrote: > Daniel P. Berrangé [2018-08-01, 11:51AM +0100]: > > On Tue, Jul 31, 2018 at 03:54:43PM +0200, Bjoern Walk wrote: > > > Bjoern Walk [2018-07-31, 03:16PM +0200]: > > > > I have not yet had the time to figure out what goes wrong, any

Re: [libvirt] Availability of libvirt-4.6.0 Release Candidate 2

2018-08-05 Thread Bjoern Walk
Daniel P. Berrangé [2018-08-01, 11:51AM +0100]: > On Tue, Jul 31, 2018 at 03:54:43PM +0200, Bjoern Walk wrote: > > Bjoern Walk [2018-07-31, 03:16PM +0200]: > > > I have not yet had the time to figure out what goes wrong, any ideas are > > > welcome. > > > > Ah, classic. The mocked

Re: [libvirt] [PATCH for 4.6.0] tests: qemucapsprobe: Fix output after swithching to jansson

2018-08-05 Thread Ján Tomko
On Mon, Jul 30, 2018 at 04:59:34PM +0200, Peter Krempa wrote: Jansson does not put a newline at the end of formatted JSON strings. This breaks the qemucapsprobe utility as we need to keep the spacing so that tests work. Add an explicit newline. Signed-off-by: Peter Krempa ---

[libvirt] [PATCH] remote: daemon: Make sure that JSON symbols are properly loaded at startup

2018-08-05 Thread Peter Krempa
Explicitly call virJSONInitialize at startup of the libvirt daemon so that we are sure that the symbols in the compat library are properly loaded. This will prevent any random failure from happening later on when the daemon would want to use the JSON parser. Signed-off-by: Peter Krempa ---

Re: [libvirt] [jenkins-ci PATCH] lcitool: Update OS when building Docker images

2018-08-05 Thread Erik Skultety
On Fri, Jul 20, 2018 at 04:35:53PM +0200, Andrea Bolognani wrote: > The last build of the Fedora Rawhide Docker image failed > with > > Transaction check error: > file /usr/lib64/libgdbm_compat.so.4.0.0 from install > of gdbm-libs-1:1.16-1.fc29.x86_64 conflicts with file > from

Re: [libvirt] [jenkins-ci PATCH] lcitool: Update OS when building Docker images

2018-08-05 Thread Pavel Hrdina
On Fri, Jul 20, 2018 at 04:35:53PM +0200, Andrea Bolognani wrote: > The last build of the Fedora Rawhide Docker image failed > with > > Transaction check error: > file /usr/lib64/libgdbm_compat.so.4.0.0 from install > of gdbm-libs-1:1.16-1.fc29.x86_64 conflicts with file > from

Re: [libvirt] Availability of libvirt-4.6.0 Release Candidate 2

2018-08-05 Thread Michal Privoznik
On 07/31/2018 07:19 PM, Ján Tomko wrote: > And I'm still unsure about leaving in > commit 55ce65646348884656fd7bf3f109ebf8f7603494 >    qemu: Use the correct vm def on cold attach > https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=55ce6564634 > Which means attach-device --live --config will

Re: [libvirt] [dbus PATCH] Install daemon under @sbindir@

2018-08-05 Thread Pavel Hrdina
On Mon, Jul 23, 2018 at 10:34:29AM +0200, Andrea Bolognani wrote: > The libvirt-dbus daemon is not supposed to be invoked > explicitly by the user, but rather to be spawned on-demand > by the D-Bus daemon: as such, @sbindir@ is a more suitable > location in which to install it. > > Signed-off-by:

Re: [libvirt] [PATCH 2/2] esx: Fix SetAutoStart invalid pointer free

2018-08-05 Thread Han Han
On Wed, Aug 1, 2018 at 10:27 AM, Marcos Paulo de Souza < marcos.souza@gmail.com> wrote: > esxVI_AutoStartPowerInfo_Free, which is called from > esxVI_HostAutoStartManagerConfig_Free, will always call VIR_FREE to free > memory from {start,stop}Action, leading to a invalid pointer. > > With

Re: [libvirt] [PATCH v2 RESEND 08/12] conf: Allocate/release 'uid' and 'fid' in PCI address

2018-08-05 Thread Yi Min Zhao
在 2018/7/30 下午7:08, Andrea Bolognani 写道: On Fri, 2018-07-27 at 13:22 +0800, Yi Min Zhao wrote: 在 2018/7/24 下午10:58, Andrea Bolognani 写道: @@ -1385,7 +1403,12 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED, * parent, and will have its address collected during

Re: [libvirt] [PATCH] util: avoid symbol clash between json libraries

2018-08-05 Thread Peter Krempa
On Tue, Jul 31, 2018 at 15:55:28 +0100, Daniel Berrange wrote: > The jansson and json-glib libraries both export symbols with a json_ > name prefix and json_object_iter_next() clashes between them. > > Unfortunately json_glib is linked in by GTK, so any app using GTK and > libvirt will get a

Re: [libvirt] [PATCH] util: avoid symbol clash between json libraries

2018-08-05 Thread Ján Tomko
On Tue, Jul 31, 2018 at 03:55:28PM +0100, Daniel P. Berrangé wrote: The jansson and json-glib libraries both export symbols with a json_ name prefix and json_object_iter_next() clashes between them. Unfortunately json_glib is linked in by GTK, so any app using GTK and json-glib libvirt will

[libvirt] [PATCH v2] util: avoid symbol clash between json libraries

2018-08-05 Thread Daniel P . Berrangé
The jansson and json-glib libraries both export symbols with a json_ name prefix and json_object_iter_next() clashes between them. Unfortunately json_glib is linked in by GTK, so any app using GTK and libvirt will get a clash, resulting in SEGV. This also affects the NSS module provided by

Re: [libvirt] [PATCH v2] util: avoid symbol clash between json libraries

2018-08-05 Thread Ján Tomko
On Tue, Jul 31, 2018 at 05:27:36PM +0100, Daniel P. Berrangé wrote: The jansson and json-glib libraries both export symbols with a json_ name prefix and json_object_iter_next() clashes between them. Unfortunately json_glib is linked in by GTK, so any app using GTK and libvirt will get a clash,

Re: [libvirt] [PATCH] util: avoid symbol clash between json libraries

2018-08-05 Thread Eric Blake
On 07/31/2018 09:55 AM, Daniel P. Berrangé wrote: The jansson and json-glib libraries both export symbols with a json_ name prefix and json_object_iter_next() clashes between them. Unfortunately json_glib is linked in by GTK, so any app using GTK and libvirt will get a clash, resulting in SEGV.

Re: [libvirt] [PATCH] util: avoid symbol clash between json libraries

2018-08-05 Thread Andrea Bolognani
On Tue, 2018-07-31 at 15:55 +0100, Daniel P. Berrangé wrote: [...] > +# We dlopen() it so need an explicit dep > +Requires: libjansson.so.4()(64bit) Wouldn't requiring jansson be better here? I don't think many people are running libvirt on 32-bit machines these days, but the (64bit) part still

Re: [libvirt] [PATCH] qemu: qemuDomainChangeNet: don't overwrite device info when pci addr is missing

2018-08-05 Thread Ján Tomko
On Tue, Jul 31, 2018 at 04:34:39PM +0200, Katerina Koukiou wrote: When trying to update an interface's rom settings with an device XML that is missing the PCI addr element, all new rom settings where not applied. https://bugzilla.redhat.com/show_bug.cgi?id=1599513 Signed-off-by: Katerina

Re: [libvirt] [PATCH] util: avoid symbol clash between json libraries

2018-08-05 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: 20180731145528.9845-1-berra...@redhat.com Subject: [libvirt] [PATCH] util: avoid symbol clash between json libraries === TEST SCRIPT BEGIN === #!/bin/bash #

[libvirt] [PATCH 05/10] Revert "Remove virJSONValueNewStringLen"

2018-08-05 Thread Ján Tomko
Switch back to yajl until we figure out a solution for the json_object_iter_next conflict with json-glib. This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337. Signed-off-by: Ján Tomko --- src/libvirt_private.syms | 1 + src/util/virjson.c | 22 ++

[libvirt] [PATCH 03/10] Revert "build: require Jansson if QEMU driver is enabled"

2018-08-05 Thread Ján Tomko
Switch back to yajl until we figure out a solution for the json_object_iter_next conflict with json-glib. This reverts commit 01ce04375c3348fd683475e5aa5231149ef6a78a. Signed-off-by: Ján Tomko --- m4/virt-driver-qemu.m4 | 3 --- 1 file changed, 3 deletions(-) diff --git

[libvirt] [PATCH v4 0/4] iscsi-direct: first part

2018-08-05 Thread clem
From: Clementine Hayat Hello, This is the implementation of the iscsi-direct backend storage pool version 4. v1: https://www.redhat.com/archives/libvir-list/2018-July/msg00918.html v2: https://www.redhat.com/archives/libvir-list/2018-July/msg01528.html v3:

Re: [libvirt] [PATCH v3 2/4] storage: Introduce iscsi_direct pool type

2018-08-05 Thread Michal Privoznik
On 07/31/2018 10:44 AM, c...@lse.epita.fr wrote: > From: Clementine Hayat > > Introducing the pool as a noop. Integration inside the build > system. Implementation will be in the following commits. > > Signed-off-by: Clementine Hayat > --- > configure.ac | 6

Re: [libvirt] [PATCH v3 0/4] iscsi-direct: first part

2018-08-05 Thread Michal Privoznik
On 07/31/2018 10:44 AM, c...@lse.epita.fr wrote: > From: Clementine Hayat > > Hello, > > This is the implementation of the iscsi-direct backend storage pool > version 3. > > v1: https://www.redhat.com/archives/libvir-list/2018-July/msg00918.html > v2:

Re: [libvirt] Entering freeze for libvirt-4.6.0

2018-08-05 Thread Michal Privoznik
On 07/31/2018 02:04 PM, Martin Kletzander wrote: > The same would happen if libvirt used `json-glib` and some application > linking > with libvirt would start using jansson (and also use some specific > functions). > Not that we were guarded against that now.  I'm not saying the release > can go

Re: [libvirt] Entering freeze for libvirt-4.6.0

2018-08-05 Thread Daniel P . Berrangé
On Mon, Jul 30, 2018 at 05:20:01PM +0200, Andrea Bolognani wrote: > It seems like a similar issue could affect any application linking > both to libvirt and json-glib, regardless of whether or not the NSS > plugin has been enabled, which is of course pretty bad. > > Unfortunately, I don't have

[libvirt] [PATCH v3 1/4] configure: Introduce libiscsi in build system

2018-08-05 Thread clem
From: Clementine Hayat The minimal required version is 1.18.0 because the synchrounous function needed were introduced here. Signed-off-by: Clementine Hayat --- configure.ac| 3 +++ m4/virt-libiscsi.m4 | 30 ++ 2 files changed, 33 insertions(+) create

  1   2   >