[libvirt] [PATCH v2 1/1] qemu_command: tidy up qemuBuildHostdevCommandLine loop

2019-10-08 Thread Daniel Henrique Barboza
The current 'for' loop with 5 consecutive 'ifs' inside qemuBuildHostdevCommandLine can be a bit smarter: - all 5 'ifs' fails if hostdev->mode is not equal to VIR_DOMAIN_HOSTDEV_MODE_SUBSYS. This check can be moved to the start of the loop, failing to the next element immediately in case it fails;

[libvirt] [PATCH v2 0/1] qemu_command: tidy up qemuBuildHostdevCommandLine loop

2019-10-08 Thread Daniel Henrique Barboza
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit changes from v2: - use a switch statement instead of keeping the chained ifs, as suggested by Jano v1: https://www.redhat.com/archives/libvir-list/2019-October/msg00062.html Daniel Henrique Barboza (1):

[libvirt] [PATCH v2 0/1] src/driver.c: remove duplicated code in

2019-10-08 Thread Daniel Henrique Barboza
changes from v1: - use virThreadLocalPtr instead of virThreadLocal in virGetConnectGeneric - added a missing ':' v1: https://www.redhat.com/archives/libvir-list/2019-September/msg01323.html Daniel Henrique Barboza (1): src/driver.c: remove duplicated code in virGetConnect* functions

[libvirt] [PATCH v2 1/1] src/driver.c: remove duplicated code in virGetConnect* functions

2019-10-08 Thread Daniel Henrique Barboza
All the 6 virGetConnect* functions in driver.c shares the same code base. This patch creates a new static function virGetConnectGeneric() that contains the common code to be used with all other virGetConnect*. Signed-off-by: Daniel Henrique Barboza --- src/driver.c | 99

[libvirt] [jenkins-ci PATCH v3 12/12] Switch libvirt-dbus to Meson

2019-10-08 Thread Fabiano Fidêncio
As libvirt-dbus has switched to using Meson instead of autotools, let's switch its jobs here. During the switch, `make check` and `make syntax-check` got merged into `ninja test`, which is reflected here by merging those two jobs. Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea Bolognani

[libvirt] [jenkins-ci PATCH v3 06/12] guests: Install meson via pip

2019-10-08 Thread Fabiano Fidêncio
Let's install meson via pip whenever meson is not available at all or does not match the minimum required version. Signed-off-by: Fabiano Fidêncio --- guests/lcitool | 25 guests/playbooks/update/tasks/packages.yml | 44 ++

[libvirt] [jenkins-ci PATCH v3 04/12] mappings: Add python3-pip

2019-10-08 Thread Fabiano Fidêncio
pip will be used to install meson on OSes which do not have support to the minimum required version of the project. Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea Bolognani --- guests/vars/mappings.yml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/guests/vars/mappings.yml

[libvirt] [jenkins-ci PATCH v3 08/12] osinfo-db: Build again on all machines

2019-10-08 Thread Fabiano Fidêncio
As now we've the needed packages for building and testing osinfo-db on all systems supported by libvirt-jenkins-ci, let's build osinfo-db everywhere. Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea Bolognani --- guests/host_vars/libvirt-centos-7/main.yml| 1 +

[libvirt] [jenkins-ci PATCH v3 07/12] osinfo-db-tools: Build again on all machines

2019-10-08 Thread Fabiano Fidêncio
As now we've the needed packages for building and testing osinfo-db-tools on all systems supported by libvirt-jenkins-ci, let's build osinfo-db-tools everywhere. RPM build is still not possible in CentOS7 as it doesn't have the needed RPM macros for Meson. Signed-off-by: Fabiano Fidêncio

[libvirt] [jenkins-ci PATCH v3 02/12] mappings: Add python2-setuptools

2019-10-08 Thread Fabiano Fidêncio
python-setuptools, which will only be used on CentOS7, is needed in order to properly use the pip module for installing meson. Without this package, we would see failures as `ImportError: No module named pkg_resources` when trying to use the pip module, even when using its python3 version.

[libvirt] [jenkins-ci PATCH v3 10/12] virt-manager: Build again on Debian9 and Ubuntu18

2019-10-08 Thread Fabiano Fidêncio
As osinfo-db-tools, osindo-db, and libosinfo can now be built again on Debian9 and Ubuntu18, let's enable virt-manager builds on those OSes as well. This commit partilly reverts 570143fc41fa270. Signed-off-by: Fabiano Fidêncio --- guests/host_vars/libvirt-debian-9/main.yml | 1 +

[libvirt] [jenkins-ci PATCH v3 11/12] libvirt-dbus: Take advantage of Python 3 on CentOS 7

2019-10-08 Thread Fabiano Fidêncio
As latest CentOS 7 has added python3, CentOS 7 has support to python3, let's run syntax-check job the project. Also, let's update the comment explaining that we don't run `make check` on CentOS 7 because python3-pytest version is too old. Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea

[libvirt] [jenkins-ci PATCH v3 05/12] guests: Add python3-pip to the base project

2019-10-08 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea Bolognani --- guests/vars/projects/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml index a8c83ac..ec04fdf 100644 --- a/guests/vars/projects/base.yml +++

[libvirt] [jenkins-ci PATCH v3 01/12] guests: add flake8 to libvirt project

2019-10-08 Thread Fabiano Fidêncio
From: Daniel P. Berrangé Reviewed-by: Fabiano Fidêncio Signed-off-by: Daniel P. Berrangé --- guests/vars/projects/libvirt.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml index 04c3ecd..8fcb286 100644 ---

[libvirt] [jenkins-ci PATCH v3 03/12] guests: Add python2-setuptools to the base project

2019-10-08 Thread Fabiano Fidêncio
Signed-off-by: Fabiano Fidêncio Reviewed-by: Andrea Bolognani --- guests/vars/projects/base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml index f008de3..a8c83ac 100644 --- a/guests/vars/projects/base.yml +++

[libvirt] [jenkins-ci PATCH v3 09/12] libosinfo: Build again on all machines

2019-10-08 Thread Fabiano Fidêncio
As now we've the needed packages for building and testing libosinfo on all systems supported by libvirt-jenkins-ci, let's build libosinfo everywhere. RPM build is still not possible in CentOS7 as it doesn't have the needed RPM macros for Meson. Signed-off-by: Fabiano Fidêncio Reviewed-by:

[libvirt] [jenkins-ci PATCH v3 00/12] Meson, more meson!

2019-10-08 Thread Fabiano Fidêncio
The first 5 patches in the series are adding the machinery for installing meson via pip, which will be needed for systems which do not have the minimum required version, as CentOS 7, Debian 9, Ubuntu 16, and Ubuntu 18. Next 3 patches build and test osinfo-db-tools, osinfo-db, and libosinfo on all

Re: [libvirt] [PATCH 2/2] Revert "qemu: Obtain reference on monConfig"

2019-10-08 Thread Daniel Henrique Barboza
On 10/8/19 6:15 AM, Michal Privoznik wrote: This reverts commit a5a777a8bae61cb9e41c4dcd12d2962ad1a65a0d. After previous commit the domain won't disappear while connecting to monitor. There's no need to ref monitor config then. Signed-off-by: Michal Privoznik --- Reviewed-by: Daniel

Re: [libvirt] [PATCH 1/2] qemu: Fix @vm locking issue when connecting to the monitor

2019-10-08 Thread Daniel Henrique Barboza
On 10/8/19 6:15 AM, Michal Privoznik wrote: When connecting to qemu's monitor the @vm object is unlocked. This is justified - connecting may take a long time and we don't want to wait with the domain object locked. However, just before the domain object is locked again, the monitor's FD is

[libvirt] [PATCH v2 2/3] qemu: Implement the ccf-assist pSeries feature

2019-10-08 Thread Daniel Henrique Barboza
This patch adds the implementation of the ccf-assist pSeries feature, based on the QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST capability that was added in the previous patch. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 9 +

[libvirt] [PATCH v2 3/3] news: Update for the ccf-assist pSeries feature

2019-10-08 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index d9c402e6bb..b8002368ae 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -41,6 +41,15 @@ + + + qemu:

[libvirt] [PATCH v2 1/3] qemu: Add capability for the ccf-assist pSeries feature

2019-10-08 Thread Daniel Henrique Barboza
Linux kernel 5.1 added a new PPC KVM capability named KVM_PPC_CPU_CHAR_BCCTR_FLUSH_ASSIST, which is exposed to the QEMU guest since QEMU commit 8ff43ee404d under a new sPAPR capability called SPAPR_CAP_CCF_ASSIST. This cap indicates whether the processor supports hardware acceleration for the

[libvirt] [PATCH v2 0/3] Adding the 'ccf-assist' pSeries capability

2019-10-08 Thread Daniel Henrique Barboza
changes in v2: - rebased with newer master (412cc0f403) - changed the 'news' text to be in the v5.9.0 section Hi, This short series exposes, implements and documents a pSeries guest capability called Count Cache Flush Assist (ccf-assist), which was added in the Linux kernel since 5.1 and in QEMU

Re: [libvirt] [PATCH 0/2] Fix ppc64 CPU configuration for QEMU 2.11+

2019-10-08 Thread Ján Tomko
On Tue, Oct 08, 2019 at 02:53:08PM +0200, Jiri Denemark wrote: The original fix was both incomplete and too general. It only fixed domain startup, but libvirt would still report empty list of supported CPU models with recent QEMU for ppc64. On the other hand, while ppc64 QEMU ignores case when

Re: [libvirt] [PATCH v2 17/23] conf: convert over to use GRegex for regular expressions

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:19PM +0100, Daniel P. Berrangé wrote: Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/conf/domain_event.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc

Re: [libvirt] [PATCH v2 16/23] libxl: convert over to use GRegex for regular expressions

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:18PM +0100, Daniel P. Berrangé wrote: Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/libxl/libxl_capabilities.c | 42 +++--- 1 file changed, 19 insertions(+), 23 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH v2 15/23] util: convert virIdentity class to use GObject

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:17PM +0100, Daniel P. Berrangé wrote: Converting from virObject to GObject is reasonably straightforward, as illustrated by this patch for virIdentity In the header file - Remove typedef struct _virIdentity virIdentity - Add #define VIR_TYPE_IDENTITY

Re: [libvirt] [PATCH v2 14/23] remote: convert methods using virIdentityPtr to auto free macros

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:16PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon.c | 3 +-- src/remote/remote_daemon_dispatch.c | 35 ++--- 2 files changed, 13 insertions(+), 25 deletions(-) Reviewed-by: Ján

Re: [libvirt] [PATCH v2 13/23] rpc: convert methods using virIdentityPtr to auto free macros

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:15PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/rpc/virnetserverclient.c | 47 ++ src/rpc/virnetserverprogram.c | 13 +++--- tests/virnetserverclienttest.c | 3 +-- 3 files changed, 23

Re: [libvirt] [PATCH v2 12/23] admin: convert admin server code to use auto free macros

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:14PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/admin/admin_server.c | 204 --- 1 file changed, 85 insertions(+), 119 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt] [PATCH 0/7] security: apparmor: prep for qcow2 data_file

2019-10-08 Thread Cole Robinson
On 10/8/19 12:22 PM, Cole Robinson wrote: This series does some preparation cleanup and refactoring to simplify adding qcow2 data_file support to the apparmor driver. More info on the qcow2 feature and libvirt work here: https://www.redhat.com/archives/libvir-list/2019-October/msg00303.html

Re: [libvirt] [PATCH 00/30] storagefile, security: qcow2 data_file support

2019-10-08 Thread Cole Robinson
On 10/8/19 1:52 AM, Christian Ehrhardt wrote: On Mon, Oct 7, 2019 at 11:49 PM Cole Robinson wrote: This series is the first steps to teaching libvirt about qcow2 data_file support, aka external data files or qcow2 external metadata. A bit about the feature: it was added in qemu 4.0. It

[libvirt] [PATCH 7/7] security: apparmor: Make storage_source_add_files recursively callable

2019-10-08 Thread Cole Robinson
This will simplify adding support for qcow2 external data_file Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index b675572144..d9f6b5638b

[libvirt] [PATCH 0/7] security: apparmor: prep for qcow2 data_file

2019-10-08 Thread Cole Robinson
This series does some preparation cleanup and refactoring to simplify adding qcow2 data_file support to the apparmor driver. More info on the qcow2 feature and libvirt work here: https://www.redhat.com/archives/libvir-list/2019-October/msg00303.html Cole Robinson (7): conf: Move

[libvirt] [PATCH 2/7] security: apparmor: Remove unused ignoreOpenFailure

2019-10-08 Thread Cole Robinson
true is always passed here, so delete the unused code path and adjust the associated comment Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/security/virt-aa-helper.c

[libvirt] [PATCH 3/7] security: apparmor: Drop disk_foreach_iterator

2019-10-08 Thread Cole Robinson
There's only one caller, so open code the file_add_path behavior Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index

[libvirt] [PATCH 6/7] security: apparmor: Use only virStorageSource for disk paths

2019-10-08 Thread Cole Robinson
This is closer to what security_selinux.c does, and will help add support for qcow2 external data_files Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/security/virt-aa-helper.c

[libvirt] [PATCH 5/7] security: apparmor: Push virStorageSource checks to add_file_path

2019-10-08 Thread Cole Robinson
This mirrors the code layout in security_selinux.c. It will also make it easier to share the checks for qcow2 external data_file support eventually Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH 1/7] conf: Move -virDomainDiskDefForeachPath to virt-aa-helper

2019-10-08 Thread Cole Robinson
It is the only user. Rename it to match the local style Signed-off-by: Cole Robinson --- src/conf/domain_conf.c| 42 - src/conf/domain_conf.h| 10 --- src/libvirt_private.syms | 1 - src/security/virt-aa-helper.c | 50

[libvirt] [PATCH 4/7] security: apparmor: Pass virStorageSource to add_file_path

2019-10-08 Thread Cole Robinson
The virStorageSource must have everything it needs Signed-off-by: Cole Robinson --- src/security/virt-aa-helper.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 7148e3c760..9f39eb2e2b 100644

Re: [libvirt] [jenkins-ci PATCH v2 12/12] Switch libvirt-dbus to Meson

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/playbooks/build/projects/libvirt-dbus.yml >vars: > # flake8 and pyflakes versions available on FreeBSD (3.5.0 and 2.0.0 > -# respectively) are not compatible > +# respectively) are not compatible. > +#

Re: [libvirt] [jenkins-ci PATCH v2 11/12] libvirt-dbus: Remove misleading comment

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/jenkins/projects/libvirt-dbus.yaml > @@ -21,8 +21,7 @@ > - libvirt-fedora-rawhide >- autotools-check-job: >parent_jobs: 'libvirt-dbus-syntax-check' > - # Python 3 version in Ubuntu 16.04

Re: [libvirt] [jenkins-ci PATCH v2 09/12] virt-manager: Build again on Debian9 and Ubuntu18

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/host_vars/libvirt-centos-7/main.yml > @@ -10,6 +10,7 @@ projects: >- libvirt-python >- osinfo-db >- osinfo-db-tools > + - virt-manager >- virt-viewer This hunk... > +++

Re: [libvirt] [jenkins-ci PATCH v2 10/12] libvirt-dbus: Take advantage of Python 3 on CentOS 7

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/playbooks/build/projects/libvirt-dbus.yml > @@ -9,10 +9,10 @@ > - include: '{{ playbook_base }}/jobs/autotools-build-job.yml' > - include: '{{ playbook_base }}/jobs/autotools-syntax-check-job.yml' >vars: > -#

Re: [libvirt] [jenkins-ci PATCH v2 05/12] guests: Install meson via pip

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/lcitool > pkg_align = " \\\n" + (" " * len("RUN " + package_manager + " ")) > +pip_pkg_align = " \\\n" + (" " * len("RUN pip3 install ")) s/pip3 install /pip3 / > +if pip_pkgs: > +

Re: [libvirt] [jenkins-ci PATCH v2 08/12] libosinfo: Build again on all machines

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > As now we've the needed packages for building and testing libosinfo > on all systems supported by libvirt-jenkins-ci, let's build libosinfo > everywhere. > > RPM build is still not possible in CentOS7 as it doesn't have the > needed RPM

Re: [libvirt] [jenkins-ci PATCH v2 07/12] osinfo-db: Build again on all machines

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/playbooks/build/projects/osinfo-db.yml > @@ -21,14 +21,12 @@ >$MAKE install OSINFO_DB_TARGET="--system" > - include: '{{ playbook_base }}/jobs/generic-check-job.yml' >vars: > +machines: '{{ all_machines }}'

[libvirt] [PATCH v2 5/5] build: merge all syntax-check logic into one file

2019-10-08 Thread Daniel P . Berrangé
The gnulib syntax-check rules are spread across GNUmakefile, cfg.mk and maint.mk. This made sense when we were getting two of the files from the gnulib submodule. Now that we own all files though, we can at least merge maint.mk and cfg.mk together. GNUmakefile can be eliminated when we switch to

[libvirt] [PATCH v2 4/5] build: delete all syntax check rules we're skipping

2019-10-08 Thread Daniel P . Berrangé
If we've marked rules as skipped, there's no sense keeping them in the maint.mk file. Signed-off-by: Daniel P. Berrangé --- build-aux/cfg.mk | 38 --- build-aux/maint.mk | 245 - 2 files changed, 283 deletions(-) diff --git a/build-aux/cfg.mk

[libvirt] [PATCH v2 3/5] build: remove all logic unrelated to syntax-check

2019-10-08 Thread Daniel P . Berrangé
The standard maint.mk from gnulib provides alot more than just the 'syntax-check' target. This can all be purged to give a more minimal file. Signed-off-by: Daniel P. Berrangé --- GNUmakefile| 42 build-aux/cfg.mk | 10 - build-aux/maint.mk | 473

[libvirt] [PATCH v2 0/5] build: take full ownership of syntax-check from gnulib

2019-10-08 Thread Daniel P . Berrangé
Our syntax-check rule relies in various files imported during the gnulib bootstrap process. As we switch to meson & try to eliminate gnulib, we need to take ownership of syntax-check. This patch series follows the approach taken for libosinfo & other projects wrt syntax-check rules, but goes a

[libvirt] [PATCH v2 2/5] build: move syntax-check code into build-aux directory

2019-10-08 Thread Daniel P . Berrangé
The syntax-check rules are the one bit of make usage that will stay around for a while after the meson conversion. Move them into the build-aux directory in preparation for refactoring to make them independent from automake. Signed-off-by: Daniel P. Berrangé --- GNUmakefile|

[libvirt] [PATCH v2 1/5] build: import gnulib's syntax-check make rules

2019-10-08 Thread Daniel P . Berrangé
We're going to be eliminating autotools and gnulib, but we still wish to have the 'make syntax-check' functionality. This imports the minimal set of gnulib files required to keep this working. Signed-off-by: Daniel P. Berrangé --- .gitignore |9 +- GNUmakefile

Re: [libvirt] [jenkins-ci PATCH v2 03/12] mappings: Add python3-pip

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > +++ b/guests/vars/mappings.yml > @@ -790,6 +790,12 @@ mappings: >python2-setuptools: > CentOS7: python2-setuptools > > + python3-pip: > +CentOS7: python3-pip > +Debian9: python3-pip > +Ubuntu16: python3-pip > +

Re: [libvirt] [jenkins-ci PATCH v2 02/12] guests: Add python2-setuptools to the base project

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > Signed-off-by: Fabiano Fidêncio > --- > guests/vars/projects/base.yml | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list

Re: [libvirt] [PATCH] build: stop clang complaining about redefined typedefs

2019-10-08 Thread Peter Krempa
On Tue, Oct 08, 2019 at 15:39:22 +0100, Daniel Berrange wrote: > Clang's gnu99 mode is not quite the same as GCC's. It will complain > about redefined typedefs being a C11 feature, while GCC does not > complain and allows them in GNU99. > > Signed-off-by: Daniel P. Berrangé > --- > >

Re: [libvirt] [jenkins-ci PATCH v2 01/12] mappings: Add python2-setuptools

2019-10-08 Thread Andrea Bolognani
On Tue, 2019-10-08 at 09:58 +0200, Fabiano Fidêncio wrote: > python-setuptools, which will only be used on CentOS7, is needed in order > to properly use the pip module for installing meson. > > Without this package, we would see failures as `ImportError: No module > named pkg_resources` when

Re: [libvirt] [PATCH] build: stop clang complaining about redefined typedefs

2019-10-08 Thread Fabiano Fidêncio
On Tue, Oct 8, 2019 at 5:14 PM Daniel P. Berrangé wrote: > > Clang's gnu99 mode is not quite the same as GCC's. It will complain > about redefined typedefs being a C11 feature, while GCC does not > complain and allows them in GNU99. > > Signed-off-by: Daniel P. Berrangé > --- > > Technically a

[libvirt] [PATCH] tests: delete objectlocking test code

2019-10-08 Thread Daniel P . Berrangé
The object locking test code is not run by any CI tests and has bitrotted to the point where it isn't worth the effort to try to fix it. Signed-off-by: Daniel P. Berrangé --- .gitignore | 3 - configure.ac | 12 - tests/Makefile.am | 29 +- tests/objectlocking.ml

[libvirt] [PATCH] build: stop clang complaining about redefined typedefs

2019-10-08 Thread Daniel P . Berrangé
Clang's gnu99 mode is not quite the same as GCC's. It will complain about redefined typedefs being a C11 feature, while GCC does not complain and allows them in GNU99. Signed-off-by: Daniel P. Berrangé --- Technically a build breaker fix, but given my track record of breaking the build

Re: [libvirt] [PATCH v2 11/23] access: convert polkit driver to auto free memory

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:13PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/access/viraccessdriverpolkit.c | 38 +++--- 1 file changed, 14 insertions(+), 24 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt] [PATCH v2 10/23] util: convert virIdentity implementation and test suite to g_autoptr

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:12PM +0100, Daniel P. Berrangé wrote: To simplify the later conversion from virObject to GObject, introduce the use of g_autoptr to the virIdentity implementnation and test suite. Signed-off-by: Daniel P. Berrangé --- src/util/viridentity.c | 40

Re: [libvirt] [PATCH v2 09/23] util: use glib base64 encoding/decoding APIs

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:11PM +0100, Daniel P. Berrangé wrote: Replace use of the gnulib base64 module with glib's own base64 API family. Signed-off-by: Daniel P. Berrangé --- bootstrap.conf| 1 - configure.ac | 5 - src/conf/virsecretobj.c

Re: [libvirt] [PATCH v2 08/23] conf: convert virSecretObj APIs to use autofree

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:10PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/conf/virsecretobj.c | 46 +++-- 1 file changed, 17 insertions(+), 29 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt] [libvirt-dbus] [PATCH 0/2] Implement Snaphots

2019-10-08 Thread Fabiano Fidêncio
Simon, On Mon, Oct 7, 2019 at 5:30 PM Simon Kobyda wrote: > > Implement snapshot interface and its APIs. > Apart from the comments made by Jano, I'd strongly recommend to have this series rebased atop of Pavel Hrdina's series switching libvirt-dbus to meson. His series is already reviewed and

Re: [libvirt] [PATCH v2 07/23] src: add support for g_autoptr with virObject instances

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:09PM +0100, Daniel P. Berrangé wrote: Libvirt currently uses the VIR_AUTOUNREF macro for auto cleanup of virObject instances. GLib approaches things differently with GObject, reusing their g_autoptr() concept. This introduces support for g_autoptr() with virObject,

Re: [libvirt] [PATCH v2 06/23] util: rewrite auto cleanup macros to use glib's equivalent

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:08PM +0100, Daniel P. Berrangé wrote: To facilitate porting over to glib, this rewrites the auto cleanup macros to use glib's equivalent. As a result it is now possible to use g_autoptr/VIR_AUTOPTR, and g_auto/VIR_AUTOCLEAN, g_autofree/VIR_AUTOFREE interchangably,

Re: [libvirt] [PATCH 5/5] Revert "src: Document autostart for session demon"

2019-10-08 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 11:11:23AM +0200, Michal Privoznik wrote: > This reverts commit 61b4e8aaf1bce07f282c152de556c3d6aa8d65be. > > After previous commits this is no longer needed. > > Signed-off-by: Michal Privoznik > --- > src/libvirt-domain.c | 5 - > 1 file changed, 5 deletions(-)

Re: [libvirt] [PATCH 4/5] news: Document autostart fix

2019-10-08 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 11:11:22AM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > docs/news.xml | 15 +++ > 1 file changed, 15 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-

Re: [libvirt] [PATCH 3/5] lib: autostart objects exactly once

2019-10-08 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 11:11:21AM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1755303 > > With the recent work in daemon split and socket activation > daemons can come and go. They can and will be started many times > during a session which results in objects

Re: [libvirt] [PATCH 2/5] driver: Introduce virDriverShouldAutostart()

2019-10-08 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 11:11:20AM +0200, Michal Privoznik wrote: > Some of objects we manage can be autostarted on libvirtd startup > (e.g. domains, network, storage pools). The idea was that when > the host is started up these objects are started too without need > of user intervention. However,

Re: [libvirt] [PATCH 1/5] qemu_driver: Fix comment of qemuStateCleanup()

2019-10-08 Thread Daniel P . Berrangé
On Mon, Oct 07, 2019 at 11:11:19AM +0200, Michal Privoznik wrote: > The comment says that the function kills domains and networks. > This is obviously not the case. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [libvirt] [PATCH v2 05/23] util: convert virSystemdActivation to use VIR_DEFINE_AUTOPTR_FUNC

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:07PM +0100, Daniel P. Berrangé wrote: Using the standard macro will facilitate the conversion to glib's auto cleanup macros. Signed-off-by: Daniel P. Berrangé --- src/util/virsystemd.c | 10 +- src/util/virsystemd.h | 5 +++-- tests/virsystemdtest.c | 2

Re: [libvirt] [PATCH v2 04/23] util: use glib string allocation/formatting functions

2019-10-08 Thread Daniel P . Berrangé
On Tue, Oct 08, 2019 at 03:49:50PM +0200, Ján Tomko wrote: > On Mon, Oct 07, 2019 at 06:14:06PM +0100, Daniel P. Berrangé wrote: > > Convert the string duplication APIs to use the g_strdup family of APIs. > > > > We previously used the 'strdup-posix' gnulib module because mingw does > > not set

Re: [libvirt] [PATCH v2 04/23] util: use glib string allocation/formatting functions

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:06PM +0100, Daniel P. Berrangé wrote: Convert the string duplication APIs to use the g_strdup family of APIs. We previously used the 'strdup-posix' gnulib module because mingw does not set errno to ENOMEM on failure We previously used the 'strndup' gnulib module

[libvirt] [PATCH] m4: fix setting of warning flags

2019-10-08 Thread Daniel P . Berrangé
When adding the -std=gnu99 flag, we set $wantwarn instead of appending to it. This meant all the compiler warnings were accidentally discarded. Signed-off-by: Daniel P. Berrangé --- Pushed as a trivial fix for the previous commit m4/virt-compile-warnings.m4 | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH v2 03/23] util: use glib memory allocation functions

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:05PM +0100, Daniel P. Berrangé wrote: Convert the VIR_ALLOC family of APIs with use of the g_malloc family of APIs. Use of VIR_ALLOC related functions should be incrementally phased out over time, allowing return value checks to be dropped. Use of VIR_FREE should be

Re: [libvirt] [PATCH v2 02/23] build: link to glib library

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:04PM +0100, Daniel P. Berrangé wrote: Add the main glib.h to internal.h so that all common code can use it. Historically glib allowed applications to register an alternative memory allocator, so mixing g_malloc/g_free with malloc/free was not safe. This was

Re: [libvirt] [PATCH v2 01/23] build: probe for glib-2 library in configure

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 06:14:03PM +0100, Daniel P. Berrangé wrote: Prepare for linking with glib by probing for it at configure time. Per supported platforms target, the min glib versions on relevant distros are: RHEL-8: 2.56.1 RHEL-7: 2.50.3 Debian (Buster): 2.58.3 Debian (Stretch):

Re: [libvirt] [libvirt-dbus] [PATCH 2/2] Implement snapshots APIs

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 05:22:34PM +0200, Simon Kobyda wrote: Signed-off-by: Simon Kobyda --- data/org.libvirt.Domain.xml | 26 data/org.libvirt.DomainSnapshot.xml | 34 + src/domain.c| 158 + src/domainsnapshot.c| 204

Re: [libvirt] [libvirt-dbus] [PATCH 1/2] Introduce Domain Snapshot Interface

2019-10-08 Thread Ján Tomko
On Mon, Oct 07, 2019 at 05:22:33PM +0200, Simon Kobyda wrote: Signed-off-by: Simon Kobyda --- data/Makefile.am| 1 + data/org.libvirt.DomainSnapshot.xml | 7 +++ src/Makefile.am | 2 + src/connect.c | 6 +++ src/connect.h

[libvirt] [PATCH 1/2] Revert "domcaps: Treat host models as case-insensitive strings"

2019-10-08 Thread Jiri Denemark
This reverts commit 2d8721e2606806164782028ecf1ee33a9bbaa8fe. This fix was both incomplete and too general. It only fixed domain startup, but libvirt would still report empty list of supported CPU models with recent QEMU for ppc64. On the other hand, while ppc64 QEMU ignores case when looking up

[libvirt] [PATCH 0/2] Fix ppc64 CPU configuration for QEMU 2.11+

2019-10-08 Thread Jiri Denemark
The original fix was both incomplete and too general. It only fixed domain startup, but libvirt would still report empty list of supported CPU models with recent QEMU for ppc64. On the other hand, while ppc64 QEMU ignores case when looking up CPU model names, x86_64 QEMU does case sensitive

[libvirt] [PATCH 2/2] qemu: Adapt to changed ppc64 CPU model names

2019-10-08 Thread Jiri Denemark
QEMU 2.11 for ppc64 changed all CPU model names to lower case. Since libvirt can't change the model names for compatibility reasons, we need to translate the matching lower case models to the names known by libvirt. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c

Re: [libvirt] [PATCH 1/3] conf: Set rebootTimeout valid range to 0..0xffff

2019-10-08 Thread Han Han
On Tue, Oct 8, 2019 at 5:50 PM Michal Privoznik wrote: > On 10/8/19 10:36 AM, Han Han wrote: > > Adjust valid range of rebootTimeout according to qemu-4.0.0 commit > > ee5d0f89de3. > > > > Signed-off-by: Han Han > > --- > > src/conf/domain_conf.c | 6 -- > > 1 file changed, 4

Re: [libvirt] [PATCH 00/22] qemu: Store default CPU in domain XML

2019-10-08 Thread Jiri Denemark
On Mon, Oct 07, 2019 at 17:24:11 +0200, Andrea Bolognani wrote: > On Thu, 2019-10-03 at 16:00 +0200, Jiri Denemark wrote: > > When starting a domain without a CPU model specified in the domain XML, > > QEMU will choose a default one. Which is fine unless the domain gets > > migrated to another

Re: [libvirt] [PATCH 3/3] qemu: Adapt to changed ppc64 CPU model names

2019-10-08 Thread Jiri Denemark
Resurrecting an old forgotten series... It should fix PPC64 issues with my recent "qemu: Store default CPU in domain XML" patches. On Tue, May 22, 2018 at 16:51:44 +0200, Andrea Bolognani wrote: > On Tue, 2018-05-22 at 15:46 +0200, Jiri Denemark wrote: > > On Tue, May 22, 2018 at 11:02:17 +0200,

Re: [libvirt] [PATCH 00/22] qemu: Store default CPU in domain XML

2019-10-08 Thread Andrea Bolognani
On Thu, 2019-10-03 at 16:00 +0200, Jiri Denemark wrote: > When starting a domain without a CPU model specified in the domain XML, > QEMU will choose a default one. Which is fine unless the domain gets > migrated to another host because libvirt doesn't perform any CPU ABI > checks and the virtual

[libvirt] [dockerfiles PATCH] Refresh after adding Meson, GLib and flake8

2019-10-08 Thread Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is 97340ae946d4. Signed-off-by: Andrea Bolognani --- Pushed under the Dockerfiles refresh rule. buildenv-libosinfo-debian-10.zip | Bin 629 -> 638 bytes buildenv-libosinfo-debian-sid.zip | Bin 629 -> 638 bytes

[libvirt] [PATCH 1/1] qemu: fix type of default video device

2019-10-08 Thread Pavel Mores
If a graphics device is added to XML that has no video device, libvirt automatically adds a video device which is always of type 'cirrus', even if the underlying qemu doesn't support cirrus. This patch refines a bit the decision about the type of the video device. Based on QEMU capabilities,

[libvirt] [PATCH 0/1] qemu: fix type of default video device

2019-10-08 Thread Pavel Mores
This patch does seem to fix the original bug as it was reported, however it also raises the broader question of how exactly to decide under various circumstances what the type of the video device we're silently adding should be. This patch is meant to be an initial suggestion to kick off

Re: [libvirt] [PATCH 08/22] qemu: Flatten qemuMonitorCPUDefs.cpus

2019-10-08 Thread Ján Tomko
On Thu, Oct 03, 2019 at 04:00:26PM +0200, Jiri Denemark wrote: Let's store qemuMonitorCPUDefInfo directly in the array of CPUs in qemuMonitorCPUDefs rather then using an array of pointers. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_monitor.c |

Re: [libvirt] [jenkins-ci PATCH] guests: add flake8 to libvirt project

2019-10-08 Thread Fabiano Fidêncio
On Tue, Oct 8, 2019 at 11:57 AM Daniel P. Berrangé wrote: > > Signed-off-by: Daniel P. Berrangé > --- > guests/vars/projects/libvirt.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/guests/vars/projects/libvirt.yml > b/guests/vars/projects/libvirt.yml > index 04c3ecd..8fcb286

[libvirt] [jenkins-ci PATCH] guests: add flake8 to libvirt project

2019-10-08 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- guests/vars/projects/libvirt.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml index 04c3ecd..8fcb286 100644 --- a/guests/vars/projects/libvirt.yml +++

Re: [libvirt] [PATCH 1/3] conf: Set rebootTimeout valid range to 0..0xffff

2019-10-08 Thread Michal Privoznik
On 10/8/19 10:36 AM, Han Han wrote: Adjust valid range of rebootTimeout according to qemu-4.0.0 commit ee5d0f89de3. Signed-off-by: Han Han --- src/conf/domain_conf.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

Re: [libvirt] [PATCH 0/3] Update rebootTimeout range to 0..0xffff

2019-10-08 Thread Michal Privoznik
On 10/8/19 10:36 AM, Han Han wrote: Since qemu v4.0.0(commit ee5d0f89de3), reboot-timeout valid range was set 0~0x. Update libvirt codes, docs, tests for that change. I am not sure if po files should be updated. If so, please point it out. No, they are refreshed just before release.

[libvirt] [PATCH 1/2] qemu: Fix @vm locking issue when connecting to the monitor

2019-10-08 Thread Michal Privoznik
When connecting to qemu's monitor the @vm object is unlocked. This is justified - connecting may take a long time and we don't want to wait with the domain object locked. However, just before the domain object is locked again, the monitor's FD is registered in the event loop. Therefore, there is a

[libvirt] [PATCH 2/2] Revert "qemu: Obtain reference on monConfig"

2019-10-08 Thread Michal Privoznik
This reverts commit a5a777a8bae61cb9e41c4dcd12d2962ad1a65a0d. After previous commit the domain won't disappear while connecting to monitor. There's no need to ref monitor config then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 5 + 1 file changed, 1 insertion(+), 4

[libvirt] [PATCH 0/2] qemu: Fix @vm locking issue when connecting to the monitor

2019-10-08 Thread Michal Privoznik
See 1/2 for explanation. Michal Prívozník (2): qemu: Fix @vm locking issue when connecting to the monitor Revert "qemu: Obtain reference on monConfig" src/qemu/qemu_monitor.c | 33 + src/qemu/qemu_process.c | 17 +

[libvirt] [PATCH 3/3] docs: Update docs on rebootTimeout valid value range

2019-10-08 Thread Han Han
Signed-off-by: Han Han --- docs/formatdomain.html.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 647f96f651..8a6f289df7 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -274,9 +274,8

  1   2   >