Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-08 Thread Eric Farman
On 4/8/21 8:12 AM, Pavel Hrdina wrote: On Wed, Apr 07, 2021 at 11:28:48PM -0400, Eric Farman wrote: On 4/7/21 9:07 AM, Pavel Hrdina wrote: On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: The introduction of nested cgroups used a little macro virCgroupGetNested() to retrieve

Re: [PATCH] hyperv: Handle long CPU models better.

2021-04-08 Thread Neal Gompa
On Thu, Apr 8, 2021 at 11:52 AM Dawid Zamirski wrote: > > Apparenlly exising code was dealing with stripping down Intel CPU models > as reported by Hyper-V host but was still having issues with my AMD CPU > for which Hyper-V returns "AMD FX(tm)-8350 Eight-Core Processor". > Therefore, this patch

Re: [PATCH] hyperv: Handle long CPU models better.

2021-04-08 Thread dzrudy
On Thu, 2021-04-08 at 11:51 -0400, Dawid Zamirski wrote: > Apparenlly exising code was dealing with stripping down Intel CPU > models > as reported by Hyper-V host but was still having issues with my AMD > CPU > for which Hyper-V returns "AMD FX(tm)-8350 Eight-Core Processor". > Therefore, this

[PATCH] hyperv: Handle long CPU models better.

2021-04-08 Thread Dawid Zamirski
Apparenlly exising code was dealing with stripping down Intel CPU models as reported by Hyper-V host but was still having issues with my AMD CPU for which Hyper-V returns "AMD FX(tm)-8350 Eight-Core Processor". Therefore, this patch deals with it by stripping out the " Processor" part, and if

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-08 Thread Igor Mammedov
On Thu, 8 Apr 2021 09:39:43 +0100 Daniel P. Berrangé wrote: > On Wed, Apr 07, 2021 at 10:23:37PM +0200, Igor Mammedov wrote: > > On Wed, 7 Apr 2021 13:40:03 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Apr 07, 2021 at 09:17:36AM +0200, Peter Krempa wrote: > > > > On Tue, Apr 06,

Re: [libvirt PATCH] meson: remove obsolete comment about stack frame size

2021-04-08 Thread Pavel Hrdina
On Thu, Apr 08, 2021 at 02:00:16PM +0100, Daniel P. Berrangé wrote: > The virStrerror function no longer exists in libvirt so is not a > constraint. At the current stack limit of 4k, and default Linux > stack size of 8 MB, we have a recursion limit of 2048 in the > absolute worst case, and much

[libvirt PATCH] meson: remove obsolete comment about stack frame size

2021-04-08 Thread Daniel P . Berrangé
The virStrerror function no longer exists in libvirt so is not a constraint. At the current stack limit of 4k, and default Linux stack size of 8 MB, we have a recursion limit of 2048 in the absolute worst case, and much higher in common case. Even with smaller stack sizes, we're going to be fine

Re: [libvirt PATCH 3/6] meson: merge all cc_flags arrays into one

2021-04-08 Thread Pavel Hrdina
On Thu, Apr 08, 2021 at 12:54:13PM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 08, 2021 at 01:30:18PM +0200, Pavel Hrdina wrote: > > On Thu, Apr 08, 2021 at 11:58:20AM +0100, Daniel P. Berrangé wrote: > > > The split of arrays is fairly arbitrary and a hang over from the way we > > > had to

Re: [PATCH 1/1] vircgroup: Cleanup nested cgroups

2021-04-08 Thread Pavel Hrdina
On Wed, Apr 07, 2021 at 11:28:48PM -0400, Eric Farman wrote: > > > On 4/7/21 9:07 AM, Pavel Hrdina wrote: > > On Fri, Mar 26, 2021 at 05:25:03PM +0100, Eric Farman wrote: > > > The introduction of nested cgroups used a little macro > > > virCgroupGetNested() to retrieve the nested cgroup > > >

Re: [libvirt PATCH 3/6] meson: merge all cc_flags arrays into one

2021-04-08 Thread Daniel P . Berrangé
On Thu, Apr 08, 2021 at 01:30:18PM +0200, Pavel Hrdina wrote: > On Thu, Apr 08, 2021 at 11:58:20AM +0100, Daniel P. Berrangé wrote: > > The split of arrays is fairly arbitrary and a hang over from the way we > > had to structure lists of flags when we used GNULIB's compiler flag > > checking m4

Re: [libvirt PATCH 6/6] meson: don't probe for -Werror if -Dwerror is enabled

2021-04-08 Thread Pavel Hrdina
On Thu, Apr 08, 2021 at 11:58:23AM +0100, Daniel P. Berrangé wrote: > Meson has its own mechanism to turn on -Werror with the -Dwerror option. > If this is set, then there is no reason for libvirt to check for -Werror > itself. s/-Dwerror/--werror/ here and in $SUBJECT In meson --werror is

Re: [libvirt PATCH 0/6] meson: sanitize our compiler flags handling

2021-04-08 Thread Pavel Hrdina
On Thu, Apr 08, 2021 at 11:58:17AM +0100, Daniel P. Berrangé wrote: > Currently our compiler flags handling has a number of flaws and > misleading characteristics > > - It triggers warnings from Meson due to our use of -Wall/-Wextra >that prevents us using --fatal-meson-warnings > > - We

Re: [libvirt PATCH 3/6] meson: merge all cc_flags arrays into one

2021-04-08 Thread Pavel Hrdina
On Thu, Apr 08, 2021 at 11:58:20AM +0100, Daniel P. Berrangé wrote: > The split of arrays is fairly arbitrary and a hang over from the way we > had to structure lists of flags when we used GNULIB's compiler flag > checking m4 logic. > > The separate lists leads to cases where we enable a flag in

[libvirt PATCH v5 7/8] virDomainIOThreadIDDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1e72171586..fb22695dd3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18180,21

[libvirt PATCH v5 8/8] virCPUDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/cpu_conf.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 43629068c3..ee7feb1186 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -423,7 +423,6 @@

[libvirt PATCH v5 6/8] virNetworkForwardNatDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/network_conf.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 4cf4aa4840..19b84cbdd1 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@

[libvirt PATCH v5 5/8] virxml: Add virXMLPropEnum

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an enum XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 51 src/util/virxml.h| 5 3 files changed, 57 insertions(+) diff --git

[libvirt PATCH v5 3/8] virxml: Add virXMLPropInt

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an integer XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 57 src/util/virxml.h| 6 + 3 files changed, 64 insertions(+) diff --git

[libvirt PATCH v5 4/8] virxml: Add virXMLPropUInt

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an unsigned integer XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 61 src/util/virxml.h| 6 3 files changed, 68 insertions(+) diff

[libvirt PATCH v5 0/8] Refactor XML parsing boilerplate code

2021-04-08 Thread Tim Wiederhake
This series lays the groundwork for replacing some recurring boilerplate code in src/conf/ regarding the extraction of XML attribute values. For an on / off attribute, the boilerplate code looks roughly like this, g_autofree char *str = NULL; if (str = virXMLPropString(node, "x")) { int

[libvirt PATCH v5 1/8] virxml: Add virXMLPropTristateBool

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of a yes / no XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 49 src/util/virxml.h| 10 3 files changed, 60 insertions(+) diff --git

[libvirt PATCH v5 2/8] virxml: Add virXMLPropTristateSwitch

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an on / off XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 49 src/util/virxml.h| 4 3 files changed, 54 insertions(+) diff --git

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-04-08 Thread Daniel P . Berrangé
On Thu, Apr 08, 2021 at 12:56:05PM +0200, Martin Kletzander wrote: > On Thu, Apr 08, 2021 at 11:39:55AM +0100, Daniel P. Berrangé wrote: > > On Thu, Apr 08, 2021 at 12:32:10PM +0200, Martin Kletzander wrote: > > > On Thu, Apr 01, 2021 at 03:43:11PM +0200, Andrea Bolognani wrote: > > > > On Wed,

[libvirt PATCH 5/6] meson: honour meson warning_level option

2021-04-08 Thread Daniel P . Berrangé
Meson defines a warning_level option which has the following behaviour with C code 0: no warning flags 1: -Wall 2: -Wall -Wextra 3: -Wall -Wextra -Wpedantic Currently we add our extra warning flags unconditionally if the compiler supports them, regardless of the meson warning_level setting.

[libvirt PATCH 6/6] meson: don't probe for -Werror if -Dwerror is enabled

2021-04-08 Thread Daniel P . Berrangé
Meson has its own mechanism to turn on -Werror with the -Dwerror option. If this is set, then there is no reason for libvirt to check for -Werror itself. We remove the summary line output because it is potentially misleading when libvirt hasn't enabled -Werror, but meson has. Signed-off-by:

[libvirt PATCH 4/6] meson: avoid checking compiler flags twice

2021-04-08 Thread Daniel P . Berrangé
In several cases we check if a compiler flag is supported, and then add it to the 'cc_flags' array. The entire 'cc_flags' array is then later tested to see if each flag is supported, which duplicates the check in some cases. Move the check of cc_flags earlier, and for the extra flags append

[libvirt PATCH 2/6] meson: actually check for -Wframe-larger-than

2021-04-08 Thread Daniel P . Berrangé
All other warning flags are checked for compiler support, so we shouldn't blindly assume this one always exists. Signed-off-by: Daniel P. Berrangé --- meson.build | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 7565eace17..97d9c52165

[libvirt PATCH 3/6] meson: merge all cc_flags arrays into one

2021-04-08 Thread Daniel P . Berrangé
The split of arrays is fairly arbitrary and a hang over from the way we had to structure lists of flags when we used GNULIB's compiler flag checking m4 logic. The separate lists leads to cases where we enable a flag in one list and have contradictory setting in another list, which leads to

[libvirt PATCH 1/6] meson: get rid of list of unused warning flags

2021-04-08 Thread Daniel P . Berrangé
We're not using these warning flags with libvirt, and it is not worth keeping them just to issue a warning if someone tries to enable them. If someone does try to enable them, either libvirt will build cleanly or it won't. Signed-off-by: Daniel P. Berrangé --- meson.build | 76

[libvirt PATCH 0/6] meson: sanitize our compiler flags handling

2021-04-08 Thread Daniel P . Berrangé
Currently our compiler flags handling has a number of flaws and misleading characteristics - It triggers warnings from Meson due to our use of -Wall/-Wextra that prevents us using --fatal-meson-warnings - We enable flags, only to turn them back off again eg "-Wcast-function-type ...

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-04-08 Thread Martin Kletzander
On Thu, Apr 08, 2021 at 11:39:55AM +0100, Daniel P. Berrangé wrote: On Thu, Apr 08, 2021 at 12:32:10PM +0200, Martin Kletzander wrote: On Thu, Apr 01, 2021 at 03:43:11PM +0200, Andrea Bolognani wrote: > On Wed, 2021-03-31 at 23:31 +0200, Martin Kletzander wrote: > > On Fri, Mar 26, 2021 at

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-04-08 Thread Daniel P . Berrangé
On Thu, Apr 08, 2021 at 12:32:10PM +0200, Martin Kletzander wrote: > On Thu, Apr 01, 2021 at 03:43:11PM +0200, Andrea Bolognani wrote: > > On Wed, 2021-03-31 at 23:31 +0200, Martin Kletzander wrote: > > > On Fri, Mar 26, 2021 at 11:35:02AM +0100, Andrea Bolognani wrote: > > > > We should always

Re: [libvirt PATCH 2/2] ci: Call meson consistently

2021-04-08 Thread Martin Kletzander
On Thu, Apr 01, 2021 at 03:43:11PM +0200, Andrea Bolognani wrote: On Wed, 2021-03-31 at 23:31 +0200, Martin Kletzander wrote: On Fri, Mar 26, 2021 at 11:35:02AM +0100, Andrea Bolognani wrote: > We should always pass --werror and display the contents of the > log file in case of failure. Any

Re: [libvirt PATCH v4 3/8] virxml: Add virXMLPropInt

2021-04-08 Thread Daniel P . Berrangé
On Thu, Apr 08, 2021 at 10:57:05AM +0200, Tim Wiederhake wrote: > Convenience function to return the value of an integer XML attribute. > > Signed-off-by: Tim Wiederhake > --- > src/libvirt_private.syms | 1 + > src/util/virxml.c| 51 >

RFC: nwfilter rule direction clarification

2021-04-08 Thread Nikolay Shirokovskiy
Hi, all! For next nwfilter: I got next result: -A FI-vmec437726363e0 -p tcp -m tcp --sport 22 -j RETURN -A FO-vmec437726363e0 -p tcp -m tcp --dport 22 -j RETURN -A HI-vmec437726363e0 -p tcp -m tcp --sport 22 -j RETURN -A libvirt-host-in -m physdev --physdev-in vmec437726363e0 -g

[libvirt PATCH v4 6/8] virNetworkForwardNatDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/network_conf.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 4cf4aa4840..19b84cbdd1 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@

[libvirt PATCH v4 2/8] virxml: Add virXMLPropTristateSwitch

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an on / off XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 49 src/util/virxml.h| 4 3 files changed, 54 insertions(+) diff --git

[libvirt PATCH v4 1/8] virxml: Add virXMLPropTristateBool

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of a yes / no XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 49 src/util/virxml.h| 10 3 files changed, 60 insertions(+) diff --git

[libvirt PATCH v4 8/8] virCPUDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/cpu_conf.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 43629068c3..ee7feb1186 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -423,7 +423,6 @@

[libvirt PATCH v4 7/8] virDomainIOThreadIDDefParseXML: Use virXMLProp*

2021-04-08 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1e72171586..fb22695dd3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18180,21

[libvirt PATCH v4 4/8] virxml: Add virXMLPropUInt

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an unsigned integer XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 55 src/util/virxml.h| 6 + 3 files changed, 62 insertions(+) diff

[libvirt PATCH v4 5/8] virxml: Add virXMLPropEnum

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an enum XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 51 src/util/virxml.h| 5 3 files changed, 57 insertions(+) diff --git

[libvirt PATCH v4 0/8] Refactor XML parsing boilerplate code

2021-04-08 Thread Tim Wiederhake
This series lays the groundwork for replacing some recurring boilerplate code in src/conf/ regarding the extraction of XML attribute values. For an on / off attribute, the boilerplate code looks roughly like this, g_autofree char *str = NULL; if (str = virXMLPropString(node, "x")) { int

[libvirt PATCH v4 3/8] virxml: Add virXMLPropInt

2021-04-08 Thread Tim Wiederhake
Convenience function to return the value of an integer XML attribute. Signed-off-by: Tim Wiederhake --- src/libvirt_private.syms | 1 + src/util/virxml.c| 51 src/util/virxml.h| 6 + 3 files changed, 58 insertions(+) diff --git

Re: [libvirt PATCH 1/6] conf: add support for for PCI devices

2021-04-08 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 10:23:37PM +0200, Igor Mammedov wrote: > On Wed, 7 Apr 2021 13:40:03 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Apr 07, 2021 at 09:17:36AM +0200, Peter Krempa wrote: > > > On Tue, Apr 06, 2021 at 16:31:32 +0100, Daniel Berrange wrote: > > > > PCI devices can be

Re: [libvirt PATCH] vsh: fix memory leak in vshCommandParse

2021-04-08 Thread Erik Skultety
On Wed, Apr 07, 2021 at 05:29:50PM +0200, Ján Tomko wrote: > One of the error branches used a plain free where vshCommandFree > was required. > > https://bugzilla.redhat.com/show_bug.cgi?id=1943415 > > Signed-off-by: Ján Tomko > --- Reviewed-by: Erik Skultety