Re: [libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE

2019-11-13 Thread Daniel P . Berrangé
On Wed, Nov 13, 2019 at 10:33:09AM +0100, Ján Tomko wrote: > Use this GLib macro instead of bswap_32 from gnulib. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_driver.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) Missing bootstrap.conf change to remove byteswap >

Re: [libvirt] [PATCH 1/2] util: use g_vsnprintf

2019-11-13 Thread Daniel P . Berrangé
On Wed, Nov 13, 2019 at 10:33:08AM +0100, Ján Tomko wrote: > Instead of vsnprintf from gnulib, use g_vsnprintf from GLib. > > Signed-off-by: Ján Tomko > --- > src/util/virerror.c | 4 ++-- > src/util/virtypedparam.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) The change to

[libvirt] [rust PATCH] api_tests.py: Fix all issues reported by flake8

2019-11-13 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- tools/api_tests.py | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/api_tests.py b/tools/api_tests.py index 9e66c92..7f0e3cb 100644 --- a/tools/api_tests.py +++ b/tools/api_tests.py @@ -6,36 +6,39 @@ import

[libvirt] [rust PATCH] gitpublish: Fix subject prefix

2019-11-13 Thread Andrea Bolognani
All libvirt-related projects, including language bindings, follow a certain convention for subject prefix, and there's no reason libvirt-rust should be any different. Signed-off-by: Andrea Bolognani --- .gitpublish | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)

Re: [libvirt] [PATCH 6/6] docs: add page describing the libvirt daemons

2019-11-13 Thread Kashyap Chamarthy
On Mon, Nov 11, 2019 at 03:24:28PM +0100, Ján Tomko wrote: > On Fri, Nov 08, 2019 at 11:21:12AM +, Daniel P. Berrangé wrote: [...] > > +Sockets > > +--- > > + > > +When running in system mode, `libvirtd` exposes three UNIX domain sockets, > > and > > +optionally, one or two TCP sockets

[libvirt] [PATCH 0/5] Introduce the support of Intel RDT-MBM

2019-11-13 Thread Wang Huaqiang
RDT is the short for Intel Resource Director Technology, consists of four sub-technologies until now: -. CAT for cache allocation -. CMT for cache usage monitoring -. MBA for memory bandwidth allocation -. MBM for memory bandwidth usage monitoring The Linux kernel interface is

[libvirt] [PATCH 5/5] virsh: show memoryBW info in 'virsh domstats' command

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Introduce an option '--memory' for showing memory related information. The memory bandwidth infomatio is listed as: Domain: 'libvirt-vm' memory.bandwidth.monitor.count=4 memory.bandwidth.monitor.0.name=vcpus_0-4 memory.bandwidth.monitor.0.vcpus=0-4

[libvirt] [PATCH 4/5] conf: Parse dommon configure file for memorytune monitors

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Create memory bandwidth monitor. Following domain configuration changes create two memory bandwidth monitors: one is monitoring the bandwidth consumed by vCPU 0, another is for vCPU 5. ``` +

[libvirt] [PATCH 2/5] conf: showing cache/memoryBW monitor features in capabilities

2019-11-13 Thread Wang Huaqiang
From: Huaqiang We learned that the hardware features of CAT, CMT, MBA and MBM are orthogonal ones, if CAT or MBA is not supported in system, but CMT or MBM are supported, then the cache monitor or memoryBW monitor features may not be correctly displayed in host capabilities through command

Re: [libvirt] [PATCH 2/9] Remove VIR_STRNDUP usage that passes -1

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Replace all the usage of VIR_STRNDUP(dest, b, p ? p - b : -1) with separate calls to g_strndup/g_strdup. Signed-off-by: Ján Tomko --- src/bhyve/bhyve_parse_command.c | 38 + src/libxl/xen_common.c | 15

Re: [libvirt] [PATCH v3 4/6] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2019-11-13 Thread Pavel Hrdina
On Fri, Nov 01, 2019 at 06:35:46PM +0100, Marc Hartmayer wrote: > This allows us later to get rid of another usage of the global > variable `remoteProgram`. > > Signed-off-by: Marc Hartmayer > --- > src/remote/remote_daemon_dispatch.c | 19 +++ > 1 file changed, 15

[libvirt] [PATCH] locking: fix build with older sanlock

2019-11-13 Thread Ján Tomko
../../src/locking/lock_driver_sanlock.c:106:17: error: incompatible pointer types assigning to 'char **' from 'char *' [-Werror,-Wincompatible-pointer-types] message = g_strdup_printf(_("sanlock error %d"), err); ^ ~~~ Fixes:

Re: [libvirt] [PATCH v3 3/6] remote: Save reference to program in daemonClientEventCallback

2019-11-13 Thread Pavel Hrdina
On Fri, Nov 01, 2019 at 06:35:45PM +0100, Marc Hartmayer wrote: > As a result, you can later determine during the callback which program > was used. This makes it easier to refactor the code in the future and > is less prone to error. > > Signed-off-by: Marc Hartmayer > --- >

Re: [libvirt] [PATCH Rust v2] api_tests.py: update to use Python 3

2019-11-13 Thread Andrea Bolognani
On Tue, 2019-11-12 at 13:27 -0700, Zixing Liu wrote: > Signed-off-by: Zixing Liu > --- > tools/api_tests.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Looks good now! Reviewed-by: Andrea Bolognani and pushed. Congratulations on your first contribution to libvirt-rust :)

[libvirt] [PATCH 1/2] util: use g_vsnprintf

2019-11-13 Thread Ján Tomko
Instead of vsnprintf from gnulib, use g_vsnprintf from GLib. Signed-off-by: Ján Tomko --- src/util/virerror.c | 4 ++-- src/util/virtypedparam.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index 54cd5b64b9..bf79a8aec7

[libvirt] [PATCH 0/2] Eliminate two more gnulib modules (glib chronicles)

2019-11-13 Thread Ján Tomko
Remove the need to use: byteswap vsnprintf by using the GLib counterparts Ján Tomko (2): util: use g_vsnprintf qemu: use GUINT32_SWAP_LE_BE src/qemu/qemu_driver.c | 10 +- src/util/virerror.c | 4 ++-- src/util/virtypedparam.c | 2 +- 3 files changed, 8 insertions(+), 8

[libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE

2019-11-13 Thread Ján Tomko
Use this GLib macro instead of bswap_32 from gnulib. Signed-off-by: Ján Tomko --- src/qemu/qemu_driver.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c969a3d463..85b0c9cb79 100644 ---

Re: [libvirt] [rust PATCH] api_tests.py: Fix all issues reported by flake8

2019-11-13 Thread Erik Skultety
On Wed, Nov 13, 2019 at 12:03:56PM +0100, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 5/6] rpc: Introduce virNetServerGetProgramLocked helper function

2019-11-13 Thread Pavel Hrdina
On Fri, Nov 01, 2019 at 06:35:47PM +0100, Marc Hartmayer wrote: > This patch introduces virNetServerGetProgramLocked. It's a function to > determine which program has to be used for a given @msg. This function > will be reused in the next patch. > > Signed-off-by: Marc Hartmayer > --- >

Re: [libvirt] [PATCH v3 6/6] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-13 Thread Pavel Hrdina
On Fri, Nov 01, 2019 at 06:35:48PM +0100, Marc Hartmayer wrote: > Use virNetServerGetProgram() to determine the virNetServerProgram > instead of using hard coded global variables. This allows us to remove > the global variables @remoteProgram and @qemuProgram as they're now no > longer necessary.

Re: [libvirt] [rust PATCH] gitpublish: Fix subject prefix

2019-11-13 Thread Sahid Orentino Ferdjaoui
On Wed, Nov 13, 2019 at 10:24:29AM +0100, Andrea Bolognani wrote: > All libvirt-related projects, including language bindings, > follow a certain convention for subject prefix, and there's no > reason libvirt-rust should be any different. > > Signed-off-by: Andrea Bolognani > --- > .gitpublish

Re: [libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE

2019-11-13 Thread Daniel P . Berrangé
On Wed, Nov 13, 2019 at 12:44:57PM +0100, Peter Krempa wrote: > On Wed, Nov 13, 2019 at 10:38:06 +, Daniel Berrange wrote: > > On Wed, Nov 13, 2019 at 10:33:09AM +0100, Ján Tomko wrote: > > > Use this GLib macro instead of bswap_32 from gnulib. > > > > > > Signed-off-by: Ján Tomko > > > ---

[libvirt] [PATCH 3/5] cachetune schema: a looser check for the order of and element

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Originally, inside , it requires the element to be in the position before , and following configuration is not permitted by schema, but it is better to let it be valid. ^ |__ Not permitted originally because it is in the place

[libvirt] [PATCH 1/5] util, resctrl: using 64bit interface instead of 32bit for counters

2019-11-13 Thread Wang Huaqiang
From: Huaqiang The underlying resctrl monitoring is actually using 64 bit counters, not the 32bit one. Correct this by using 64bit interfaces. Signed-off-by: Huaqiang --- src/qemu/qemu_driver.c | 4 ++-- src/util/virfile.c | 40 src/util/virfile.h

[libvirt] [PATCH Rust v2] api_tests.py: update to use Python 3

2019-11-13 Thread liushuyu
From: Zixing Liu Signed-off-by: Zixing Liu --- tools/api_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/api_tests.py b/tools/api_tests.py index b26ec34..9e66c92 100644 --- a/tools/api_tests.py +++ b/tools/api_tests.py @@ -47,10 +47,10 @@ def main():

Re: [libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 10:38:06 +, Daniel Berrange wrote: > On Wed, Nov 13, 2019 at 10:33:09AM +0100, Ján Tomko wrote: > > Use this GLib macro instead of bswap_32 from gnulib. > > > > Signed-off-by: Ján Tomko > > --- > > src/qemu/qemu_driver.c | 10 +- > > 1 file changed, 5

Re: [libvirt] [PATCH v2 4/4] syntax-check: forbid usage of snprintf

2019-11-13 Thread Pavel Hrdina
On Wed, Nov 13, 2019 at 10:44:18AM -0600, Eric Blake wrote: > On 11/13/19 10:33 AM, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > > > new in v2 > > > > build-aux/syntax-check.mk | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git

Re: [libvirt] [PATCH v3 2/6] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2019-11-13 Thread Marc Hartmayer
On Fri, Nov 08, 2019 at 04:52 PM +0100, Pavel Hrdina wrote: > On Fri, Nov 01, 2019 at 06:35:44PM +0100, Marc Hartmayer wrote: >> The commit 'close callback: move it to driver' (88f09b75eb99) moved >> the responsibility for the close callback to the driver. But if the >> driver doesn't support the

Re: [libvirt] [PATCH 1/9] Remove VIR_STRDUP usage that snuck in

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Fixes: 224d269f19f0a6c496dd2218f934a54742d51708 Signed-off-by: Ján Tomko --- src/qemu/qemu_domain.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) Reviewed-by: Daniel Henrique Barboza -- libvir-list mailing list

Re: [libvirt] [PATCH 3/9] Remove VIR_STRNDUP usage that subtracts from a non-NULL pointer

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Use g_strndup in all the cases where we check upfront whether a pointer is non-NULL and then use it to calculate the copied length. Signed-off-by: Ján Tomko --- src/util/virsysinfo.c | 241 -- 1 file changed,

Re: [libvirt] [PATCH] qemu: Warn verbosely if using old loader:nvram pairs

2019-11-13 Thread Jim Fehlig
On 11/13/19 9:20 AM, Michal Privoznik wrote: > On 11/12/19 11:17 PM, Jim Fehlig wrote: >> On 11/11/19 9:42 AM, Michal Privoznik wrote: >>> There are two ways for specifying loader:nvram pairs: >>> >>>     1) --with-loader-nvram configure option >>>     2) nvram variable in qemu.conf >>> >>> Since

[libvirt] [PATCH v2 4/4] syntax-check: forbid usage of snprintf

2019-11-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- new in v2 build-aux/syntax-check.mk | 8 1 file changed, 8 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index ff1198ca73..78458dce53 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -469,6

[libvirt] [PATCH v2 2/4] [ACKED] bootstrap.conf: remove usage of snprintf gnulib module

2019-11-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- bootstrap.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap.conf b/bootstrap.conf index 4c784487e2..747040a1a3 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -74,7 +74,6 @@ setenv setsockopt sigaction sigpipe

[libvirt] [PATCH v2 3/4] syntax-check: update of sprintf rule to mention g_snpritnf

2019-11-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- new in v2 build-aux/syntax-check.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 1c46928ac7..ff1198ca73 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk

Re: [libvirt] [PATCH v2 4/4] syntax-check: forbid usage of snprintf

2019-11-13 Thread Eric Blake
On 11/13/19 10:33 AM, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- new in v2 build-aux/syntax-check.mk | 8 1 file changed, 8 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index ff1198ca73..78458dce53 100644 ---

Re: [libvirt] [PATCH v3 6/6] remote/rpc: Use virNetServerGetProgram() to determine the program

2019-11-13 Thread Marc Hartmayer
On Wed, Nov 13, 2019 at 09:52 AM +0100, Pavel Hrdina wrote: > On Fri, Nov 01, 2019 at 06:35:48PM +0100, Marc Hartmayer wrote: >> Use virNetServerGetProgram() to determine the virNetServerProgram >> instead of using hard coded global variables. This allows us to remove >> the global variables

Re: [libvirt] [PATCH v2 4/5] conf: report errors when parsing video resolution

2019-11-13 Thread Cole Robinson
I pushed the first three patches. Comments below On 10/23/19 1:46 PM, Jonathon Jongsma wrote: > The current code doesn't properly handle errors when parsing a video > device's resolution. > > This patch changes the parse function signature to return an error > when we're missing an 'x' or 'y'

Re: [libvirt] [PATCH] qemu: Warn verbosely if using old loader:nvram pairs

2019-11-13 Thread Jim Fehlig
On 11/13/19 9:20 AM, Michal Privoznik wrote: > On 11/12/19 11:17 PM, Jim Fehlig wrote: >> On 11/11/19 9:42 AM, Michal Privoznik wrote: >>> There are two ways for specifying loader:nvram pairs: >>> >>>     1) --with-loader-nvram configure option >>>     2) nvram variable in qemu.conf >>> >>> Since

Re: [libvirt] [PATCH v2 3/4] syntax-check: update of sprintf rule to mention g_snpritnf

2019-11-13 Thread Eric Blake
On 11/13/19 10:33 AM, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- new in v2 build-aux/syntax-check.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 1c46928ac7..ff1198ca73 100644 ---

Re: [libvirt] [PATCH v2 5/5] conf: report errors when parsing video acceleration

2019-11-13 Thread Cole Robinson
On 10/23/19 1:46 PM, Jonathon Jongsma wrote: > In order to differentiate between a configuration that does not specify > any video acceleration and one that is incorrectly specified, change the > signature of virDomainVideoAccelDefParseXML() to return an error > response. > > If any of the values

[libvirt] [PATCH v2 1/4] replace use of gnulib snprintf by g_snprintf

2019-11-13 Thread Pavel Hrdina
Glib implementation follows the ISO C99 standard so it's safe to replace the gnulib implementation. Signed-off-by: Pavel Hrdina --- changes in v2: - don't replace snprintf in tools/virt-login-shell.c src/hyperv/hyperv_driver.c| 4 +- src/libxl/libxl_conf.c

[libvirt] [PATCH v2 0/4] replace snprintf by g_snprintf (kill-a-gnulib-module-a-day initiative)

2019-11-13 Thread Pavel Hrdina
Pavel Hrdina (4): replace use of gnulib snprintf by g_snprintf bootstrap.conf: remove usage of snprintf gnulib module syntax-check: update of sprintf rule to mention g_snpritnf syntax-check: forbid usage of snprintf bootstrap.conf| 1 -

[libvirt] [PATCH 5/5] docs: document virConnectListAllStoragePools in esx

2019-11-13 Thread Pino Toscano
Signed-off-by: Pino Toscano --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index c362bf3a15..278697506c 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -55,6 +55,15 @@ + + + esx driver:

[libvirt] [PATCH 3/5] esx: split targetToStoragePool helper

2019-11-13 Thread Pino Toscano
Move the creation of a virStoragePtr object from the esxVI_HostInternetScsiHbaStaticTarget object of a target out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 32

Re: [libvirt] [PATCH 5/9] Remove VIR_STRNDUP usage with subtraction

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Remove all the uses that use subtraction in their length argument. Signed-off-by: Ján Tomko --- Reviewed-by: Daniel Henrique Barboza -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/2] replace use of gnulib snprintf by g_snprintf

2019-11-13 Thread Pavel Hrdina
Glib implementation follows the ISO C99 standard so it's safe to replace the gnulib implementation. Signed-off-by: Pavel Hrdina --- src/hyperv/hyperv_driver.c| 4 +- src/libxl/libxl_conf.c| 22 +-- src/libxl/libxl_migration.c | 4 +-

Re: [libvirt] [PATCH 8/9] util: remove VIR_STRDUP and VIR_STRNDUP

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Signed-off-by: Ján Tomko --- src/libvirt_private.syms | 2 -- src/util/virstring.c | 49 src/util/virstring.h | 69 3 files changed, 120 deletions(-) (assuming the

Re: [libvirt] [PATCH 1/2] replace use of gnulib snprintf by g_snprintf

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 15:00:31 +0100, Pavel Hrdina wrote: > Glib implementation follows the ISO C99 standard so it's safe to replace > the gnulib implementation. > > Signed-off-by: Pavel Hrdina > --- Please add a syntax-check rule forbidding use of snprintf. Reviewed-by: Peter Krempa --

[libvirt] [PATCH 01/12] libxl: do not use G_REGEX_EXTENDED

2019-11-13 Thread Ján Tomko
This flag is not needed to use extended regular expression syntax with GRegex and it makes GRegex ignore whitespace in the regex. Remove the unintended usage, even though it should not matter in this case. Signed-off-by: Ján Tomko --- src/libxl/libxl_capabilities.c | 2 +- 1 file changed, 1

[libvirt] [PATCH 04/12] libxl: use g_autofree in xenParseSxprVifRate

2019-11-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/libxl/xen_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index c31a5c952e..c06ab6e995 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1060,7 +1060,7 @@ static

[libvirt] [PATCH 07/12] storage: use GRegex virStorageBackendLogicalParseVolExtents

2019-11-13 Thread Ján Tomko
Using GRegex simplifies the code since g_match_info_fetch will copy the matched substring for us. Signed-off-by: Ján Tomko --- src/storage/storage_backend_logical.c | 49 +++ 1 file changed, 13 insertions(+), 36 deletions(-) diff --git

Re: [libvirt] [PATCH 4/9] Remove VIR_STRNDUP usage with checked pointers

2019-11-13 Thread Daniel Henrique Barboza
This patch failed to compile for me with the following error: ../../tools/vsh.c:70:1: error: 'vshErrorOOM' defined but not used [-Werror=unused-function] 70 | vshErrorOOM(void) | ^~~ Apparently you removed the last call to vshErrorOOM() in the tools/vsh.c changes here. For

Re: [libvirt] [PATCH 0/8] Remove use of 'areadlink' gnulib module (kill-a-gnulib-module-a-day initiative)

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 14:07:01 +0100, Peter Krempa wrote: > This removes use of 'areadlink' by using 'g_file_read_link' and fixes a > few insane uses. > > Note that I'll post the actual module deletion from bootstrap.conf > separately as touching that file results in lengthy rebuilds. The

Re: [libvirt] [PATCH 2/2] bootstrap.conf: remove usage of snprintf gnulib module

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 15:00:32 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > bootstrap.conf | 1 - > 1 file changed, 1 deletion(-) Thanks for participating in this initiative! I'll queue this with my R-b applied to my branch. -- libvir-list mailing list

[libvirt] [PATCH 8/8] qemu: domcaps: Simplify adding new domaincaps based on qemu caps

2019-11-13 Thread Peter Krempa
Add a helper which converts qemu emulator capabilities to the domain capability XML. This will simplify future additions of new features. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 39 ++-- 1 file changed, 28 insertions(+), 11 deletions(-)

Re: [libvirt] [PATCH 1/2] util: use g_vsnprintf

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 10:33:08 +0100, Ján Tomko wrote: > Instead of vsnprintf from gnulib, use g_vsnprintf from GLib. > > Signed-off-by: Ján Tomko > --- > src/util/virerror.c | 4 ++-- > src/util/virtypedparam.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) I think you

[libvirt] [PATCH 6/8] qemu: domcaps: Initialize all features

2019-11-13 Thread Peter Krempa
While the qemu driver currently implements all domain capability features, we should initialize all features using the helper similarly to how we do it in drivers which don't support any. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 2 ++ 1 file changed, 2 insertions(+) diff

[libvirt] [PATCH 2/8] conf: domaincaps: Extract formatting of the subelement

2019-11-13 Thread Peter Krempa
Extract it to virDomainCapsFormatFeatures so that the main function does not get so bloated over time. Signed-off-by: Peter Krempa --- src/conf/domain_capabilities.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_capabilities.c

[libvirt] [PATCH 7/8] domaincaps: Store domain capability features in an array

2019-11-13 Thread Peter Krempa
Declare the capabilities as enum values and store them in an array. This makes adding new features more straightforward and simplifies the formatter which now doesn't require changing. Signed-off-by: Peter Krempa --- src/conf/domain_capabilities.c | 30 +++---

[libvirt] [PATCH 1/8] conf: domaincaps: Replace FORMAT_SINGLE macro by a function

2019-11-13 Thread Peter Krempa
Introduce qemuDomainCapsFeatureFormatSimple which does exactly the same thing but it's a function. Signed-off-by: Peter Krempa --- src/conf/domain_capabilities.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_capabilities.c

Re: [libvirt] [PATCH Rust 1/4] libvirt-rust: stream: add more functions in stream

2019-11-13 Thread Sahid Orentino Ferdjaoui
On Tue, Nov 12, 2019 at 02:44:42PM -0700, Zixing Liu wrote: > * added new functions: virStreamNew virStreamEventUpdateCallback > virStreamEventRemoveCallback > * added new constants: VIR_STREAM_NONBLOCK > * added new types/aliases: StreamFlags > * changed the previous `new` associate function to

[libvirt] [PATCH 0/2] replace snprintf by g_snprintf (kill-a-gnulib-module-a-day initiative)

2019-11-13 Thread Pavel Hrdina
Pavel Hrdina (2): replace use of gnulib snprintf by g_snprintf bootstrap.conf: remove usage of snprintf gnulib module bootstrap.conf| 1 - src/hyperv/hyperv_driver.c| 4 +- src/libxl/libxl_conf.c| 22 +--

[libvirt] [PATCH 0/2] qemu: block: Fix two bugs related to usage of blockdev (blockdev-add saga)

2019-11-13 Thread Peter Krempa
Peter Krempa (2): qemu: blockjob: Transfer 'readonly' state of images after active layer block commit qemu: snapshot: Fix inactive external snapshots when backing chain is present src/qemu/qemu_blockjob.c | 2 ++ src/qemu/qemu_driver.c | 25 +++-- 2 files

[libvirt] [PATCH 1/2] qemu: blockjob: Transfer 'readonly' state of images after active layer block commit

2019-11-13 Thread Peter Krempa
When commiting a different image becomes the disk source. Since we store the readonly flag per-image we must update it to the same state the original image had. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[libvirt] [PATCH 2/2] qemu: snapshot: Fix inactive external snapshots when backing chain is present

2019-11-13 Thread Peter Krempa
The inactive external snapshot code replaced the file name in the virStorageSource but did not touch the backing files. This meant that after an inactive snapshot the backing chain recorded in the inactive XML (which is used with -blockdev) would be incorrect. Fix it by adding a new layer if

Re: [libvirt] [PATCH 0/6] docs: some refactoring and new docs about RPM deployment

2019-11-13 Thread Kashyap Chamarthy
On Mon, Nov 11, 2019 at 02:39:35PM +, Daniel P. Berrangé wrote: [...] > NB writing content is RST is independent of eliminating XSLT as the > templating system. Elimination oif XSLT depends what templating > system we use, either Sphinx or Pelican - I've not delved into it > to figure out

[libvirt] [PATCH 0/5] esx: implement virConnectListAllStoragePools

2019-11-13 Thread Pino Toscano
Make the virConnectListAllStoragePools API work for esx storage pools by implementing the internal connectListAllStoragePools storage API. Pino Toscano (5): esx: split datastoreToStoragePoolPtr helper esx: split datastorePoolType helper esx: split targetToStoragePool helper esx: implement

[libvirt] [PATCH 1/5] esx: split datastoreToStoragePoolPtr helper

2019-11-13 Thread Pino Toscano
Move the creation of a virStoragePtr object from the esxVI_ObjectContent object of a datastore out of esxStoragePoolLookupByName in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 45

Re: [libvirt] [PATCH 7/9] tests: delete tests for VIR_STR(N)DUP

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Signed-off-by: Ján Tomko --- tests/virstringtest.c | 136 -- 1 file changed, 136 deletions(-) Reviewed-by: Daniel Henrique Barboza -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 2/2] bootstrap.conf: remove usage of snprintf gnulib module

2019-11-13 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- bootstrap.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap.conf b/bootstrap.conf index 4c784487e2..747040a1a3 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -74,7 +74,6 @@ setenv setsockopt sigaction sigpipe -snprintf socket stat-time

Re: [libvirt] [PATCH 9/9] docs: hacking: document removal of VIR_STR(N)DUP

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Signed-off-by: Ján Tomko --- docs/hacking.html.in | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Daniel Henrique Barboza -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 0/6] docs: some refactoring and new docs about RPM deployment

2019-11-13 Thread Daniel P . Berrangé
On Wed, Nov 13, 2019 at 02:53:21PM +0100, Kashyap Chamarthy wrote: > On Mon, Nov 11, 2019 at 02:39:35PM +, Daniel P. Berrangé wrote: > > [...] > > > > NB writing content is RST is independent of eliminating XSLT as the > > templating system. Elimination oif XSLT depends what templating > >

[libvirt] [PATCH 12/12] tests: use GRegex in vboxsnapshotxmltest

2019-11-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- tests/vboxsnapshotxmltest.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/vboxsnapshotxmltest.c b/tests/vboxsnapshotxmltest.c index 8faf2b9c26..d1a7522931 100644 --- a/tests/vboxsnapshotxmltest.c +++

[libvirt] [PATCH 06/12] libxl: remove 'ret' from xenParseSxprVifRate

2019-11-13 Thread Ján Tomko
Now that the cleanup section is empty, the ret variable is no longer necessary. Signed-off-by: Ján Tomko --- src/libxl/xen_common.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 15a2db8add..0cb7f0f331 100644

[libvirt] [PATCH 02/12] remove unused regex.h includes

2019-11-13 Thread Ján Tomko
The code using regexes got moved, but the include stayed. Signed-off-by: Ján Tomko --- src/libxl/libxl_driver.c | 1 - src/storage/storage_util.c | 1 - src/util/viriscsi.c| 2 -- src/util/virnetdevtap.c| 1 - tests/testutils.c | 1 - 5 files changed, 6 deletions(-) diff

[libvirt] [PATCH 10/12] util: use GRegex in virStringSearch

2019-11-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virstring.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index 283cf8c8d8..3da793c87a 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@

[libvirt] [PATCH 05/12] libxl: use GRegex in xenParseSxprVifRate

2019-11-13 Thread Ján Tomko
Use GRegex from GLib instead of regcomp. Signed-off-by: Ján Tomko --- src/libxl/xen_common.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index c06ab6e995..15a2db8add 100644 --- a/src/libxl/xen_common.c

[libvirt] [PATCH 03/12] libxl: use GRegex in libxlGetAutoballoonConf

2019-11-13 Thread Ján Tomko
Replace the use of regcomp with GRegex. Signed-off-by: Ján Tomko --- src/libxl/libxl_conf.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 920f228d6a..be7d85b264 100644 --- a/src/libxl/libxl_conf.c

[libvirt] [PATCH 09/12] util: use GRegex for virLogRegex

2019-11-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virlog.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index b3460d85fe..47e77e63b7 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -28,7 +28,6 @@ #include #include

[libvirt] [PATCH 11/12] util: use GRegex in virStringMatch

2019-11-13 Thread Ján Tomko
Signed-off-by: Ján Tomko --- src/util/virstring.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/util/virstring.c b/src/util/virstring.c index 3da793c87a..6add2278d8 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -19,7 +19,6 @@

[libvirt] [PATCH 08/12] util: use GRegex in virCommandRunRegex

2019-11-13 Thread Ján Tomko
This saves us from allocating vars upfront, since GLib deals with that for us. Signed-off-by: Ján Tomko --- src/util/vircommand.c | 37 + 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index

[libvirt] [PATCH 00/12] Use GRegex instead of regcomp (glib chronicles)

2019-11-13 Thread Ján Tomko
This removes the need to use gnulib's regex module. Ján Tomko (12): libxl: do not use G_REGEX_EXTENDED remove unused regex.h includes libxl: use GRegex in libxlGetAutoballoonConf libxl: use g_autofree in xenParseSxprVifRate libxl: use GRegex in xenParseSxprVifRate libxl: remove 'ret'

[libvirt] [PATCH 2/5] esx: split datastorePoolType helper

2019-11-13 Thread Pino Toscano
Move the detection of the type of a vmfs pool out of esxLookupVMFSStoragePoolType in an own helper. This way it can be used also in other functions. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_vmfs.c | 49 -- 1 file changed, 33 insertions(+), 16

[libvirt] [PATCH 4/5] esx: implement connectListAllStoragePools

2019-11-13 Thread Pino Toscano
Implement the .connectListAllStoragePools storage API in the esx storage driver, and in all its subdrivers. Signed-off-by: Pino Toscano --- src/esx/esx_storage_backend_iscsi.c | 72 + src/esx/esx_storage_backend_vmfs.c | 98 +

Re: [libvirt] [PATCH] qemu: Warn verbosely if using old loader:nvram pairs

2019-11-13 Thread Michal Privoznik
On 11/12/19 11:17 PM, Jim Fehlig wrote: On 11/11/19 9:42 AM, Michal Privoznik wrote: There are two ways for specifying loader:nvram pairs: 1) --with-loader-nvram configure option 2) nvram variable in qemu.conf Since we have FW descriptors, using this old style is discouraged, but not

Re: [libvirt] [PATCH 6/9] Remove the rest of VIR_STRNDUP

2019-11-13 Thread Daniel Henrique Barboza
On 11/12/19 2:02 PM, Ján Tomko wrote: Replace all the uses passing a single parameter as the length. Signed-off-by: Ján Tomko --- src/conf/nwfilter_conf.c | 4 ++-- src/conf/nwfilter_params.c | 6 ++ src/interface/interface_backend_udev.c | 8 ++--

[libvirt] [PATCH] docs: mention lifted vCPUs restriction for esx

2019-11-13 Thread Pino Toscano
It was lifted with c92b6023e8eb670e01571e299a85e9da9bd4844c. Signed-off-by: Pino Toscano --- docs/drvesx.html.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in index 901d65958a..ac7bc645d1 100644 --- a/docs/drvesx.html.in +++

[libvirt] [PATCH 6/8] util: pidfile: Sanitize return values of virPidFileReadIfAlive

2019-11-13 Thread Peter Krempa
Return -1 on failure rather than -errno since none of the callers actually cares about the return value. This specifically fixes returns of -ENOMEM in cases of bad usage, which would report wrong error anyways. Signed-off-by: Peter Krempa --- src/util/virpidfile.c | 11 +++ 1 file

[libvirt] [PATCH 8/8] util: pidfile: Replace 'areadlink' by 'g_file_read_link'

2019-11-13 Thread Peter Krempa
Use the glib function rather than gnulib. Signed-off-by: Peter Krempa --- src/util/virpidfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virpidfile.c b/src/util/virpidfile.c index 4a800b6528..5d1a820cd1 100644 --- a/src/util/virpidfile.c +++

[libvirt] [PATCH 3/8] qemu: tpm: Use g_autofree in qemuTPMEmulatorGetPid

2019-11-13 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_tpm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 62b9f803bd..40136c4410 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -277,15 +277,13 @@

[libvirt] [PATCH 5/8] qemu: gpu: Sanitize error values in qemuVhostUserGPUGetPid

2019-11-13 Thread Peter Krempa
The caller doesn't care about the actual return value, so return -1 rather than errno. Signed-off-by: Peter Krempa --- src/qemu/qemu_vhost_user_gpu.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c

[libvirt] [PATCH 0/8] Remove use of 'areadlink' gnulib module (kill-a-gnulib-module-a-day initiative)

2019-11-13 Thread Peter Krempa
This removes use of 'areadlink' by using 'g_file_read_link' and fixes a few insane uses. Note that I'll post the actual module deletion from bootstrap.conf separately as touching that file results in lengthy rebuilds. Peter Krempa (8): qemu: domain: Use g_file_read_link instead of

[libvirt] [PATCH 1/8] qemu: domain: Use g_file_read_link instead of virFileReadLink

2019-11-13 Thread Peter Krempa
In an effort to remove as much gnulib usage as possible let's reimplement virFileReadLink. Since it's used in two places only I opted to open-code it. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 2/8] util: file: Remove virFileReadLink

2019-11-13 Thread Peter Krempa
The function is unused so we can remove it. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/virfile.c | 13 - src/util/virfile.h | 3 --- 3 files changed, 17 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCH 4/8] qemu: tpm: Sanitize error values in qemuTPMEmulatorGetPid

2019-11-13 Thread Peter Krempa
The callers don't care about the actual return value, so return -1 rather than errno. Signed-off-by: Peter Krempa --- src/qemu/qemu_tpm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 40136c4410..2f92542470 100644

[libvirt] [PATCH 7/8] util: pidfile: Sanitize return values of virPidFileReadPathIfAlive

2019-11-13 Thread Peter Krempa
The callers don't actually use the returned errno for reporting errors. Additionally virFileResolveAllLinks returns -1 rather than -errno on error thus you'd get a spurious EPERM even on other errors. Don't try to return errno in this case. Signed-off-by: Peter Krempa ---

[libvirt] [PATCH 4/8] conf: domaincaps: Add 'iothreads' to the features section

2019-11-13 Thread Peter Krempa
Historically iothreads were the first feature and thus didn't have it's own section. Add them to for consistency with other features. Unfortunately we must keep the original one in place. Signed-off-by: Peter Krempa --- docs/schemas/domaincaps.rng | 3 +++

[libvirt] [PATCH 0/8] domaincaps: Simplify adding of new domain capability features

2019-11-13 Thread Peter Krempa
As you might guess I plan to add a new one later on. Peter Krempa (8): conf: domaincaps: Replace FORMAT_SINGLE macro by a function conf: domaincaps: Extract formatting of the subelement conf: domaincaps: Use virXMLFormatElement in virDomainCapsFormatFeatures conf: domaincaps: Add

[libvirt] [PATCH 3/8] conf: domaincaps: Use virXMLFormatElement in virDomainCapsFormatFeatures

2019-11-13 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/conf/domain_capabilities.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 2c1c5fc9e8..d9a9093f89 100644 --- a/src/conf/domain_capabilities.c +++

Re: [libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE

2019-11-13 Thread Peter Krempa
On Wed, Nov 13, 2019 at 10:38:06 +, Daniel Berrange wrote: > On Wed, Nov 13, 2019 at 10:33:09AM +0100, Ján Tomko wrote: > > Use this GLib macro instead of bswap_32 from gnulib. > > > > Signed-off-by: Ján Tomko > > --- > > src/qemu/qemu_driver.c | 10 +- > > 1 file changed, 5

  1   2   >