Re: [libvirt] [PATCH v2 0/4] PCI hostdev partial assignment support

2019-11-21 Thread Alex Williamson
On Thu, 21 Nov 2019 19:19:13 -0300 Daniel Henrique Barboza wrote: > Changes from previous version [1], all of them result of > feedback from Alex Williamson and Abdulla Bubshait: > - use instead of creating a new subsys > attribute; > - expand the change to all PCI hostdevs. Former patch 01 was

[libvirt] [PATCH v2 2/4] qemu: handle unassigned PCI hostdevs in command line and alias

2019-11-21 Thread Daniel Henrique Barboza
Previous patch made it possible for the QEMU driver to check if a given PCI hostdev is unassigned=true, meaning that this device shouldn't be part of the actual guest launch and alias generation. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_alias.c | 6

[libvirt] [PATCH v2 0/4] PCI hostdev partial assignment support

2019-11-21 Thread Daniel Henrique Barboza
Changes from previous version [1], all of them result of feedback from Alex Williamson and Abdulla Bubshait: - use instead of creating a new subsys attribute; - expand the change to all PCI hostdevs. Former patch 01 was discarded because we don't need the PCI Multifunction helpers for now; -

[libvirt] [PATCH v2 3/4] virhostdev.c: check all IOMMU devs in virHostdevPreparePCIDevices

2019-11-21 Thread Daniel Henrique Barboza
virHostdevPreparePCIDevices verifies if a PCI hostdev "A" is in use by another domain by checking the 'activePCIHostdevs' list. It also verifies if other domains are using any other hostdev that belongs to the same IOMMU of "A". This is not enough to cover all the cases. Suppose a PCI hostdev "B"

[libvirt] [PATCH v2 1/4] domain_conf: allow address type='none' to unassign PCI hostdevs

2019-11-21 Thread Daniel Henrique Barboza
Today, to use a PCI hostdev "A" in a domain, all PCI devices that belongs to the same IOMMU group must also be declared in the domain XML, meaning that all IOMMU devices are detached from the host and all of them are visible to the guest. The result is that the guest will have access to all

[libvirt] [PATCH v2 4/4] formatdomain.html.in: document

2019-11-21 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 15 +++ 1 file changed, 15 insertions(+) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index a1042a314c..65012aac88 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@

Re: [libvirt] [PATCH] domcaps: Remove function initializing domain caps as unsupported

2019-11-21 Thread Cole Robinson
On 11/21/19 4:23 AM, Peter Krempa wrote: > Commit 5751a0b6b1968bb2354b2ac21cc5938b93009590 added a helper function > called virDomainCapsFeaturesInitUnsupported which initialized all domain > capability features as unsupported. > > When adding a new feature this would initialize it as unsupported

Re: [libvirt] [PATCH RFC 30/40] backup: Introduce virDomainBackup APIs

2019-11-21 Thread Daniel P . Berrangé
On Fri, Oct 18, 2019 at 06:11:15PM +0200, Peter Krempa wrote: > From: Eric Blake > > Introduce a few new public APIs related to incremental backups. This > builds on the previous notion of a checkpoint (without an existing > checkpoint, the new API is a full backup, differing from >

Re: [libvirt] [PATCH 0/6] qemu: Use -blockdev for pflash (blockdev-add saga)

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 06:14:01PM +, Daniel P. Berrangé wrote: > On Fri, Nov 15, 2019 at 04:51:46PM +0100, Peter Krempa wrote: > > To avoid using -drive as much as possible convert PFLASH to use > > -blockdev as well. > > > > Since -blockdev is not enabled yet use the following qemu

Re: [libvirt] [PATCH 8/8] qemu: enable blockdev support

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:08PM +0100, Peter Krempa wrote: > Now that all pieces are in place (hopefully) let's enable -blockdev. > > We base the capability on presence of the fix for 'auto-read-only' on > files so that blockdev works properly, mandate that qemu supports > explicit SCSI id

Re: [libvirt] [PATCH 7/8] qemu: capabilities: Add detection of the 'savevm' fix for -blockdev

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:07PM +0100, Peter Krempa wrote: > The 'savevm' HMP command didn't work properly with blockdev as it tried > to do snapshot of everything including the protocol nodes accessing > files which are not snapshottable. Qemu fixed this bug so now we need to > detect it to

Re: [libvirt] [PATCH 6/8] qemu: qapi: Add support for command features

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:06PM +0100, Peter Krempa wrote: > The top level commands now can have 'feature' flags for fixes so add > support for querying those as well. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_qapi.c | 15 +++ > 1 file changed, 15 insertions(+) > >

Re: [libvirt] [PATCH 5/8] qemu: caps: Add capability for dynamic 'auto-read-only' support for files

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:05PM +0100, Peter Krempa wrote: > Initial implementation of 'auto-read-only' didn't reopen the backing > files when needed. For '-blockdev' to work we need to be able to tel > qemu to open a file read-only and change it during blockjobs as we label > backing chains

Re: [libvirt] [PATCH 4/8] tests: qemucapabilities: Refresh data for unreleased qemu-4.2 on x86_64

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:04PM +0100, Peter Krempa wrote: > The data is captured from qemu v4.2.0-rc0-27-g039e285e09 QEMU is on -rc2 now so perhaps refresh this again just before pushing. Reviewed-by: Daniel P. Berrangé (as if I really checked every line of this auto-generated data ;-)

Re: [libvirt] [PATCH 3/8] qemu: caps: Base support of 'backingStoreInput' domain feature on QEMU_CAPS_BLOCKDEV

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:03PM +0100, Peter Krempa wrote: > The qemu driver will obey when we support blockdev. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_capabilities.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |:

Re: [libvirt] [PATCH 2/8] docs: Document support for obeying of on input

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:02PM +0100, Peter Krempa wrote: > Until now we've only supported in an output mode. The > documentation for the element states that hypervisor drivers may start > to obey it in the future. > > Update the documentation so that it mentions the recently added >

Re: [libvirt] [PATCH 1/8] conf: domcaps: Add 'backingStoreInput' domain capability

2019-11-21 Thread Daniel P . Berrangé
On Mon, Nov 18, 2019 at 06:02:01PM +0100, Peter Krempa wrote: > Historically we've only supported the as an output-only > element for domain disks. The documentation states that it may become > supported on input. To allow management apps detectin once that happens s/detectin/to detect/ > add a

Re: [libvirt] [PATCH 0/6] qemu: Use -blockdev for pflash (blockdev-add saga)

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:46PM +0100, Peter Krempa wrote: > To avoid using -drive as much as possible convert PFLASH to use > -blockdev as well. > > Since -blockdev is not enabled yet use the following qemu namespace XML > override to enable it for testing: > > > ... > > >

Re: [libvirt] [PATCH 2/6] qemu: domain: Store virStorageSources representing pflash backing

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:48PM +0100, Peter Krempa wrote: > To allow converting the pflash drives to blockdev we will need a > virStorageSource to allow using our helpers. Temporarily prior to > coverting loader data to a virStorageSoruce add private data which will > house this. > >

Re: [libvirt] [PATCH 6/6] qemu: Instantiate pflash via -machine when using blockdev

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:52PM +0100, Peter Krempa wrote: > Install the convertor function which enables the internals that will use > -blockdev to make qemu open the firmware image and stop using -drive. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_command.c | 14 ++ >

Re: [libvirt] [PATCH 5/6] qemu: command: Build the 'pflash' drives via -machine

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:51PM +0100, Peter Krempa wrote: > The old way to instantiate a pflash device via -drive was a hack since > it's a platform device. > > The modern approach calls for configuring it via -machine and takes the > node name as an argument. > > Signed-off-by: Peter Krempa

Re: [libvirt] [PATCH 4/6] qemu: command: Build -blockdev-s for backing of pflash

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:50PM +0100, Peter Krempa wrote: > As a first step we will build the blockdevs which will be supposed to > back the pflash drives when moving away from -drive. > > This code is similar to the way we build the blockdevs for the disk, but > skips the copy-on-read layer

Re: [libvirt] [PATCH 3/6] qemu: domain: Introduce helper to convert into virStorageSource

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:49PM +0100, Peter Krempa wrote: > Add a helper which will covert the PFLASH code file and variable file > into the virStorageSource objects stored in private data so that we can > use them with -blockdev while keeping the infrastructure to determine > the path to the

Re: [libvirt] [PATCH 1/6] qemu: command: Extract formatting of -drive for pflash

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 04:51:47PM +0100, Peter Krempa wrote: > Extract the old way to instantiate pflash devices to hold the firmware > via -drive to a separate function so that it can later be conditionally > disabled when -blockdev will be used. > > Signed-off-by: Peter Krempa > --- >

Re: [libvirt] [PATCH go-xml 0/4] Update documentation

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 05:18:02PM +0100, Philipp Hahn wrote: > Hello, > > as requested here are my proposed changes from > > for libvirt-go-xml/doc.go. > > Philipp Hahn (4): > doc: Handle

[libvirt] [PATCH go-xml 2/4] doc: Variable is already defined

2019-11-21 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index f97f2eb..d1f94b2 100644 --- a/doc.go +++ b/doc.go @@ -55,7 +55,7 @@ // xmldoc, err := dom.GetXMLDesc(0) // // domcfg := {} -// err := domcfg.Unmarshal(xmldoc)

[libvirt] [PATCH go-xml 3/4] doc: Add missing newline

2019-11-21 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index d1f94b2..c4ce0dd 100644 --- a/doc.go +++ b/doc.go @@ -57,6 +57,6 @@ // domcfg := {} // err = domcfg.Unmarshal(xmldoc) // -// fmt.Printf("Virt type %s",

[libvirt] [PATCH go-xml 1/4] doc: Handle conn.LookupDomainByName() error

2019-11-21 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- doc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 2886c79..f97f2eb 100644 --- a/doc.go +++ b/doc.go @@ -51,7 +51,7 @@ // ) // // conn, err := libvirt.NewConnect("qemu:///system") -// dom :=

[libvirt] [PATCH go-xml 4/4] doc: Make examples a complete program

2019-11-21 Thread Philipp Hahn
Add `package main` and declare a `main()` function. Signed-off-by: Philipp Hahn --- doc.go | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/doc.go b/doc.go index c4ce0dd..25bc1d5 100644 --- a/doc.go +++ b/doc.go @@ -33,30 +33,38 @@ // //

[libvirt] [PATCH go-xml 0/4] Update documentation

2019-11-21 Thread Philipp Hahn
Hello, as requested here are my proposed changes from for libvirt-go-xml/doc.go. Philipp Hahn (4): doc: Handle conn.LookupDomainByName() error doc: Variable is already defined doc: Add missing

Re: [libvirt] [PATCH v2 2/2] qemuProcessStop: Remove image metadata for running mirror jobs

2019-11-21 Thread Peter Krempa
On Thu, Nov 21, 2019 at 17:00:37 +0100, Michal Privoznik wrote: > On 11/21/19 3:31 PM, Peter Krempa wrote: > > On Thu, Nov 21, 2019 at 14:02:49 +0100, Michal Privoznik wrote: > > > On 11/20/19 3:22 PM, Peter Krempa wrote: > > > > > > New commit message: > > qemuProcessStop: Remove image

Re: [libvirt] [PATCH v2 2/2] qemuProcessStop: Remove image metadata for running mirror jobs

2019-11-21 Thread Michal Privoznik
On 11/21/19 3:31 PM, Peter Krempa wrote: On Thu, Nov 21, 2019 at 14:02:49 +0100, Michal Privoznik wrote: On 11/20/19 3:22 PM, Peter Krempa wrote: New commit message: qemuProcessStop: Remove image metadata for running mirror jobs If user starts a blockcommit or a blockcopy then we

Re: [libvirt] [PATCH 1/6] qemu: command: Extract formatting of -drive for pflash

2019-11-21 Thread Ján Tomko
On Fri, Nov 15, 2019 at 04:51:47PM +0100, Peter Krempa wrote: Extract the old way to instantiate pflash devices to hold the firmware via -drive to a separate function so that it can later be conditionally disabled when -blockdev will be used. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH 0/7] docs: fix various problems in docs and cleanup rules

2019-11-21 Thread Pavel Hrdina
On Wed, Nov 20, 2019 at 03:28:41PM +, Daniel P. Berrangé wrote: > There were a few problems in the docs build from the vpath build > > https://www.redhat.com/archives/libvir-list/2019-November/msg00308.html > > - We can't browse the website from the build dir > - Including of the acl

Re: [libvirt] [PATCH v2 2/2] qemuProcessStop: Remove image metadata for running mirror jobs

2019-11-21 Thread Peter Krempa
On Thu, Nov 21, 2019 at 14:02:49 +0100, Michal Privoznik wrote: > On 11/20/19 3:22 PM, Peter Krempa wrote: > > > > Okay, how about this commit message: > > qemuProcessStop: Remove image metadata for running mirror jobs > > If user starts a blockcommit without --pivot or a blockcopy also >

Re: [libvirt] [PATCH v2 2/2] qemuProcessStop: Remove image metadata for running mirror jobs

2019-11-21 Thread Michal Privoznik
On 11/20/19 3:22 PM, Peter Krempa wrote: > Okay, how about this commit message: qemuProcessStop: Remove image metadata for running mirror jobs If user starts a blockcommit without --pivot or a blockcopy also without --pivot then we modify access for qemu on both images and leave it like that

Re: [libvirt] [PATCH console-proxy 0/6] libvirt-go-xml and libvirt-console-proxy ?

2019-11-21 Thread Daniel P . Berrangé
On Fri, Nov 15, 2019 at 02:05:11PM +0100, Philipp Hahn wrote: > Hello Daniel, > > I regularly visit your blog and stumbled over > , > which seems to contains some small errors - I'm a "go"-newby, so I had

[libvirt] [PATCH 4/4] domaincapstest: Add CPU model Dhyana to QEMU

2019-11-21 Thread Yingle Hou
Add CPU model Dhyana to QEMU 4.1.0 and QEMU 4.2.0 in tests/domaincapstest/. Signed-off-by: Yingle Hou --- tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +

[libvirt] [PATCH 4/4] domaincapstest: Add CPU model Dhyana to QEMU

2019-11-21 Thread Yingle Hou
Add CPU model Dhyana to QEMU 4.1.0 and QEMU 4.2.0 in tests/domaincapstest/. Signed-off-by: Yingle Hou --- tests/domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 1 +

[libvirt] [PATCH 3/4] cputest: Add CPUID data for Hygon Dhyana 7185 32-core Processor

2019-11-21 Thread Yingle Hou
Add Hygon Dhyana CPU data test case related files. Signed-off-by: Yingle Hou --- tests/cputest.c|1 + ...86_64-cpuid-Hygon-C86-7185-32-core-disabled.xml |7 + ...x86_64-cpuid-Hygon-C86-7185-32-core-enabled.xml |9 +

[libvirt] [PATCH 2/4] cpu: Add new Dhyana CPU model

2019-11-21 Thread Yingle Hou
Add Hygon Dhyana CPU model to the processor model. Signed-off-by: Yingle Hou --- src/cpu_map/Makefile.inc.am | 1 + src/cpu_map/index.xml | 3 ++ src/cpu_map/x86_Dhyana.xml | 70 + src/cpu_map/x86_vendors.xml | 1 + 4 files changed, 75

[libvirt] [PATCH 0/4] Add support for Hygon Dhyana CPU

2019-11-21 Thread Yingle Hou
As a Joint Venture between AMD and Haiguang Information Technology Co., Ltd., Hygon aims to provide x86 server processor in China market. The first generation processor Dhyana (family 18h) shares similar architecture with AMD family 17h. As Dhyana support in QEMU already have been merged in

[libvirt] [PATCH 1/4] cpu: Remove the verification conditions of the model in the x86 signatures

2019-11-21 Thread Yingle Hou
The x86ModelParseSignatures function makes an assumption that CPU signature model equals 0 as an invalid case. While in Hygon processor definition, A1 version (model 0, stepping 1) is mass production version, to support Hygon Dhyana A1 version, we have removed CPU signature model zero checking

Re: [libvirt] [PATCH v2 3/4] remote: Add a check for zero sized client-side buffers

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:31AM +0100, Erik Skultety wrote: > Adjustment to the dispatch code which is not generated by > gendispatch.pl. > > Signed-off-by: Erik Skultety > --- > src/remote/remote_daemon_dispatch.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git

Re: [libvirt] [PATCH v2 4/4] libvirt-: Check caller-provided buffers to be NULL with size > 0

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:32AM +0100, Erik Skultety wrote: > Pre-Glib era which used malloc allowed the size of the client-side > buffers to be declared as 0, because malloc documents that it can either > return 0 or a unique pointer on 0 size allocations. > With glib this doesn't work

Re: [libvirt] [PATCH v2 2/4] rpc: gendispatch: Add a check for zero size client-side buffers

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:30AM +0100, Erik Skultety wrote: > After libvirt switched to GLib, we also started to use glib allocation > primitives as of commit e85e34f3. Unlike malloc which is ambiguous with > regards to size == 0 (which in our case returned a unique pointer safe > to be passed

Re: [libvirt] [PATCH v2 1/4] rpc: gendispatch: Fix a couple of places adding trailing spaces

2019-11-21 Thread Daniel P . Berrangé
On Thu, Nov 21, 2019 at 09:58:29AM +0100, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > src/rpc/gendispatch.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-

Re: [libvirt] [PATCH] domcaps: Remove function initializing domain caps as unsupported

2019-11-21 Thread Michal Privoznik
On 11/21/19 10:23 AM, Peter Krempa wrote: Commit 5751a0b6b1968bb2354b2ac21cc5938b93009590 added a helper function called virDomainCapsFeaturesInitUnsupported which initialized all domain capability features as unsupported. When adding a new feature this would initialize it as unsupported also

Re: [libvirt] [PATCH 5/8] domcaps: Add function for initializing domain caps as unsupported

2019-11-21 Thread Michal Privoznik
On 11/20/19 7:02 PM, Cole Robinson wrote: I see your points but I still favor the old way. There's no rush to change this IMO so maybe we can come up with consensus on whether it's optimal to put default supported=yes|no values in common code or not. CCing Jano and Michal for their opinions too.

[libvirt] [PATCH v3 0/4] qemu: block: implement optional removal of committed snapshot images

2019-11-21 Thread Pavel Mores
v3 aims to incorporate Peter's feedback to v2, mainly: - patch 1 was split into two - the delete flag propagation stays in patch 1, the actual enabling the feature was moved to what's now patch 4 - patch 2 was modified to handle NFS and to use g_strerror() instead of strerror_r() - the former

[libvirt] [PATCH v3 1/4] qemu: block: propagate the delete flag to where it can actually be used

2019-11-21 Thread Pavel Mores
Propagate the delete flag from qemuDomainBlockCommit() (which was just ignoring it until now) to qemuBlockJobDiskNewCommit() where it can be stored in the qemuBlockJobCommitData structure which holds information necessary to finish the job asynchronously. In the actual qemuBlockJobDiskNewCommit()

[libvirt] [PATCH v3 3/4] qemu: block: store the delete flag in libvirtd's status XML

2019-11-21 Thread Pavel Mores
Since blockcommit is asynchronous, libvirtd can be restarted while the operation runs. To ensure the information necessary to finish up the job is not lost, serialisation to and deserialisation from the status XML is added. To unittest this, the new element was only added to the active commit

[libvirt] [PATCH v3 4/4] qemu: block: enable the snapshot image deletion feature

2019-11-21 Thread Pavel Mores
With all plumbing in place, we can now enable the new functionality. Signed-off-by: Pavel Mores --- src/qemu/qemu_driver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a3ff4b2177..75458f5c8a 100644 ---

[libvirt] [PATCH v3 2/4] qemu: block: use the delete flag to delete snapshot images if requested

2019-11-21 Thread Pavel Mores
When blockcommit finishes successfully, one of the qemuBlockJobProcessEventCompletedCommit() and qemuBlockJobProcessEventCompletedActiveCommit() event handlers is called. This is where the delete flag (stored in qemuBlockJobCommitData since the previous commit) can actually be used to delete the

Re: [libvirt] [jenkins-ci] guests: Add support for openSUSE Leap 15.1

2019-11-21 Thread Andrea Bolognani
On Wed, 2019-11-20 at 23:19 +0100, Fabiano Fidêncio wrote: > On Wed, Nov 20, 2019 at 10:46 PM Jim Fehlig wrote: > > On 11/20/19 2:16 PM, Fabiano Fidêncio wrote: > > > On Wed, Nov 20, 2019 at 8:44 PM Jim Fehlig wrote: > > > > 15.1 will continue to be actively supported alongside 15.2 for six > >

[libvirt] [PATCH] domcaps: Remove function initializing domain caps as unsupported

2019-11-21 Thread Peter Krempa
Commit 5751a0b6b1968bb2354b2ac21cc5938b93009590 added a helper function called virDomainCapsFeaturesInitUnsupported which initialized all domain capability features as unsupported. When adding a new feature this would initialize it as unsupported also for hypervisor drivers which the original

Re: [libvirt] [PATCH 2/3] scripts: check-aclrules: use in instead of find

2019-11-21 Thread Erik Skultety
On Thu, Nov 21, 2019 at 09:27:31AM +0100, Erik Skultety wrote: > On Wed, Nov 20, 2019 at 07:32:45PM +0100, Ján Tomko wrote: > > For checking whether a substring is present in a string, > > using the pattern: > > "str" in string > > is slightly faster than: > > string.find("str") != -1 > >

[libvirt] [PATCH v2 4/4] libvirt-: Check caller-provided buffers to be NULL with size > 0

2019-11-21 Thread Erik Skultety
Pre-Glib era which used malloc allowed the size of the client-side buffers to be declared as 0, because malloc documents that it can either return 0 or a unique pointer on 0 size allocations. With glib this doesn't work anymore, because glib documents that for such allocation requests NULL is

[libvirt] [PATCH v2 1/4] rpc: gendispatch: Fix a couple of places adding trailing spaces

2019-11-21 Thread Erik Skultety
Signed-off-by: Erik Skultety --- src/rpc/gendispatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 7c868191d1..8656c8f205 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -1062,7 +1062,7 @@

[libvirt] [PATCH v2 3/4] remote: Add a check for zero sized client-side buffers

2019-11-21 Thread Erik Skultety
Adjustment to the dispatch code which is not generated by gendispatch.pl. Signed-off-by: Erik Skultety --- src/remote/remote_daemon_dispatch.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index

[libvirt] [PATCH v2 0/4] Fix remote dispatch code trying to allocate 0-sized return buffers

2019-11-21 Thread Erik Skultety
This happens because of the switch to glib whose method g_malloc0 actually correctly returns NULL on size 0 which doesn't make sense to do. The outcome of that is that because virAllocN always returns 0, the dispatch code never fails allocation and passes the NULL pointer to the server-side public

[libvirt] [PATCH v2 2/4] rpc: gendispatch: Add a check for zero size client-side buffers

2019-11-21 Thread Erik Skultety
After libvirt switched to GLib, we also started to use glib allocation primitives as of commit e85e34f3. Unlike malloc which is ambiguous with regards to size == 0 (which in our case returned a unique pointer safe to be passed to free), g_malloc0 strictly returns NULL on size == 0. This change

Re: [libvirt] [PATCH v2 2/4] qemu: block: use the delete flag to delete snapshot images if requested

2019-11-21 Thread Peter Krempa
On Thu, Nov 21, 2019 at 09:31:41 +0100, Pavel Mores wrote: > On Wed, Nov 20, 2019 at 12:11:32PM +0100, Peter Krempa wrote: > > On Wed, Nov 20, 2019 at 11:44:53 +0100, Pavel Mores wrote: > > > When blockcommit finishes successfully, one of the > > > qemuBlockJobProcessEventCompletedCommit() and > >

Re: [libvirt] [PATCH v2 2/4] qemu: block: use the delete flag to delete snapshot images if requested

2019-11-21 Thread Pavel Mores
On Wed, Nov 20, 2019 at 12:11:32PM +0100, Peter Krempa wrote: > On Wed, Nov 20, 2019 at 11:44:53 +0100, Pavel Mores wrote: > > When blockcommit finishes successfully, one of the > > qemuBlockJobProcessEventCompletedCommit() and > > qemuBlockJobProcessEventCompletedActiveCommit() event handlers is

Re: [libvirt] [PATCH v2 1/4] qemu: block: propagate the delete flag to where it can actually be used

2019-11-21 Thread Pavel Mores
On Thu, Nov 21, 2019 at 08:38:13AM +0100, Peter Krempa wrote: > On Wed, Nov 20, 2019 at 18:12:18 +0100, Pavel Mores wrote: > > On Wed, Nov 20, 2019 at 12:14:11PM +0100, Peter Krempa wrote: > > > On Wed, Nov 20, 2019 at 11:44:52 +0100, Pavel Mores wrote: > > > > Since the blockcommit operation is

Re: [libvirt] [PATCH 2/3] scripts: check-aclrules: use in instead of find

2019-11-21 Thread Erik Skultety
On Wed, Nov 20, 2019 at 07:32:45PM +0100, Ján Tomko wrote: > For checking whether a substring is present in a string, > using the pattern: > "str" in string > is slightly faster than: > string.find("str") != -1 > > Use it to shave off 4 % of the runtime of this script that > processes

Re: [libvirt] [PATCH 1/3] scripts: speedup prohibit-duplicate-header

2019-11-21 Thread Erik Skultety
On Wed, Nov 20, 2019 at 07:32:44PM +0100, Ján Tomko wrote: > Running regular expressions with capture groups is expensive. > Bail out early if the line does not start with a '#'. > > This reduces the runtime of the check by two thirds. > > Signed-off-by: Ján Tomko > --- Reviewed-by: Erik Skultety

Re: [libvirt] [PATCH v3 02/52] tests: Update 4.2.0 capabilities data on ppc64

2019-11-21 Thread Jiri Denemark
On Tue, Nov 12, 2019 at 15:26:16 +0100, Ján Tomko wrote: > On Tue, Nov 05, 2019 at 02:27:00PM +0100, Jiri Denemark wrote: > >Generated with "spapr/kvm: Set default cpu model for all machine > >classes" fix for QEMU applied. > > > >Signed-off-by: Jiri Denemark > >--- > > > >Notes: > >Version

Re: [libvirt] [PATCH 5/8] domcaps: Add function for initializing domain caps as unsupported

2019-11-21 Thread Peter Krempa
On Wed, Nov 20, 2019 at 13:02:04 -0500, Cole Robinson wrote: > On 11/20/19 9:40 AM, Peter Krempa wrote: > > On Mon, Nov 18, 2019 at 14:43:08 -0500, Cole Robinson wrote: > >> On 11/13/19 11:05 AM, Peter Krempa wrote: > >>> For future extensions of the domain caps it's useful to have a single > >>>