[libvirt] [PATCH 1/2] cpu_x86: Fix memory leak - virCPUx86GetHost

2019-06-21 Thread John Ferlan
Commit 56b254dcc called virCPUx86DataAdd, but returned -1 directly without calling the virCPUx86DataFree. Found by Coverity. Signed-off-by: John Ferlan --- src/cpu/cpu_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index

[libvirt] [PATCH 0/2] A couple coverity patches

2019-06-21 Thread John Ferlan
Coverity has been tripped up a few more times recently... The memory leak patch probably I what I noted from Jiri's recent CPU series. The return value check is older. It wasn't clear though if the intention of the module was to ignore errors so I just chose to error out like other similar

[libvirt] [PATCH 2/2] cpu_x86: Handle error in x86DataToCPU when calling x86DataAdd

2019-06-21 Thread John Ferlan
Commit 9c9620af called x86DataAdd without checking for an error, so add the error checking. Found by Coverity Signed-off-by: John Ferlan --- src/cpu/cpu_x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index

Re: [libvirt] [PATCH] RFC: maint: Sort public symbols within a release

2019-06-21 Thread Eric Blake
On 6/21/19 2:18 PM, Eric Blake wrote: > In libvirt_private.syms, we have a policy of keeping blocks of symbols > sorted by name - in fact, we enforce it during 'make check' with our > check-symsorting rule calling out to a perl script. But > libvirt_public.syms has been more cavalier over the

[libvirt] [PATCH] qemu: Adjust ATTRIBUTE_NONNULL

2019-06-21 Thread John Ferlan
Commit 7bf679ae removed the @json argument from the qemuMonitorOpen prototype; however, it did not update the ATTRIBUTE_NONNULL value which causes a build failure for when checking is enabled such as when lv_cv_static_analysis is enabled. Signed-off-by: John Ferlan --- Pushing under build

[libvirt] [PATCH] maint: Add missing 'global:' tag in libvirt_public.syms

2019-06-21 Thread Eric Blake
Fixes: c08fc8d1 Signed-off-by: Eric Blake --- Pushing as trivial src/libvirt_public.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index 75f7fdfb0c..18500ec8b2 100644 --- a/src/libvirt_public.syms +++ b/src/libvirt_public.syms @@

[libvirt] [PATCH] RFC: maint: Sort public symbols within a release

2019-06-21 Thread Eric Blake
In libvirt_private.syms, we have a policy of keeping blocks of symbols sorted by name - in fact, we enforce it during 'make check' with our check-symsorting rule calling out to a perl script. But libvirt_public.syms has been more cavalier over the years. 21 releases have been trivially sorted

Re: [libvirt] [PATCH 02/13] backup: Introduce virDomainCheckpoint APIs

2019-06-21 Thread Eric Blake
On 6/21/19 10:58 AM, Eric Blake wrote: >>> LIBVIRT_5.5.0 { >>> +global: >>> +virDomainCheckpointCreateXML; >>> +virDomainCheckpointCurrent; >>> +virDomainCheckpointDelete; >>> +virDomainCheckpointFree; >>> +virDomainCheckpointGetConnect; >>> +

Re: [libvirt] [PATCH] Don't parse/format vram attribute for cirrus video

2019-06-21 Thread Jonathon Jongsma
On Fri, 2019-06-21 at 17:05 +0200, Peter Krempa wrote: > On Fri, Jun 21, 2019 at 09:53:59 -0500, Jonathon Jongsma wrote: > > On Fri, 2019-06-21 at 08:13 +0200, Peter Krempa wrote: > > > On Thu, Jun 20, 2019 at 14:51:12 -0500, Jonathon Jongsma wrote: > > > > Since the cirrus vga memory size isn't

Re: [libvirt] [PATCH] virStorageSourceChainHasManagedPR: Check propely

2019-06-21 Thread Eric Blake
On 6/21/19 11:11 AM, Michal Privoznik wrote: s/propely/properly in the subject > In the virStorageSourceChainHasManagedPR() function we iterate > over whole backing chain trying to determine if one of the layers > has managed PR configured. But due to a typo we in fact check the > top layer

Re: [libvirt] [PATCH v2 4/7] cpu_x86: Read CPU features from IA32_ARCH_CAPABILITIES MSR

2019-06-21 Thread John Ferlan
On 6/19/19 6:53 PM, Jiri Denemark wrote: > This is used by the host capabilities code to construct host CPU > definition. > > Signed-off-by: Jiri Denemark > Reviewed-by: Ján Tomko > --- > src/cpu/cpu_x86.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git

[libvirt] [PATCH] virStorageSourceChainHasManagedPR: Check propely

2019-06-21 Thread Michal Privoznik
In the virStorageSourceChainHasManagedPR() function we iterate over whole backing chain trying to determine if one of the layers has managed PR configured. But due to a typo we in fact check the top layer only. Signed-off-by: Michal Privoznik --- Pushed under trivial rule.

Re: [libvirt] [PATCH 02/13] backup: Introduce virDomainCheckpoint APIs

2019-06-21 Thread Eric Blake
On 6/19/19 6:20 AM, Peter Krempa wrote: > On Tue, Jun 18, 2019 at 22:47:43 -0500, Eric Blake wrote: > > [...] > >> diff --git a/include/libvirt/libvirt-domain-checkpoint.h >> b/include/libvirt/libvirt-domain-checkpoint.h >> new file mode 100644 >> index 00..21b89cd190 >> --- /dev/null

[libvirt] [PATCH 1/1] virpci: report dev->name in virPCIGetHeaderType error message

2019-06-21 Thread Daniel Henrique Barboza
Trivial change. Adding the name of the device that has an unknown PCI header type in that function helps when debugging PCI code. Signed-off-by: Daniel Henrique Barboza --- src/util/virpci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virpci.c

Re: [libvirt] [PATCH] Don't parse/format vram attribute for cirrus video

2019-06-21 Thread Peter Krempa
On Fri, Jun 21, 2019 at 09:53:59 -0500, Jonathon Jongsma wrote: > On Fri, 2019-06-21 at 08:13 +0200, Peter Krempa wrote: > > On Thu, Jun 20, 2019 at 14:51:12 -0500, Jonathon Jongsma wrote: > > > Since the cirrus vga memory size isn't configurable, we can ignore > > > any > > > 'vram' attribute

Re: [libvirt] [PATCH] Don't parse/format vram attribute for cirrus video

2019-06-21 Thread Jonathon Jongsma
On Fri, 2019-06-21 at 08:13 +0200, Peter Krempa wrote: > On Thu, Jun 20, 2019 at 14:51:12 -0500, Jonathon Jongsma wrote: > > Since the cirrus vga memory size isn't configurable, we can ignore > > any > > 'vram' attribute when parsing a domain definition. However, when no > > value is specified, it

[libvirt] [PATCH] rpc: add $(SASL_CFLAGS) to libvirt_net_rpc_server_la_CFLAGS

2019-06-21 Thread Daniel P . Berrangé
The files for libvirt-net-rpc-server.la refernce the sasl/sasl.h system header but never used the $(SASL_CFLAGS) variable. This was never noticed previously because the $(AVAHI_CLFAGS) were set and these typically pulled in the same include directory. When mDNS/Avahi support was removed this

[libvirt] [PATCH v2 4/6] util: vircgroupv2: enable CPU controller only if it's available

2019-06-21 Thread Pavel Hrdina
It might happen that we are not able to enable CPU controller so we can enable it for thread sub-cgroups only if it's available in parent cgroup. Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- src/util/vircgroupv2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 3/6] util: vircgroupv2: use any controller to create thread directory

2019-06-21 Thread Pavel Hrdina
The assumption that CPU controller would be always enabled is wrong, we should use any available controller to create a new sub-cgroup. Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- src/util/vircgroupv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH v2 6/6] util: vircgroupv2: don't error out if enabling controller fails

2019-06-21 Thread Pavel Hrdina
Currently CPU controller cannot be enabled if there is any real-time task running and is assigned to non-root cgroup which is the case on several distributions with graphical environment. Instead of erroring out treat it as the controller is not available. Signed-off-by: Pavel Hrdina ---

[libvirt] [PATCH v2 5/6] util: vircgroupv2: separate return values of virCgroupV2EnableController

2019-06-21 Thread Pavel Hrdina
In order to skip controllers that we are not able to activate we need to return different return value so the caller can decide what to do. Signed-off-by: Pavel Hrdina --- Introduced in v2. src/util/vircgroupv2.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH v2 2/6] util: vircgroup: improve controller detection

2019-06-21 Thread Pavel Hrdina
This affects only cgroups v2 where enabled controllers are not based on available mount points but on the list provided in cgroup.controllers file. Before this patch we were assuming that all controllers available in root cgroup where available in all other sub-cgroups which was wrong. In order

[libvirt] [PATCH v2 0/6] cgroups v2 fixes and improvements

2019-06-21 Thread Pavel Hrdina
Pavel Hrdina (6): util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB util: vircgroup: improve controller detection util: vircgroupv2: use any controller to create thread directory util: vircgroupv2: enable CPU controller only if it's available util: vircgroupv2:

[libvirt] [PATCH v2 1/6] util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB

2019-06-21 Thread Pavel Hrdina
In cgroups v2 we don't have to detect available controllers every single time if we are creating a new cgroup based on parent cgroup. Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko --- src/util/vircgroup.c| 2 +- src/util/vircgroupbackend.h | 3 ++- src/util/vircgroupv1.c |

Re: [libvirt] [PATCH 5/5] util: vircgroupv2: don't error out if enabling controller fails

2019-06-21 Thread Pavel Hrdina
On Fri, Jun 21, 2019 at 11:58:16AM +0200, Ján Tomko wrote: > On Thu, Jun 20, 2019 at 01:25:45PM +0200, Pavel Hrdina wrote: > > Currently CPU controller cannot be enabled if there is any real-time > > task running and is assigned to non-root cgroup which is the case on > > several distributions

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-21 Thread Michal Privoznik
On 6/21/19 11:49 AM, Ilias Stamatis wrote: > I totally agree with you, it's more readable for me too. Just so far I haven't encountered in the code. Also e.g. C99 allows variables to be declared inside a loop ie for (size_t i = 0; ... ...but I haven't seen that being used anywhere either.

Re: [libvirt] [PATCH 0/4] cgroups: add support for BFQ scheduler

2019-06-21 Thread Ján Tomko
On Wed, Jun 19, 2019 at 04:16:46PM +0200, Pavel Hrdina wrote: Pavel Hrdina (4): util: vircgroup: introduce virCgroup(Get|Set)ValueRaw util: vircgroup: move virCgroupGetValueStr out of virCgroupGetValueForBlkDev util: vircgroupv1: add support for BFQ blkio files util: vircgroupv2: add

Re: [libvirt] [PATCH] docs: Space out entries in news.html

2019-06-21 Thread Andrea Bolognani
On Fri, 2019-06-21 at 10:06 +0200, Peter Krempa wrote: [...] > +++ b/docs/news-html.xsl > @@ -58,7 +58,7 @@ > > > > - > + Can you rename this to "news-section-contents" please? The current name would be more fitting if it was used for the *outer* , the

Re: [libvirt] [PATCH 5/5] util: vircgroupv2: don't error out if enabling controller fails

2019-06-21 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:25:45PM +0200, Pavel Hrdina wrote: Currently CPU controller cannot be enabled if there is any real-time task running and is assigned to non-root cgroup which is the case on several distributions with graphical environment. Instead of erroring out treat it as the

Re: [libvirt] [PATCH 4/5] util: vircgroupv2: enable CPU controller only if it's available

2019-06-21 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:25:44PM +0200, Pavel Hrdina wrote: It might happen that we are not able to enable CPU controller so we can enable it for thread sub-cgroups only if it's available in parent cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 3 ++- 1 file changed, 2

Re: [libvirt] [PATCH 3/5] util: vircgroupv2: use any controller to create thread directory

2019-06-21 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:25:43PM +0200, Pavel Hrdina wrote: The assumption that CPU controller would be always enabled is wrong, we should use any available controller to create a new sub-cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroupv2.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH 2/5] util: vircgroup: improve controller detection

2019-06-21 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:25:42PM +0200, Pavel Hrdina wrote: This affects only cgroups v2 where enabled controllers are not based on available mount points but on the list provided in cgroup.controllers file. Before this patch we were assuming that all controllers available in root cgroup

Re: [libvirt] [PATCH 1/5] util: vircgroup: pass parent cgroup into virCgroupDetectControllersCB

2019-06-21 Thread Ján Tomko
On Thu, Jun 20, 2019 at 01:25:41PM +0200, Pavel Hrdina wrote: In cgroups v2 we don't have to detect available controllers every single time if we are creating a new cgroup based on parent cgroup. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 2 +- src/util/vircgroupbackend.h |

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-21 Thread Ilias Stamatis
On Fri, Jun 21, 2019 at 10:03 AM Michal Privoznik wrote: > > On 6/20/19 7:36 PM, Ilias Stamatis wrote: > > On Thu, Jun 20, 2019 at 5:57 PM Michal Privoznik > > wrote: > >> > >> On 6/19/19 6:45 PM, Ilias Stamatis wrote: > >>> testDomainInterfaceAddresses always returns the same hard-coded > >>>

Re: [libvirt] [PATCH] Revert "news: Document removal of qemu commandline parsing"

2019-06-21 Thread Ján Tomko
On Fri, Jun 21, 2019 at 08:50:46AM +0200, Peter Krempa wrote: Jano probably based his branch on top of mine and didn't notice when I moved the section up slightly and thus git applied it again. Keep only the instance followin the new features section. This reverts commit

Re: [libvirt] [PATCH] docs: Space out entries in news.html

2019-06-21 Thread Martin Kletzander
On Fri, Jun 21, 2019 at 10:06:01AM +0200, Peter Krempa wrote: The header for the news entry blends together with the text and other entries. This patch tries to space them out somewhat for better visual separation. Signed-off-by: Peter Krempa --- You can see the difference here:

[libvirt] [PATCH] docs: Space out entries in news.html

2019-06-21 Thread Peter Krempa
The header for the news entry blends together with the text and other entries. This patch tries to space them out somewhat for better visual separation. Signed-off-by: Peter Krempa --- You can see the difference here: https://github.com/pipo/libvirt/blob/screenshots/before.png

Re: [libvirt] [PATCH v2] test_driver: properly handle DHCP ranges and IPv6 networks in testDomainInterfaceAddresses

2019-06-21 Thread Michal Privoznik
On 6/20/19 7:36 PM, Ilias Stamatis wrote: On Thu, Jun 20, 2019 at 5:57 PM Michal Privoznik wrote: On 6/19/19 6:45 PM, Ilias Stamatis wrote: testDomainInterfaceAddresses always returns the same hard-coded addresses. Change the behavior such as if there is a DHCP range defined, addresses are

Re: [libvirt] [PATCH] rpc: virnetlibsshsession: update deprecated functions

2019-06-21 Thread Pavel Hrdina
On Fri, Jun 21, 2019 at 09:56:37AM +0200, Peter Krempa wrote: > On Fri, Jun 21, 2019 at 09:30:36 +0200, Pavel Hrdina wrote: > > In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost > > are marked as deprecated. > > > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1722735

Re: [libvirt] [PATCH] rpc: virnetlibsshsession: update deprecated functions

2019-06-21 Thread Peter Krempa
On Fri, Jun 21, 2019 at 09:30:36 +0200, Pavel Hrdina wrote: > In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost > are marked as deprecated. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1722735 > > Signed-off-by: Pavel Hrdina > --- > m4/virt-libssh.m4

Re: [libvirt] [PATCH] rpc: virnetlibsshsession: update deprecated functions

2019-06-21 Thread Jiri Denemark
On Fri, Jun 21, 2019 at 09:30:36 +0200, Pavel Hrdina wrote: > In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost > are marked as deprecated. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1722735 > > Signed-off-by: Pavel Hrdina Reviewed-by: Jiri Denemark --

[libvirt] [PATCH] rpc: virnetlibsshsession: update deprecated functions

2019-06-21 Thread Pavel Hrdina
In libssh 0.9.0 functions ssh_is_server_known and ssh_write_knownhost are marked as deprecated. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1722735 Signed-off-by: Pavel Hrdina --- m4/virt-libssh.m4 | 8 src/rpc/virnetlibsshsession.c | 4 ++-- 2 files changed, 10

[libvirt] [PATCH] Revert "news: Document removal of qemu commandline parsing"

2019-06-21 Thread Peter Krempa
Jano probably based his branch on top of mine and didn't notice when I moved the section up slightly and thus git applied it again. Keep only the instance followin the new features section. This reverts commit 9c68bb4a5c2c8c050e531533e5188a637ba1dd9f. Signed-off-by: Peter Krempa --- Pushed

[libvirt] [PATCH 2/3] qemu: Use VIR_ERR_DEPRECATED in QemuAttach and DomainXMLFromNative stubs

2019-06-21 Thread Peter Krempa
We've deprecated qemuConnectDomainXMLFromNative qemuDomainQemuAttach. Switch the error code from VIR_ERR_OPERATION_UNSUPPORTED to the new VIR_ERR_DEPRECATED. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 1/3] error: Add VIR_ERR_DEPRECATED error code

2019-06-21 Thread Peter Krempa
Allow a simple programatic check that a given feature is no longer supported by introducing a separate error code for this scenario. Signed-off-by: Peter Krempa --- include/libvirt/virterror.h | 1 + src/util/virerror.c | 4 2 files changed, 5 insertions(+) diff --git

[libvirt] [PATCH 0/3] error: Introdude and use VIR_ERR_DEPRECATED error code

2019-06-21 Thread Peter Krempa
Peter Krempa (3): error: Add VIR_ERR_DEPRECATED error code qemu: Use VIR_ERR_DEPRECATED in QemuAttach and DomainXMLFromNative stubs news: Mention VIR_ERR_DEPRECATED in improvements docs/news.xml | 10 ++ include/libvirt/virterror.h | 1 + src/qemu/qemu_driver.c

[libvirt] [PATCH 3/3] news: Mention VIR_ERR_DEPRECATED in improvements

2019-06-21 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 681e9a60a3..68f8c704b4 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -64,6 +64,16 @@ + + + Add error

Re: [libvirt] [PATCH] Fix 'validate' typo in comments

2019-06-21 Thread Peter Krempa
On Thu, Jun 20, 2019 at 14:36:18 -0500, Jonathon Jongsma wrote: > Signed-off-by: Jonathon Jongsma > --- > src/conf/domain_conf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Pushed now. signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] Don't parse/format vram attribute for cirrus video

2019-06-21 Thread Peter Krempa
On Thu, Jun 20, 2019 at 14:51:12 -0500, Jonathon Jongsma wrote: > Since the cirrus vga memory size isn't configurable, we can ignore any > 'vram' attribute when parsing a domain definition. However, when no > value is specified, it ends up getting set to a default value of 16MB. > This 16MB value