[RFCv2 36/46] conf: Extract error-checking code from virDomainGraphicsDefParseXMLSpice

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 46 +- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bc42068..b3ec111 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 34/46] conf: Generate virDomainGraphicsDesktopDefFormatAttr

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 8 ++-- src/conf/domain_conf.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ad129e9..bc42068 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[RFCv2 18/46] conf: Generate virNetworkDNSForwarderFormatBuf

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 18 +++--- src/conf/network_conf.h | 4 ++-- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 608843d..437c2c6 100644 --- a/src/conf/network_conf.c +++

[RFCv2 24/46] conf: Generate format functions for virDomainGraphicsSDLDef

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 20 +--- src/conf/domain_conf.h | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c1f8847..544b984 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 40/46] conf: Generate virDomainGraphicsEGLHeadlessDefFormatElem

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 7 +++ src/conf/domain_conf.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f3b59ed..0802c45 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[RFCv2 43/46] conf: Generate virDomainGraphicsListenDefFormatBuf

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 114 +++-- src/conf/domain_conf.h | 12 ++--- 2 files changed, 70 insertions(+), 56 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 507679b..007ee44 100644 ---

[RFCv2 41/46] conf: Extract error-checking code from virDomainGraphicsListenDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 207 - 1 file changed, 121 insertions(+), 86 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0802c45..d1602ab 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 21/46] conf: Generate virNetworkDNSDefFormatBuf

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 77 ++--- src/conf/network_conf.h | 10 +++--- 2 files changed, 8 insertions(+), 79 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2f1a88b..3a126d4 100644 ---

[RFCv2 39/46] conf: Replace virDomainGraphicsDefParseXMLEGLHeadless(hardcoded) with virDomainGraphicsEGLHeadlessDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 19 +-- src/conf/domain_conf.h | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 88e324e..f3b59ed 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 37/46] conf: Replace virDomainGraphicsDefParseXMLSpice(hardcoded) with virDomainGraphicsSpiceDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 272 ++--- src/conf/domain_conf.h | 37 +++--- 2 files changed, 26 insertions(+), 283 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b3ec111..20d731b 100644 ---

[RFCv2 33/46] conf: Replace virDomainGraphicsDefParseXMLDesktop(hardcoded) with virDomainGraphicsDesktopDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 24 +--- src/conf/domain_conf.h | 6 +++--- 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7709d71..ad129e9 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 35/46] conf: Add virSpiceChannelDef to help to parse the member 'channels' of virDomainGraphicsSpiceDef

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.h | 12 1 file changed, 12 insertions(+) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 08af9e1..df84763 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1708,6 +1708,13 @@ struct

[RFCv2 06/46] util: Add parsexml/formatbuf helper functions for virSocketAddr

2020-09-03 Thread Shi Lei
Implement the parsexml/formatbuf functions for virSocketAddr. Signed-off-by: Shi Lei --- src/libvirt_private.syms | 2 ++ src/util/virsocketaddr.c | 42 src/util/virsocketaddr.h | 26 + 3 files changed, 66 insertions(+), 4

[RFCv2 05/46] util: Add helper functions for 'bool' and 'time_t' and cooperate with xmlgen

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/libvirt_private.syms | 3 +++ src/util/virstring.c | 57 src/util/virstring.h | 9 +++ 3 files changed, 69 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 191eab0..4ad9d1e

[RFCv2 20/46] conf: Replace virNetworkDNSDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 164 +--- src/conf/network_conf.h | 14 ++-- 2 files changed, 9 insertions(+), 169 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 910d23f..2f1a88b 100644 ---

[RFCv2 02/46] maint: Check python3-clang

2020-09-03 Thread Shi Lei
Make sure python3-clang has been installed. Signed-off-by: Shi Lei --- meson.build | 5 + 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 1eadea3..f97a03b 100644 --- a/meson.build +++ b/meson.build @@ -2504,3 +2504,8 @@ if conf.has('WITH_QEMU') }

[RFCv2 46/46] conf: Replace virDomainGraphicsDefFormat(hardcoded) with virDomainGraphicsDefFormatBuf(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 152 ++--- src/conf/domain_conf.h | 14 ++-- 2 files changed, 15 insertions(+), 151 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 61dc7b3..64d6ae5 100644 ---

[RFCv2 28/46] conf: Replace virDomainGraphicsDefParseXMLVNC(hardcoded) with virDomainGraphicsVNCDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 71 ++ src/conf/domain_conf.h | 16 +- 2 files changed, 10 insertions(+), 77 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index aedf278..54b4da9 100644 ---

[RFCv2 38/46] conf: Generate virDomainGraphicsSpiceDefFormatElem and virDomainGraphicsSpiceDefFormatAttr

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 206 ++--- src/conf/domain_conf.h | 9 +- 2 files changed, 96 insertions(+), 119 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 20d731b..88e324e 100644 ---

[RFCv2 16/46] conf: Extract virNetworkDNSForwarderParseXML from virNetworkDNSParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 68 +++-- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 0ed2332..2af537c 100644 --- a/src/conf/network_conf.c +++

[RFCv2 45/46] conf: Replace virDomainGraphicsDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 140 ++- src/conf/domain_conf.h | 21 +++--- src/qemu/qemu_command.c | 2 + src/qemu/qemu_driver.c | 2 + src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_process.c | 4 ++

[RFCv2 00/46] RFC: Generate parsexml/formatbuf functions based on directives

2020-09-03 Thread Shi Lei
V1 here: [https://www.redhat.com/archives/libvir-list/2020-June/msg00357.html] Differ from V1: * Move the generator into scripts/xmlgen and rename it 'xmlgen'. * Declare virXMLChildNode and virXMLChildNodeSet in libvirt_private.syms. * Replace VIR_FREE with g_free and VIR_ALLOC[_N] with

[RFCv2 08/46] conf: Replace virNetworkDNSTxtDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- po/POTFILES.in | 1 + src/conf/meson.build| 1 + src/conf/network_conf.c | 45 ++--- src/conf/network_conf.h | 8 +--- 4 files changed, 13 insertions(+), 42 deletions(-) diff --git a/po/POTFILES.in

[RFCv2 14/46] conf: Replace virNetworkDNSHostDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 71 - src/conf/network_conf.h | 6 ++-- 2 files changed, 9 insertions(+), 68 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 44032e6..e2d0297 100644 ---

[RFCv2 01/46] scripts: Add a tool to generate xml parse/format functions

2020-09-03 Thread Shi Lei
This tool is used to generate parsexml/formatbuf functions. 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 tool. Signed-off-by: Shi Lei --- po/POTFILES.in |1 +

[RFCv2 07/46] conf: Extract error-checking code from virNetworkDNSTxtDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 49 - 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2fcd498..9ca8f74 100644 --- a/src/conf/network_conf.c +++

[RFCv2 42/46] conf: Replace virDomainGraphicsListenDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 109 --- src/conf/domain_conf.h | 18 ++--- src/qemu/qemu_command.c | 2 + src/qemu/qemu_hotplug.c | 1 + src/qemu/qemu_migration_cookie.c | 1 + src/qemu/qemu_process.c

[RFCv2 27/46] conf: Extract error-checking code from virDomainGraphicsDefParseXMLVNC

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 77 +- 1 file changed, 53 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index be07b40..aedf278 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 30/46] conf: Extract error-checking code from virDomainGraphicsDefParseXMLRDP

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 52 ++ 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ebd8ac3..8842f2a 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 23/46] conf: Replace virDomainGraphicsDefParseXMLSDL(hardcoded) with virDomainGraphicsSDLDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- po/POTFILES.in | 1 + src/conf/domain_conf.c | 53 ++ src/conf/domain_conf.h | 12 ++ src/conf/meson.build | 1 + 4 files changed, 11 insertions(+), 56 deletions(-) diff --git a/po/POTFILES.in

[RFCv2 13/46] conf: Extract error-checking code from virNetworkDNSHostDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 63 + 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 518f6da..44032e6 100644 --- a/src/conf/network_conf.c +++

[RFCv2 25/46] conf: Replace virDomainGraphicsAuthDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 92 +- src/conf/domain_conf.h | 13 +++--- 2 files changed, 18 insertions(+), 87 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 544b984..1fd2a06 100644 ---

[RFCv2 12/46] conf: Generate virNetworkDNSSrvDefFormatBuf

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 18 ++ src/conf/network_conf.h | 2 +- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 96664ab..518f6da 100644 --- a/src/conf/network_conf.c +++

[RFCv2 11/46] conf: Replace virNetworkDNSSrvDefParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 83 +++-- src/conf/network_conf.h | 16 2 files changed, 14 insertions(+), 85 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index dc39afb..96664ab 100644 ---

[RFCv2 26/46] conf: Generate format functions for virDomainGraphicsAuthDef

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 30 ++ src/conf/domain_conf.h | 4 ++-- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1fd2a06..be07b40 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 44/46] conf: Extract error-checking code from virDomainGraphicsDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 184 +++-- 1 file changed, 103 insertions(+), 81 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 007ee44..60bea6f 100644 --- a/src/conf/domain_conf.c +++

[RFCv2 31/46] conf: Replace virDomainGraphicsDefParseXMLRDP(hardcoded) with virDomainGraphicsRDPDefParseXML(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 41 ++--- src/conf/domain_conf.h | 10 +- 2 files changed, 7 insertions(+), 44 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8842f2a..14bb4d3 100644 ---

[RFCv2 15/46] conf: Generate virNetworkDNSHostDefFormatBuf

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 14 +++--- src/conf/network_conf.h | 2 +- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index e2d0297..0ed2332 100644 --- a/src/conf/network_conf.c +++

[RFCv2 19/46] conf: Extract error-checking code from virNetworkDNSDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 437c2c6..910d23f 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c

[RFCv2 29/46] conf: Generate virDomainGraphicsVNCDefFormatAttr

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 164 ++--- src/conf/domain_conf.h | 14 ++-- 2 files changed, 114 insertions(+), 64 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 54b4da9..ebd8ac3 100644 ---

[RFCv2 09/46] conf: Generate virNetworkDNSTxtDefFormatBuf

2020-09-03 Thread Shi Lei
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 036df20..7b17e44 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c

[RFCv2 17/46] conf: Replace virNetworkDNSForwarderParseXML(hardcoded) with namesake(generated)

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 36 +--- src/conf/network_conf.h | 6 +++--- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2af537c..608843d 100644 ---

[RFCv2 04/46] util: Add some xml-helper-functions to cooperate with xmlgen

2020-09-03 Thread Shi Lei
1) virXMLChildNode and virXMLChildNodeSet Parse xml without using xmlXPathContext. 2) virXMLChildPropString Support to parse attribute by path. 3) virXMLFlag Convert opaque to flag. Signed-off-by: Shi Lei --- src/libvirt_private.syms | 4 ++ src/util/virxml.c| 105

[RFCv2 22/46] conf: Extract embedded structs from virDomainGraphicsDef as standalone structs

2020-09-03 Thread Shi Lei
Extract those embedded structs from virDomainGraphicsDef so that we can specify directives on them. Signed-off-by: Shi Lei --- src/conf/domain_conf.h | 112 ++-- src/conf/virconftypes.h | 18 +++ 2 files changed, 80 insertions(+), 50 deletions(-) diff

[RFCv2 32/46] conf: Generate virDomainGraphicsRDPDefFormatAttr

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 86 +- src/conf/domain_conf.h | 3 +- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 14bb4d3..7709d71 100644 ---

[RFCv2 03/46] maint: Call xmlgen automatically when c-head-files change

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- scripts/meson.build | 8 src/conf/meson.build | 39 +++ src/meson.build | 6 ++ tests/meson.build| 1 + tools/meson.build| 2 ++ 5 files changed, 56 insertions(+) diff --git a/scripts/meson.build

[RFCv2 10/46] conf: Extract error-checking code from virNetworkDNSSrvDefParseXML

2020-09-03 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 107 +++- 1 file changed, 83 insertions(+), 24 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 7b17e44..dc39afb 100644 --- a/src/conf/network_conf.c +++

Re: [libvirt PATCH v2 3/3] qemu: add vdpa support

2020-09-03 Thread Jonathon Jongsma
On Thu, 2020-09-03 at 00:55 -0400, Laine Stump wrote: > On 9/2/20 3:25 PM, Jonathon Jongsma wrote: > > Enable for qemu domains. This provides > > basic > > support and does not support hotplug or migration. > > Is there something specifically preventing hotplug, or you just > haven't >

Re: [PATCH] qemu_namespace: Be tolerant to non-existent files when populating /dev

2020-09-03 Thread Ján Tomko
On a Thursday in 2020, Michal Privoznik wrote: In 6.7.0 release I've changed how domain namespace is built and populated. Previously it used to be done from a pre-exec hook (ran in the forked off child, just before dropping all privileges and exec()-ing QEMU), which not only meant we had to have

Re: [libvirt PATCH] ci: Disable verbose mode for cirrus-run

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 07:10:58PM +0200, Andrea Bolognani wrote: > It was temporarily enabled to help the upstream author validate > some changes, but now that 0.3.0 is out we can safely disable it > again. > > This reverts commit 9b5622d31f8c3036425721ab9c6b23067aa87034. > > Signed-off-by:

[libvirt PATCH] ci: Disable verbose mode for cirrus-run

2020-09-03 Thread Andrea Bolognani
It was temporarily enabled to help the upstream author validate some changes, but now that 0.3.0 is out we can safely disable it again. This reverts commit 9b5622d31f8c3036425721ab9c6b23067aa87034. Signed-off-by: Andrea Bolognani --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] util: add device name in errors from ethtool ioctls

2020-09-03 Thread Laine Stump
On 9/3/20 9:33 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé A bit of verbosity in error messages never hurt anyone. Reviewed-by: Laine Stump --- src/util/virnetdev.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-)

Re: [PATCH] qemu_namespace: Be tolerant to non-existent files when populating /dev

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 06:22:00PM +0200, Michal Privoznik wrote: > In 6.7.0 release I've changed how domain namespace is built and > populated. Previously it used to be done from a pre-exec hook > (ran in the forked off child, just before dropping all privileges > and exec()-ing QEMU), which not

[PATCH] qemu_namespace: Be tolerant to non-existent files when populating /dev

2020-09-03 Thread Michal Privoznik
In 6.7.0 release I've changed how domain namespace is built and populated. Previously it used to be done from a pre-exec hook (ran in the forked off child, just before dropping all privileges and exec()-ing QEMU), which not only meant we had to have two different code paths for creating a node in

Re: [libvirt PATCH] wireshark: Don't include config.h

2020-09-03 Thread Laine Stump
On 9/3/20 6:43 AM, Andrea Bolognani wrote: While both Debian and Fedora include the header in their development packages for Wireshark, that's not something that the upstream developers intended and arguably quite wrong, as config.h is obviously intended to only be used to drive the compilation

Re: [PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-09-03 Thread Michal Prívozník
On 9/3/20 4:42 PM, Daniel P. Berrangé wrote: On Thu, Sep 03, 2020 at 04:40:52PM +0200, Michal Prívozník wrote: On 9/3/20 2:09 PM, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 11:40:10AM +0200, Michal Privoznik wrote: As mentioned in previous commit, populating domain's namespace from

Re: [PATCH v2 2/2] vsh: Define HAVE_STDARG_H before including readline

2020-09-03 Thread Andrea Bolognani
On Thu, 2020-09-03 at 11:24 -0400, Laine Stump wrote: > On 9/3/20 4:24 AM, Michal Privoznik wrote: > > +/* In order to have proper rl_message declaration with older > > + * versions of readline, we have to declare this. See 9ea3424a178 > > + * for more info. */ > > +# define HAVE_STDARG_H > > #

[libvirt PATCH] remote: adapt augeas test case for dynamic polkit config change

2020-09-03 Thread Daniel P . Berrangé
We need to use @default_auth@ in the augeas test case to match its use in the main libvirtd.conf.in file. Signed-off-by: Daniel P. Berrangé --- Pushed as a CI fix src/remote/test_libvirtd.aug.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v2 2/2] vsh: Define HAVE_STDARG_H before including readline

2020-09-03 Thread Laine Stump
On 9/3/20 4:24 AM, Michal Privoznik wrote: As it turned out my previous commits which switched from HAVE_ to WITH_ and dropped stdarg.h detection were a bit too aggressive. Because of reasons described in 9ea3424a178 we need to define HAVE_STDARG_H before including readline otherwise macos build

Re: [PATCH v2 00/13] resolve hangs/crashes on libvirtd shutdown

2020-09-03 Thread Nikolay Shirokovskiy
one more time Sorry if this is on somebody's yet to be reviewed patches stack. It is not clear now in current workflow if this patch track lost or not. On 06.08.2020 17:10, Nikolay Shirokovskiy wrote: > polite ping > > On 23.07.2020 13:14, Nikolay Shirokovskiy wrote: >> I keep qemu VM event

Re: [PATCH] network: drop use of dummy tap device in bridges

2020-09-03 Thread Laine Stump
On 9/3/20 10:58 AM, Daniel P. Berrangé wrote: On Thu, Sep 03, 2020 at 10:56:25AM -0400, Laine Stump wrote: On 9/3/20 9:34 AM, Daniel P. Berrangé wrote: A long time ago we introduced a dummy tap device (e.g. virbr0-nic) that we attached to the bridge device created for virtual networks:

Re: [PATCH] network: drop use of dummy tap device in bridges

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 10:56:25AM -0400, Laine Stump wrote: > On 9/3/20 9:34 AM, Daniel P. Berrangé wrote: > > A long time ago we introduced a dummy tap device (e.g. virbr0-nic) that > > we attached to the bridge device created for virtual networks: > > > >commit

Re: [PATCH] network: drop use of dummy tap device in bridges

2020-09-03 Thread Laine Stump
On 9/3/20 9:34 AM, Daniel P. Berrangé wrote: A long time ago we introduced a dummy tap device (e.g. virbr0-nic) that we attached to the bridge device created for virtual networks: commit 5754dbd56d4738112a86776c09e810e32f7c3224 Author: Laine Stump Date: Wed Feb 9 03:28:12 2011 -0500

Re: [PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 04:40:52PM +0200, Michal Prívozník wrote: > On 9/3/20 2:09 PM, Daniel P. Berrangé wrote: > > On Wed, Jul 22, 2020 at 11:40:10AM +0200, Michal Privoznik wrote: > > > As mentioned in previous commit, populating domain's namespace > > > from pre-exec() hook is dangerous. This

Re: [PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-09-03 Thread Michal Prívozník
On 9/3/20 2:09 PM, Daniel P. Berrangé wrote: On Wed, Jul 22, 2020 at 11:40:10AM +0200, Michal Privoznik wrote: As mentioned in previous commit, populating domain's namespace from pre-exec() hook is dangerous. This commit moves population of the namespace with basic /dev nodes (e.g. /dev/null,

Re: [libvirt PATCH] remote: use SocketMode=0600 when polkit is not compiled

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 04:22:39PM +0200, Ján Tomko wrote: > On a Wednesday in 2020, Daniel P. Berrangé wrote: > > The systemd .socket unit files we ship for libvirt daemons use > > SocketMode=0666 on the assumption that libvirt is built with > > polkit which provides access control. > > > > Some

Re: [libvirt PATCH] remote: use SocketMode=0600 when polkit is not compiled

2020-09-03 Thread Ján Tomko
On a Wednesday in 2020, Daniel P. Berrangé wrote: The systemd .socket unit files we ship for libvirt daemons use SocketMode=0666 on the assumption that libvirt is built with polkit which provides access control. Some people, however, may have explicitly turned off polkit at build time and not

Re: [PATCH v2 2/2] vsh: Define HAVE_STDARG_H before including readline

2020-09-03 Thread Ján Tomko
On a Thursday in 2020, Michal Privoznik wrote: As it turned out my previous commits which switched from HAVE_ to WITH_ and dropped stdarg.h detection were a bit too aggressive. Because of reasons described in 9ea3424a178 we need to define HAVE_STDARG_H before including readline otherwise macos

Re: [PATCH v2 1/2] vsh: Introduce wrapper for add_history()

2020-09-03 Thread Ján Tomko
On a Thursday in 2020, Michal Privoznik wrote: This allows us to drop include of readline header files from virsh.c and virt-admin.c because they needed it only because of the add_history() function. Signed-off-by: Michal Privoznik --- tools/virsh.c | 10 ++ tools/virt-admin.c | 10

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 03:40:22PM +0200, Christian Ehrhardt wrote: > On Thu, Sep 3, 2020 at 12:36 PM Daniel P. Berrangé > wrote: > > > > On Thu, Sep 03, 2020 at 12:18:42PM +0200, Christian Ehrhardt wrote: > > > On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik > > > wrote: > > > > > > > > On

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Thu, Sep 3, 2020 at 12:36 PM Daniel P. Berrangé wrote: > > On Thu, Sep 03, 2020 at 12:18:42PM +0200, Christian Ehrhardt wrote: > > On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik wrote: > > > > > > On 9/2/20 3:58 PM, Christian Ehrhardt wrote: > > > > In c9ec7088 "storage: extend preallocation

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Thu, Sep 3, 2020 at 12:49 PM Richard Laager wrote: > > On 9/3/20 5:18 AM, Christian Ehrhardt wrote: > > Even if my fix lands, we are back to square one and would need > > virt-manager to submit a different XML. > > Remember: my target here would be to come back to pralloca=metadata as > > it

[PATCH] util: add device name in errors from ethtool ioctls

2020-09-03 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/util/virnetdev.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 3040f129d1..e1a4cc2bef 100644 --- a/src/util/virnetdev.c +++

[PATCH] network: drop use of dummy tap device in bridges

2020-09-03 Thread Daniel P . Berrangé
A long time ago we introduced a dummy tap device (e.g. virbr0-nic) that we attached to the bridge device created for virtual networks: commit 5754dbd56d4738112a86776c09e810e32f7c3224 Author: Laine Stump Date: Wed Feb 9 03:28:12 2011 -0500 Give each virtual network bridge its own

[libvirt PATCH] remove HAL node device driver

2020-09-03 Thread Pavel Hrdina
There was one attempt a year ago done by me to drop HAL [1] but it was never resolved. There was another time when Dan suggested to drop HAL driver [2] but it was decided to keep it around in case device assignment will be implemented for FreeBSD and the fact that virt-manager uses node device

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > On Thu, Sep 03, 2020 at 01:49:11PM +0200, Pavel Hrdina wrote: > > On Thu, Sep 03, 2020 at 03:21:51PM +0400, Roman Bogorodskiy wrote: > > > Daniel P. Berrangé wrote: > > > > > > > On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote: > > > > > Daniel

Re: [libvirt PATCH v2] meson: add -Wall and -Wextra explicitly

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 02:08:06PM +0200, Pavel Hrdina wrote: > If someone runs `meson setup --buildtype plain` meson ignores > warning_level=2 that is in our meson.build file. The implication is > that Meson will not automatically add -Wall which enables -Wformat. > > This breaks building

Re: [PATCH v1 16/34] qemuDomainBuildNamespace: Populate basic /dev from daemon's namespace

2020-09-03 Thread Daniel P . Berrangé
On Wed, Jul 22, 2020 at 11:40:10AM +0200, Michal Privoznik wrote: > As mentioned in previous commit, populating domain's namespace > from pre-exec() hook is dangerous. This commit moves population > of the namespace with basic /dev nodes (e.g. /dev/null, /dev/kvm, > etc.) into daemon's namespace.

[libvirt PATCH v2] meson: add -Wall and -Wextra explicitly

2020-09-03 Thread Pavel Hrdina
If someone runs `meson setup --buildtype plain` meson ignores warning_level=2 that is in our meson.build file. The implication is that Meson will not automatically add -Wall which enables -Wformat. This breaks building libvirt from git with the buildtype set to plain. There is an issue reported

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 01:49:11PM +0200, Pavel Hrdina wrote: > On Thu, Sep 03, 2020 at 03:21:51PM +0400, Roman Bogorodskiy wrote: > > Daniel P. Berrangé wrote: > > > > > On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote: > > > > Daniel P. Berrangé wrote: > > > > > > > > > On

Re: [PATCH] Modify virCPUarmCompare to perform compare actions

2020-09-03 Thread Zhenyu Zheng
Hi, Thanks alot for the review and feedback. As for host-passthrough cases, I have some other understandings, if I understand correctly, what you mean is that if a vm uses host-passthrough, it can migrate to any other host, since it asks for host-passthrough. In my point of view, I think in real

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Pavel Hrdina
On Thu, Sep 03, 2020 at 03:21:51PM +0400, Roman Bogorodskiy wrote: > Daniel P. Berrangé wrote: > > > On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote: > > > Daniel P. Berrangé wrote: > > > > > > > On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote: > > > > >

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote: > > Daniel P. Berrangé wrote: > > > > > On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote: > > > > Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests > > > >

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Richard Laager
On 9/3/20 5:18 AM, Christian Ehrhardt wrote: > Even if my fix lands, we are back to square one and would need > virt-manager to submit a different XML. > Remember: my target here would be to come back to pralloca=metadata as > it was before for image creations from virt-manager. Why is that your

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote: > Daniel P. Berrangé wrote: > > > On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote: > > > Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests dependencies. > > > > > > Without that, FreeBSD 11.x, which

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Roman Bogorodskiy
Daniel P. Berrangé wrote: > On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote: > > Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests dependencies. > > > > Without that, FreeBSD 11.x, which uses the GNU ld, fails to link tests. > > Interestingly, newer FreeBSD

[libvirt PATCH] wireshark: Don't include config.h

2020-09-03 Thread Andrea Bolognani
While both Debian and Fedora include the header in their development packages for Wireshark, that's not something that the upstream developers intended and arguably quite wrong, as config.h is obviously intended to only be used to drive the compilation of Wireshark itself. The Arch Linux package

Re: [PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote: > Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests dependencies. > > Without that, FreeBSD 11.x, which uses the GNU ld, fails to link tests. > Interestingly, newer FreeBSD versions that use LLVM ld tolerate this >

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 12:18:42PM +0200, Christian Ehrhardt wrote: > On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik wrote: > > > > On 9/2/20 3:58 PM, Christian Ehrhardt wrote: > > > In c9ec7088 "storage: extend preallocation flags support for qemu-img" > > > the option to fallocate was added

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Daniel P . Berrangé
On Wed, Sep 02, 2020 at 03:58:14PM +0200, Christian Ehrhardt wrote: > In c9ec7088 "storage: extend preallocation flags support for qemu-img" > the option to fallocate was added and meant to be active when (quote): > "the XML described storage matches its " > > Up until recently 81a3042a12

Re: [PATCH] news: add 1 improvement for v6.6.0

2020-09-03 Thread Yanqiu Zhang
Ok. Thank you both! On Thu, Sep 3, 2020 at 6:10 PM Andrea Bolognani wrote: > On Thu, 2020-09-03 at 11:16 +0800, Han Han wrote: > > The summary of commit msg could be more direct: > > news: qemu: Support TLS for NBD connections for pull mode backup > > > > And then you can skip the body of

[PATCH] tests: add FreeBSD dependencies

2020-09-03 Thread Roman Bogorodskiy
Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests dependencies. Without that, FreeBSD 11.x, which uses the GNU ld, fails to link tests. Interestingly, newer FreeBSD versions that use LLVM ld tolerate this behaviour and builds successfully as is. Signed-off-by: Roman Bogorodskiy ---

Re: [PATCH] storage: only fallocate when allocation matches capacity

2020-09-03 Thread Christian Ehrhardt
On Wed, Sep 2, 2020 at 6:49 PM Michal Privoznik wrote: > > On 9/2/20 3:58 PM, Christian Ehrhardt wrote: > > In c9ec7088 "storage: extend preallocation flags support for qemu-img" > > the option to fallocate was added and meant to be active when (quote): > > "the XML described storage matches its

Re: [PATCH] news: add 1 improvement for v6.6.0

2020-09-03 Thread Andrea Bolognani
On Thu, 2020-09-03 at 11:16 +0800, Han Han wrote: > The summary of commit msg could be more direct: > news: qemu: Support TLS for NBD connections for pull mode backup > > And then you can skip the body of commit msg. This is a good suggestion, which I've applied before adding my Reviewed-by:

Re: [libvirt PATCH] remote: use SocketMode=0600 when polkit is not compiled

2020-09-03 Thread Jiri Denemark
On Wed, Sep 02, 2020 at 18:54:36 +0100, Daniel P. Berrangé wrote: > The systemd .socket unit files we ship for libvirt daemons use > SocketMode=0666 on the assumption that libvirt is built with > polkit which provides access control. > > Some people, however, may have explicitly turned off

[PATCH v2 0/2] Fix broken build with readline

2020-09-03 Thread Michal Privoznik
This is a v2 of: https://www.redhat.com/archives/libvir-list/2020-September/msg00107.html diff to v1: - Patch 1/2 is completely new, it removes include of readline from virsh.c and virt-admin.c, so that patch 2/2 can be unchanged. Michal Prívozník (2): vsh: Introduce wrapper for

[PATCH v2 2/2] vsh: Define HAVE_STDARG_H before including readline

2020-09-03 Thread Michal Privoznik
As it turned out my previous commits which switched from HAVE_ to WITH_ and dropped stdarg.h detection were a bit too aggressive. Because of reasons described in 9ea3424a178 we need to define HAVE_STDARG_H before including readline otherwise macos build fails. Honestly, I still don't fully

[PATCH v2 1/2] vsh: Introduce wrapper for add_history()

2020-09-03 Thread Michal Privoznik
This allows us to drop include of readline header files from virsh.c and virt-admin.c because they needed it only because of the add_history() function. Signed-off-by: Michal Privoznik --- tools/virsh.c | 10 ++ tools/virt-admin.c | 10 ++ tools/vsh.c| 12