Re: [libvirt] [PATCH] network: restrict usage of port management APIs

2018-08-08 Thread Laine Stump
On 08/08/2018 11:46 AM, Daniel P. Berrangé wrote: > The port allocation APIs are currently called unconditionally for all > types of NIC, but (mostly) only do anything for NICs with type=network. > > The exception is the port allocate API which does some validation even > for NICs with

[libvirt] [PATCH] spec: Add firmware/nvram paths for edk2 arm and ia32

2018-08-08 Thread Cole Robinson
And clarify the comments to instead mention the package names that provide these files Signed-off-by: Cole Robinson --- libvirt.spec.in | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3edb60d2d2..f3d5c032af 100644 ---

[libvirt] [PATCH] spec: Add libvirt-daemon-driver-storage-iscsi-direct

2018-08-08 Thread Cole Robinson
Signed-off-by: Cole Robinson --- libvirt.spec.in | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3edb60d2d2..09e69a9309 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -317,8 +317,10 @@ BuildRequires:

[libvirt] [PATCH libvirt-tck] Cleanup secret in disk encryption test

2018-08-08 Thread Jim Fehlig
100-disk-encryption.t does not undefine the secret it defines for the test disk, causing subsequent runs of the test to fail not ok 1 - secret created Failed test 'secret created' at /usr/share/libvirt-tck/tests/qemu/100-disk-encryption.t line 65. died: Sys::Virt::Error (libvirt error code: 1,

Re: [libvirt] [PATCH] Fix link errors in tools/nss and tests

2018-08-08 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 11:00:01AM -0600, Jim Fehlig wrote: > While local builds succeed fine, a build worker building in a chroot > environment is encountering errors when linking some items in tools/nss > and tests, e.g. > > [ 469s] libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive

[libvirt] [PATCH] Fix link errors in tools/nss and tests

2018-08-08 Thread Jim Fehlig
While local builds succeed fine, a build worker building in a chroot environment is encountering errors when linking some items in tools/nss and tests, e.g. [ 469s] libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive nss/.libs/libnss_libvirt_impl.a -Wl,--no-whole-archive -lpthread

[libvirt] [PATCH] network: restrict usage of port management APIs

2018-08-08 Thread Daniel P . Berrangé
The port allocation APIs are currently called unconditionally for all types of NIC, but (mostly) only do anything for NICs with type=network. The exception is the port allocate API which does some validation even for NICs with type!=network. Relying on this validation is flawed, however, since

[libvirt] [PATCH] storage: tweak error message when skipping file

2018-08-08 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/storage/storage_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 715d5c2f88..42a9b6abf0 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c

Re: [libvirt] [PATCH 4/9] util: introduce virStorageSourceInitiator functions

2018-08-08 Thread Pavel Hrdina
On Wed, Aug 08, 2018 at 04:42:13PM +0200, Michal Privoznik wrote: > On 08/07/2018 03:55 PM, Pavel Hrdina wrote: > > The same code would be used for storage pools and domain disks. > > > > Signed-off-by: Pavel Hrdina > > --- > > src/util/virstoragefile.c | 34 ++ >

Re: [libvirt] [PATCH 2/9] conf: properly translate iscsi-direct storage pool

2018-08-08 Thread Pavel Hrdina
On Tue, Aug 07, 2018 at 04:27:21PM +0200, Ján Tomko wrote: > On Tue, Aug 07, 2018 at 03:55:21PM +0200, Pavel Hrdina wrote: > > We cannot simply used the same code as for iscsi storage pool because > > the default mode is 'host' which is not possible with iscsi-direct. > > > > Signed-off-by: Pavel

Re: [libvirt] [PATCH] qemu: ensure default machine types don't change if QEMU changes

2018-08-08 Thread Andrea Bolognani
On Wed, 2018-08-08 at 10:19 +0100, Daniel P. Berrangé wrote: > On Wed, Aug 08, 2018 at 10:12:59AM +0200, Andrea Bolognani wrote: > > On Tue, 2018-08-07 at 16:01 +0100, Daniel P. Berrangé wrote: > > > Someone could build a QEMU with the "pc" machine type deleted entirely, > > > in which case

Re: [libvirt] [PATCH 4/9] util: introduce virStorageSourceInitiator functions

2018-08-08 Thread Michal Privoznik
On 08/07/2018 03:55 PM, Pavel Hrdina wrote: > The same code would be used for storage pools and domain disks. > > Signed-off-by: Pavel Hrdina > --- > src/util/virstoragefile.c | 34 ++ > src/util/virstoragefile.h | 15 +++ > 2 files changed, 49

Re: [libvirt] [PATCH 0/9] iSCSI fixes and improvements

2018-08-08 Thread Michal Privoznik
On 08/07/2018 03:55 PM, Pavel Hrdina wrote: > Pavel Hrdina (9): > docs: fix iscsi-direct XML example > conf: properly translate iscsi-direct storage pool > conf: rename and move virStoragePoolSourceInitiatorAttr > util: introduce virStorageSourceInitiator functions > conf: use

Re: [libvirt] [Qemu-devel] [PATCH 3/3] ui: remove support for SDL1.2 in favour of SDL2

2018-08-08 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 02:51:01PM +0100, Peter Maydell wrote: > On 8 August 2018 at 11:49, Daniel P. Berrangé wrote: > > SDL1.2 was deprecated in the 2.12.0 release with: > > > > commit e52c6ba34149b4f39c3fd60e59ee32b809db2bfa > > Author: Daniel P. Berrange > > Date: Mon Jan 15 14:25:33

Re: [libvirt] [Qemu-devel] [PATCH 3/3] ui: remove support for SDL1.2 in favour of SDL2

2018-08-08 Thread Peter Maydell
On 8 August 2018 at 11:49, Daniel P. Berrangé wrote: > SDL1.2 was deprecated in the 2.12.0 release with: > > commit e52c6ba34149b4f39c3fd60e59ee32b809db2bfa > Author: Daniel P. Berrange > Date: Mon Jan 15 14:25:33 2018 + > > ui: deprecate use of SDL 1.2 in favour of 2.0 series >

[libvirt] [jenkins-ci PATCH 09/12] lcitool: make playbook execution generic

2018-08-08 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- guests/lcitool | 87 ++ 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/guests/lcitool b/guests/lcitool index f28199d..e0410f3 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -351,6 +351,50 @@

[libvirt] [jenkins-ci PATCH 03/12] jobs: Remove archive_format from defaults

2018-08-08 Thread Andrea Bolognani
Instead of defining a default and overriding it on a case-by-case basis, always define archive_format at the project level. This adds a bit of duplication, but it's consistent with how we define other metadata for projects and it will help us out later. Signed-off-by: Andrea Bolognani ---

[libvirt] [jenkins-ci PATCH 12/12] lcitool: Document build action

2018-08-08 Thread Andrea Bolognani
Provide some examples and scenarios. Signed-off-by: Andrea Bolognani --- guests/README.markdown | 19 +++ 1 file changed, 19 insertions(+) diff --git a/guests/README.markdown b/guests/README.markdown index ddf0149..870619e 100644 --- a/guests/README.markdown +++

[libvirt] [jenkins-ci PATCH 11/12] lcitool: Support building arbitrary branches

2018-08-08 Thread Andrea Bolognani
Building master is useful for CI purposes and to debug CI failures locally, but when developing we want to be able to build a personal branch to validate in-progress changes. Signed-off-by: Andrea Bolognani --- guests/lcitool | 30

[libvirt] [jenkins-ci PATCH 07/12] guests: Add build projects

2018-08-08 Thread Andrea Bolognani
These tasks mirror the Jenkins projects contained in the top-level projects/ directory. Signed-off-by: Andrea Bolognani --- guests/playbooks/build/projects/libosinfo.yml | 36 + .../playbooks/build/projects/libvirt-cim.yml | 10 .../playbooks/build/projects/libvirt-dbus.yml |

[libvirt] [jenkins-ci PATCH 04/12] jobs: Move some parameters from jobs to defaults

2018-08-08 Thread Andrea Bolognani
The affected parameters are autogen_args, command and command_pre_build. Moving their default value next to the other overridable defaults makes sense, and it will help us out later. Signed-off-by: Andrea Bolognani --- jobs/autotools.yaml| 1 - jobs/defaults.yaml | 3 +++

[libvirt] [jenkins-ci PATCH 10/12] lcitool: Add 'build' action

2018-08-08 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- guests/lcitool | 4 1 file changed, 4 insertions(+) diff --git a/guests/lcitool b/guests/lcitool index e0410f3..2901a92 100755 --- a/guests/lcitool +++ b/guests/lcitool @@ -323,6 +323,7 @@ class Application: common actions:

[libvirt] [jenkins-ci PATCH 08/12] guests: Add build playbook

2018-08-08 Thread Andrea Bolognani
This playbook represent the entry point for automated builds, and follows the same calling conventions as the existing update playbook. Signed-off-by: Andrea Bolognani --- guests/playbooks/build/main.yml | 16 1 file changed, 16 insertions(+) create mode 100644

[libvirt] [jenkins-ci PATCH 01/12] projects: Add default machines for libvirt-dbus

2018-08-08 Thread Andrea Bolognani
This doesn't change the results but brings it more in line with how other projects are defined and will help us out later. Signed-off-by: Andrea Bolognani --- projects/libvirt-dbus.yaml | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[libvirt] [jenkins-ci PATCH 06/12] guests: Add build jobs

2018-08-08 Thread Andrea Bolognani
These tasks mirror the Jenkins jobs contained in the top-level jobs/ directory. Signed-off-by: Andrea Bolognani --- .../build/jobs/autotools-build-job.yml| 15 .../build/jobs/autotools-check-job.yml| 16 + .../build/jobs/autotools-rpm-job.yml | 17

[libvirt] [jenkins-ci PATCH 00/12] lcitool: Add 'build' action

2018-08-08 Thread Andrea Bolognani
Also known as [secret feature redacted] :) This will be mostly useful for developers wanting to validate their changes locally before posting patches, but it will also allow CentOS CI maintainers to prime new guests before adding them to Jenkins, thus avoiding the usual dance of starting and

[libvirt] [jenkins-ci PATCH 02/12] jobs: Rename git-url -> git_url

2018-08-08 Thread Andrea Bolognani
Other user-defined variables use underscores as separator instead of dashes; this change will also help us out later. Signed-off-by: Andrea Bolognani --- jobs/autotools.yaml | 2 +- jobs/generic.yaml | 2 +- jobs/go.yaml | 2 +- jobs/perl-modulebuild.yaml

[libvirt] [jenkins-ci PATCH 05/12] jobs: Declare empty values consistently

2018-08-08 Thread Andrea Bolognani
The pipe syntax is intended for multi-line preformatted text, and is abused here. Use a saner syntax instead. Signed-off-by: Andrea Bolognani --- jobs/defaults.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/defaults.yaml b/jobs/defaults.yaml index

Re: [libvirt] [PATCH] rpm: simplify applying of patches

2018-08-08 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 02:20:02PM +0200, Martin Kletzander wrote: > On Fri, Aug 03, 2018 at 10:35:32AM +0100, Daniel P. Berrangé wrote: > > The distros we support for RPM builds all have %autosetup support so we > > can ditch the convoluted code for running git manually and use the RPM > >

Re: [libvirt] [PATCH 0/3] ui: remove deprecated UI frontends

2018-08-08 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 01:24:09PM +0200, Gerd Hoffmann wrote: > On Wed, Aug 08, 2018 at 11:49:27AM +0100, Daniel P. Berrangé wrote: > > We deprecated GTK2 and SDL1.2 in the 2.12.0 release, so they are able to > > be removed entirely in the 3.1.0 release. The min GTK3 version can also > > be

Re: [libvirt] [PATCH] rpm: simplify applying of patches

2018-08-08 Thread Martin Kletzander
On Fri, Aug 03, 2018 at 10:35:32AM +0100, Daniel P. Berrangé wrote: The distros we support for RPM builds all have %autosetup support so we can ditch the convoluted code for running git manually and use the RPM defaults. I'm no specfile expert, but I tried making an RPM with some Patches in

Re: [libvirt] [PATCH] spec: Use %make_install

2018-08-08 Thread Martin Kletzander
On Tue, Jul 31, 2018 at 11:42:40AM -0400, Cole Robinson wrote: It's on RHEL7, saves a bit of typing, and lets us drop the comment I tried it looks like it works. Reviewed-by: Martin Kletzander Signed-off-by: Cole Robinson --- There's also a %make_build macro which handles smp_mflags, but

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

2018-08-08 Thread Martin Kletzander
On Wed, Aug 01, 2018 at 05:50:03PM +0200, Simon Kobyda wrote: 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. I slightly changed the commit message and pushed this. I don't really like

Re: [libvirt] [PATCH 0/3] ui: remove deprecated UI frontends

2018-08-08 Thread Gerd Hoffmann
On Wed, Aug 08, 2018 at 11:49:27AM +0100, Daniel P. Berrangé wrote: > We deprecated GTK2 and SDL1.2 in the 2.12.0 release, so they are able to > be removed entirely in the 3.1.0 release. The min GTK3 version can also > be bumped up based the distros we aim to support. Yes for gtk2, finally the

Re: [libvirt] [PATCH 1/2] util: virnetdevopenvswitch: Drop an unused variable @ovs_timeout

2018-08-08 Thread Boris Fiuczynski
On 08/08/2018 08:23 AM, Erik Skultety wrote: Technically, it was never used ever since commit @f4d06ca8fd9 introduced it, but the fact that we called VIR_FREE on it was enough for Clang to never complain about it. Signed-off-by: Erik Skultety --- CC'ing Boris, as he allowed specifying

[libvirt] [PATCH 1/3] ui: remove support for GTK2 in favour of GTK3

2018-08-08 Thread Daniel P . Berrangé
GTK2 was deprecated in the 2.12.0 release with: commit b7715af2b31f47060cc5b4be930d16c13be93fa9 Author: Daniel P. Berrange Date: Tue Dec 12 11:34:40 2017 + ui: deprecate use of GTK 2.x in favour of 3.x series The GTK 3.0 release was made in Feb, 2011:

[libvirt] [PATCH 2/3] ui: increase min required GTK3 version to 3.14.0

2018-08-08 Thread Daniel P . Berrangé
Per supported platforms doc[1], the various min GTK3 on relevant distros is: RHEL-7.0: 3.8.8 RHEL-7.2: 3.14.13 RHEL-7.4: 3.22.10 RHEL-7.5: 3.22.26 Debian (Stretch): 3.22.11 Debian (Jessie): 3.14.5 OpenBSD (Ports): 3.22.30 FreeBSD (Ports): 3.22.29 OpenSUSE Leap 15: 3.22.30

[libvirt] [PATCH 0/3] ui: remove deprecated UI frontends

2018-08-08 Thread Daniel P . Berrangé
We deprecated GTK2 and SDL1.2 in the 2.12.0 release, so they are able to be removed entirely in the 3.1.0 release. The min GTK3 version can also be bumped up based the distros we aim to support. Daniel P. Berrangé (3): ui: remove support for GTK2 in favour of GTK3 ui: increase min required

[libvirt] [PATCH 3/3] ui: remove support for SDL1.2 in favour of SDL2

2018-08-08 Thread Daniel P . Berrangé
SDL1.2 was deprecated in the 2.12.0 release with: commit e52c6ba34149b4f39c3fd60e59ee32b809db2bfa Author: Daniel P. Berrange Date: Mon Jan 15 14:25:33 2018 + ui: deprecate use of SDL 1.2 in favour of 2.0 series The SDL 2.0 release was made in Aug, 2013:

Re: [libvirt] [PATCH] qemu: ensure default machine types don't change if QEMU changes

2018-08-08 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 10:12:59AM +0200, Andrea Bolognani wrote: > On Tue, 2018-08-07 at 16:01 +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 07, 2018 at 04:57:28PM +0200, Andrea Bolognani wrote: > > > > > I wonder if we shouldn't just drop the default machine type handling > > > > > altogether

Re: [libvirt] [PATCH v3 0/3] qemu: Support vhost-vsock-ccw

2018-08-08 Thread Boris Fiuczynski
On 08/07/2018 03:25 PM, Ján Tomko wrote: On Mon, Aug 06, 2018 at 05:41:05PM +0200, Boris Fiuczynski wrote: Support the vhost-vsock-ccw device on S390. Since v2 - instead of reusing CAPS_LATEST adding CAPS_ARCH_LATEST (Peter Krempa) Since v1 - adjusted vsock command line generation (Ján Tomko)

Re: [libvirt] [PATCH v2 00/35] use GNU C's cleanup attribute in src/util (batch III)

2018-08-08 Thread Erik Skultety
On Mon, Aug 06, 2018 at 02:13:27AM +0530, Sukrit Bhatnagar wrote: > This third series of patches also modifies a few files in src/util > to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory > and get rid of some VIR_FREE macro invocations and *Free function > calls. This will

Re: [libvirt] [PATCH] qemu: ensure default machine types don't change if QEMU changes

2018-08-08 Thread Andrea Bolognani
On Tue, 2018-08-07 at 16:01 +0100, Daniel P. Berrangé wrote: > On Tue, Aug 07, 2018 at 04:57:28PM +0200, Andrea Bolognani wrote: > > > > I wonder if we shouldn't just drop the default machine type handling > > > > altogether at this point, though. > > > > > > That's impossible as it violates the

Re: [libvirt] [PATCH 2/2] Fix the build on non-linux platforms after VIR_AUTOPTR related changes

2018-08-08 Thread Erik Skultety
On Wed, Aug 08, 2018 at 09:16:20AM +0200, Ján Tomko wrote: > On Wed, Aug 08, 2018 at 08:23:42AM +0200, Erik Skultety wrote: > > Commits 7b706f33ac and 4acb7887e4 introduced some compound type *Free > > wrappers in order to use them with VIR_DEFINE_AUTOPTR_FUNC. However, > > since those were not

[libvirt] [PATCH v2 28/35] util: numa: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 21/35] util: netdevmacvlan: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 18/35] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 35/35] util: qemu: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 27/35] util: numa: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnuma.c | 75

[libvirt] [PATCH v2 22/35] util: netdevopenvswitch: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdevopenvswitch.c |

[libvirt] [PATCH v2 33/35] util: process: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 30/35] util: perf: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 23/35] util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 25/35] util: netdevveth: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 26/35] util: netdevveth: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 31/35] util: pidfile: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 24/35] util: netdevtap: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 32/35] util: process: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virprocess.c | 39

[libvirt] [PATCH v2 34/35] util: qemu: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 20/35] util: netdevmacvlan: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 29/35] util: perf: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 17/35] util: netdevip: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdevip.c | 97

[libvirt] [PATCH v2 14/35] util: socketaddr: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik

[libvirt] [PATCH v2 19/35] util: netdevmacvlan: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 15/35] util: netdevip: define virNetDevIPAddrFree for use with cleanup macros

2018-08-08 Thread Sukrit Bhatnagar
Define a free function for virNetDevIPAddrPtr type for consistency and extensibility. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdevip.c | 6 ++ src/util/virnetdevip.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index

[libvirt] [PATCH v2 13/35] util: socketaddr: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 11/35] util: netdev: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 03/35] util: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 09/35] util: netdev: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 16/35] util: netdevip: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 12/35] util: socketaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v2 08/35] util: macaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-08 Thread Sukrit Bhatnagar
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. Also, drop the redundant viralloc.h include, since that has moved from the

Re: [libvirt] Expose vfio device display/migration to libvirt and above, was Re: [PATCH 0/3] sample: vfio mdev display devices.

2018-08-08 Thread Gerd Hoffmann
On Fri, Jul 20, 2018 at 04:56:15AM +, Yuan, Hang wrote: > Hi Gerd, > > Can I know your status on the boot display support work? I'm interested to > try it in some real use cases. https://git.kraxel.org/cgit/qemu/log/?h=sirius/ramfb-vfio Most of the bits needed (general ramfb support) is

[libvirt] [PATCH v2 01/35] util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar Reviewed-by: Erik Skultety ---

[libvirt] [PATCH v2 10/35] util: netdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdev.c | 328

[libvirt] [PATCH v2 00/35] use GNU C's cleanup attribute in src/util (batch III)

2018-08-08 Thread Sukrit Bhatnagar
This third series of patches also modifies a few files in src/util to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory and get rid of some VIR_FREE macro invocations and *Free function calls. Sukrit Bhatnagar (35): util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar

[libvirt] [PATCH v2 06/35] util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdevbridge.c | 46

[libvirt] [PATCH v2 07/35] util: netdevbridge: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 05/35] util: netlink: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 02/35] util: iscsi: use VIR_AUTOPTR for aggregate types

2018-08-08 Thread Sukrit Bhatnagar
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 our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v2 04/35] util: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-08 Thread Sukrit Bhatnagar
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. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetlink.c | 31

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

2018-08-08 Thread Daniel P . Berrangé
On Tue, Aug 07, 2018 at 03:53:53PM -0300, Eduardo Habkost wrote: > On Tue, Aug 07, 2018 at 12:17:33PM +0100, Daniel P. Berrangé wrote: > > On Fri, Aug 03, 2018 at 01:05:49PM -0300, Eduardo Habkost wrote: > > > On Fri, Aug 03, 2018 at 01:59:47PM +0100, Daniel P. Berrangé wrote: > > > > It is

Re: [libvirt] [PATCH 2/2] Fix the build on non-linux platforms after VIR_AUTOPTR related changes

2018-08-08 Thread Ján Tomko
On Wed, Aug 08, 2018 at 08:23:42AM +0200, Erik Skultety wrote: Commits 7b706f33ac and 4acb7887e4 introduced some compound type *Free wrappers in order to use them with VIR_DEFINE_AUTOPTR_FUNC. However, since those were not used in the code right away, Clang complained about unused functions

Re: [libvirt] [PATCH 1/2] util: virnetdevopenvswitch: Drop an unused variable @ovs_timeout

2018-08-08 Thread Ján Tomko
On Wed, Aug 08, 2018 at 08:23:41AM +0200, Erik Skultety wrote: Technically, it was never used ever since commit @f4d06ca8fd9 introduced it, but the fact that we called VIR_FREE on it was enough for Clang to never complain about it. Signed-off-by: Erik Skultety --- CC'ing Boris, as he allowed

[libvirt] [PATCH 2/2] Fix the build on non-linux platforms after VIR_AUTOPTR related changes

2018-08-08 Thread Erik Skultety
Commits 7b706f33ac and 4acb7887e4 introduced some compound type *Free wrappers in order to use them with VIR_DEFINE_AUTOPTR_FUNC. However, since those were not used in the code right away, Clang complained about unused functions (static ones that are defined by the macro above). This patch puts

[libvirt] [PATCH 1/2] util: virnetdevopenvswitch: Drop an unused variable @ovs_timeout

2018-08-08 Thread Erik Skultety
Technically, it was never used ever since commit @f4d06ca8fd9 introduced it, but the fact that we called VIR_FREE on it was enough for Clang to never complain about it. Signed-off-by: Erik Skultety --- CC'ing Boris, as he allowed specifying timeouts for openvswitch calls, however, this

[libvirt] [PATCH 0/2] Fix the non-linux platform build after recent VIR_AUTOPTR patches

2018-08-08 Thread Erik Skultety
There were some complaints about an unused variable (patch 1) and unused static functions which are defined by the VIR_DEFINE_AUTOPTR_FUNC macro (patch 2). Successful Travis build: https://travis-ci.org/eskultety/libvirt/builds/413187470 MinGW wasn't affected by the recent VIR_AUTOPTR series: