[libvirt PATCH v2 0/1] cirrus: Add templates and refresh script

2020-06-29 Thread Andrea Bolognani
This makes the Cirrus CI configurations as maintainable as the Dockerfiles, by shifting the responsability of keeping the list of dependencies and other details up to date to lcitool. Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/161289292 For the refresh script to work, your

[libvirt PATCH v2 1/1] cirrus: Generate jobs dynamically

2020-06-29 Thread Andrea Bolognani
Instead of having static job definitions for FreeBSD and macOS, use a generic template for both and fill in the details that are actually different, such as the list of packages to install, in the GitLab CI job, right before calling cirrus-run. The target-specific information are provided by lcito

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 17:35 +0100, Daniel P. Berrangé wrote: > On Mon, Jun 29, 2020 at 06:08:27PM +0200, Erik Skultety wrote: > > On Mon, Jun 29, 2020 at 03:32:22PM +0100, Daniel P. Berrangé wrote: > > > This part can then be stored in ci/cirrus/build.yml since it is > > > common to freebsd & macos

Re: kvm-hint-dedicated requires host CPU passthrough?

2020-06-29 Thread Wim ten Have
Oh, I also see that my claws-mail filters are in chaos and that there's additional email to this mail-thread. On Thu, 21 May 2020 16:14:34 +0100 Stefan Hajnoczi wrote: > On Wed, May 20, 2020 at 07:23:32PM +0200, Paolo Bonzini wrote: > > On 20/05/20 19:13, Stefan Hajnoczi wrote: > > > Hi, > > >

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Daniel P . Berrangé
On Mon, Jun 29, 2020 at 06:08:27PM +0200, Erik Skultety wrote: > On Mon, Jun 29, 2020 at 03:32:22PM +0100, Daniel P. Berrangé wrote: > > On Mon, Jun 29, 2020 at 03:58:43PM +0200, Andrea Bolognani wrote: > > > This is similar to what we already use for Dockerfiles, with one > > > key difference: whi

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Daniel P . Berrangé
On Mon, Jun 29, 2020 at 06:27:40PM +0200, Andrea Bolognani wrote: > On Mon, 2020-06-29 at 15:32 +0100, Daniel P. Berrangé wrote: > > On Mon, Jun 29, 2020 at 03:58:43PM +0200, Andrea Bolognani wrote: > > > +for infile in templates/* > > > +do > > > +outfile="${infile##*/}.j2" > > > +host="${

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 15:32 +0100, Daniel P. Berrangé wrote: > On Mon, Jun 29, 2020 at 03:58:43PM +0200, Andrea Bolognani wrote: > > +for infile in templates/* > > +do > > +outfile="${infile##*/}.j2" > > +host="${outfile%%.*}" > > + > > +eval $("$LCITOOL" dockerfile "libvirt-$host" libv

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Erik Skultety
On Mon, Jun 29, 2020 at 03:32:22PM +0100, Daniel P. Berrangé wrote: > On Mon, Jun 29, 2020 at 03:58:43PM +0200, Andrea Bolognani wrote: > > This is similar to what we already use for Dockerfiles, with one > > key difference: while we still rely on lcitool taking care of the > > complicated work for

Re: [PATCH] virConnectGetAllDomainStats: Document two vcpu stats

2020-06-29 Thread Erik Skultety
On Mon, Jun 29, 2020 at 04:43:09PM +0200, Michal Privoznik wrote: > When introducing vcpu..wait (v1.3.2-rc1~301) and > vcpu..halted (v2.4.0-rc1~36) the documentation was > not written. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Erik Skultety

[PATCH] virConnectGetAllDomainStats: Document two vcpu stats

2020-06-29 Thread Michal Privoznik
When introducing vcpu..wait (v1.3.2-rc1~301) and vcpu..halted (v2.4.0-rc1~36) the documentation was not written. Signed-off-by: Michal Privoznik --- src/libvirt-domain.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 60b5e65fc3..52ce3ef

Re: [libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Daniel P . Berrangé
On Mon, Jun 29, 2020 at 03:58:43PM +0200, Andrea Bolognani wrote: > This is similar to what we already use for Dockerfiles, with one > key difference: while we still rely on lcitool taking care of the > complicated work for us, in this case we're only provided with a > bunch of variables and we hav

[libvirt PATCH 2/3] cirrus: Add templates and refresh script

2020-06-29 Thread Andrea Bolognani
This is similar to what we already use for Dockerfiles, with one key difference: while we still rely on lcitool taking care of the complicated work for us, in this case we're only provided with a bunch of variables and we have to do the last bit of work (that is replacing them inside an existing te

[libvirt PATCH 0/3] cirrus: Add templates and refresh script

2020-06-29 Thread Andrea Bolognani
This makes the Cirrus CI configurations as maintainable as the Dockerfiles, by shifting the responsability of keeping the list of dependencies and other details up to date to lcitool. Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/161179474 The important job is the macOS one.

[libvirt PATCH 1/3] cirrus: Tweak configurations

2020-06-29 Thread Andrea Bolognani
Store the list of packages to install in an environment variable. This will make it easier to review the changes that are coming next. Signed-off-by: Andrea Bolognani --- ci/cirrus/freebsd-12.yml.j2 | 54 ++--- ci/cirrus/macos-1015.yml.j2 | 17 ++-- 2 file

[libvirt PATCH 3/3] cirrus: Refresh configurations

2020-06-29 Thread Andrea Bolognani
The information is coming from lcitool now, so it's more complete: this is immediately apparent when looking at the number of additional packages that end up being installed on macOS. This commit is best viewed with 'git show --word-diff'. Signed-off-by: Andrea Bolognani --- ci/cirrus/freebsd-1

Re: [RFC 08/21] conf: Generate virNetworkDNSTxtDefFormatBuf

2020-06-29 Thread Daniel P . Berrangé
On Mon, Jun 29, 2020 at 03:13:30PM +0200, Peter Krempa wrote: > On Mon, Jun 29, 2020 at 13:52:51 +0100, Daniel Berrange wrote: > > On Wed, Jun 10, 2020 at 09:20:36AM +0800, Shi Lei wrote: > > > Signed-off-by: Shi Lei > > > --- > > > src/conf/network_conf.c | 4 ++-- > > > src/conf/network_conf.h

Re: [RFC 08/21] conf: Generate virNetworkDNSTxtDefFormatBuf

2020-06-29 Thread Peter Krempa
On Mon, Jun 29, 2020 at 13:52:51 +0100, Daniel Berrange wrote: > On Wed, Jun 10, 2020 at 09:20:36AM +0800, Shi Lei wrote: > > Signed-off-by: Shi Lei > > --- > > src/conf/network_conf.c | 4 ++-- > > src/conf/network_conf.h | 2 +- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff

Re: kvm-hint-dedicated requires host CPU passthrough?

2020-06-29 Thread Wim ten Have
Hi Stefan, sorry for my very late response as I was temporarily out and unfortunately missed this email thread. For your question (remark), yes, you're right. This feature should not apply to specific scenario. Something else to look into is that the feature can only work if the serving layer u

Re: [RFC 00/21] RFC: Generate parsexml/formatbuf functions based on directives

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:28AM +0800, Shi Lei wrote: > > Last RFC: > [https://www.redhat.com/archives/libvir-list/2020-April/msg00970.html] > In last RFC, I suggested we can generate object-model code based on relax-ng > files and Daniel gave it some comments. > > Follow the suggestion from

Re: [RFC 11/21] conf: Generate virNetworkDNSSrvDefFormatBuf

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:39AM +0800, Shi Lei wrote: > Signed-off-by: Shi Lei > --- > src/conf/network_conf.c | 18 ++ > src/conf/network_conf.h | 4 ++-- > 2 files changed, 4 insertions(+), 18 deletions(-) > > diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c >

Re: [RFC 08/21] conf: Generate virNetworkDNSTxtDefFormatBuf

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:36AM +0800, Shi Lei wrote: > Signed-off-by: Shi Lei > --- > src/conf/network_conf.c | 4 ++-- > src/conf/network_conf.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c > index 964a8a7..b80

Re: [RFC 07/21] conf: Replace virNetworkDNSTxtDefParseXML(hardcoded) with namesake(generated)

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:35AM +0800, Shi Lei wrote: > Signed-off-by: Shi Lei > --- > po/POTFILES.in | 1 + > src/conf/Makefile.inc.am | 2 ++ > src/conf/network_conf.c | 47 ++-- > src/conf/network_conf.h | 8 --- > 4 files changed, 15 i

Re: [RFC 05/21] util: Add two helper functions virXMLChildNode and virXMLChildNodeSet

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:33AM +0800, Shi Lei wrote: > Add these helper functions to parse xml without using xmlXPathContext. > > Signed-off-by: Shi Lei > --- > src/util/virxml.c | 57 +++ > src/util/virxml.h | 3 +++ > 2 files changed, 60 inserti

Re: [RFC 04/21] maint: Add helper macro VIR_USED

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:32AM +0800, Shi Lei wrote: > The macro VIR_USED is used in generated parse/format functions to > avoid args-unused warnings. I mentioned in the earlier patch that we can just use G_GNUC_UNUSED on any parameters which might be unused. It doesn't matter if they really a

Re: [RFC 02/21] maint: Check libclang and its python3 binding

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:30AM +0800, Shi Lei wrote: > Make sure libclang and its python3 binding have been installed. > > Signed-off-by: Shi Lei > --- > configure.ac | 12 > 1 file changed, 12 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 6c8ac2f..747e52a

Re: [RFC 01/21] build-aux: Add a tool to generate xml parse/format functions

2020-06-29 Thread Daniel P . Berrangé
On Wed, Jun 10, 2020 at 09:20:29AM +0800, Shi Lei wrote: > This tool is used to generate parsexml/formatbuf functions for structs. > It is based on libclang and its python-binding. > Some directives (such as genparse, xmlattr, etc.) need to be added on > the declarations of structs to direct the to

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 07:47 -0300, Daniel Henrique Barboza wrote: > On 6/29/20 5:44 AM, Andrea Bolognani wrote: > > For libvirt specifically, our documentation[1] states > > > >As a rule, patches should be sent to the mailing list only: all > >developers are subscribed to libvir-list and r

Re: [PATCH v2 for 6.5.0] domain_conf: Remove zPCI validation from formatter

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 12:57 +0200, Michal Privoznik wrote: > In 076591009ad a validation code was added to > virDomainDeviceInfoFormat() which reports an error if zPCI > address entered in was incomplete. But, there are two problems > with this approach. > > The first problem is the placement of t

[PATCH v2 for 6.5.0] domain_conf: Remove zPCI validation from formatter

2020-06-29 Thread Michal Privoznik
In 076591009ad a validation code was added to virDomainDeviceInfoFormat() which reports an error if zPCI address entered in was incomplete. But, there are two problems with this approach. The first problem is the placement of the code - it doesn't belong into XML formatter rather than XML validato

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-29 Thread Daniel Henrique Barboza
On 6/29/20 5:44 AM, Andrea Bolognani wrote: On Sun, 2020-06-28 at 09:25 -0300, Daniel Henrique Barboza wrote: On 6/27/20 10:32 AM, Andrea Bolognani wrote: In the future, please don't include CC tags in your commits: removing them results in extra work when picking up a patch, and it's also g

Re: [PATCH 2/3] domain_conf: Move zPCI validation from formatter to validator

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 12:01 +0200, Michal Privoznik wrote: > On 6/29/20 11:58 AM, Andrea Bolognani wrote: > > On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote: > > > +++ b/src/qemu/qemu_validate.c > > > @@ -1028,6 +1028,12 @@ > > > qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInf

Re: [PATCH 3/3] qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote: > +++ b/src/qemu/qemu_validate.c > @@ -1063,7 +1063,8 @@ qemuValidateDomainDeviceDefAddress(const > virDomainDeviceDef *dev, > > switch ((virDomainDeviceAddressType) info->type) { > case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: > -

Re: [libvirt PATCH] ci: Run all jobs, for all branches, all the time

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 10:00 +0100, Daniel P. Berrangé wrote: > On Fri, Jun 26, 2020 at 08:20:40PM +0200, Andrea Bolognani wrote: > > After recent changes (increasing the parallelism of the pipeline > > by reducing the number of stages, introducing FreeBSD builds that > > take longer than any other

Re: [PATCH 2/3] domain_conf: Move zPCI validation from formatter to validator

2020-06-29 Thread Michal Privoznik
On 6/29/20 11:58 AM, Andrea Bolognani wrote: On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote: +++ b/src/qemu/qemu_validate.c @@ -1028,6 +1028,12 @@ qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInfoPtr info, return -1; } +if (virDeviceInfoPCIAddressExten

Re: [PATCH 2/3] domain_conf: Move zPCI validation from formatter to validator

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote: > +++ b/src/qemu/qemu_validate.c > @@ -1028,6 +1028,12 @@ > qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInfoPtr info, > return -1; > } > > +if (virDeviceInfoPCIAddressExtensionIsWanted(info)) { > +virR

Re: [PATCH 1/3] qemuhotplugtest: Free monitor iff successfully initialized

2020-06-29 Thread Andrea Bolognani
On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote: > If initializing test monitor in testQemuHotplugCpuPrepare() > fails, the control jumps to error label where > testQemuHotplugCpuDataFree() is called. But since the data->mon > is NULL due to aforementioned failure, > qemuMonitorTestGetMon

Re: [PATCH 2/2] qemu_capabilities.c: drop 'kvm_pr' support for non-Power8 hosts

2020-06-29 Thread Richard W.M. Jones
On Fri, Jun 19, 2020 at 06:04:33PM -0300, Daniel Henrique Barboza wrote: > PPC64 has two KVM modules: kvm_hv and kvm_pr. The official supported > module was always kvm_hv, while kvm_pr was used for internal testing > or for very niche cases in Power 8 hosts, always without official > IBM or distro

Re: [libvirt PATCH] ci: Run all jobs, for all branches, all the time

2020-06-29 Thread Daniel P . Berrangé
On Fri, Jun 26, 2020 at 08:20:40PM +0200, Andrea Bolognani wrote: > After recent changes (increasing the parallelism of the pipeline > by reducing the number of stages, introducing FreeBSD builds that > take longer than any other job), the difference between running > the full pipeline or a reduced

Re: [PATCH 1/1] domain_conf.c: skip checking ZPCI address is incomplete if not present

2020-06-29 Thread Andrea Bolognani
On Sun, 2020-06-28 at 09:25 -0300, Daniel Henrique Barboza wrote: > On 6/27/20 10:32 AM, Andrea Bolognani wrote: > > In the future, please don't include CC tags in your commits: removing > > them results in extra work when picking up a patch, and it's also > > generally not considered very polite t

[PATCH 1/3] qemuhotplugtest: Free monitor iff successfully initialized

2020-06-29 Thread Michal Privoznik
If initializing test monitor in testQemuHotplugCpuPrepare() fails, the control jumps to error label where testQemuHotplugCpuDataFree() is called. But since the data->mon is NULL due to aforementioned failure, qemuMonitorTestGetMonitor() dereferences a NULL pointer leading to a SIGSEGV. Signed-off-

[PATCH for 6.5.0 0/3] Move zPCI validation from formatter to validator

2020-06-29 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (3): qemuhotplugtest: Free monitor iff successfully initialized domain_conf: Move zPCI validation from formatter to validator qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called src/conf/domain_conf.c | 4 src/qemu/qemu_v

[PATCH 2/3] domain_conf: Move zPCI validation from formatter to validator

2020-06-29 Thread Michal Privoznik
In 076591009ad a validation code was added to virDomainDeviceInfoFormat() which reports an error if zPCI address entered in was incomplete. But, there are two problems with this approach. The first problem is the placement of the code - it doesn't belong into XML formatter rather than XML validato

[PATCH 3/3] qemu_validate: Fix how qemuValidateDomainDeviceDefZPCIAddress() is called

2020-06-29 Thread Michal Privoznik
To make the code future proof, the rest of the qemuValidateDomainDeviceDefAddress() has to be executed (even though there is nothing there yet) instead of returning directly. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) dif