[libvirt PATCH] cpu_map: Fix spelling of svme-addr-chk feature

2021-03-03 Thread Jiri Denemark
Commit a208176ca1d9eedf8aa6bf12fde6a7a9579ab549 introduced this feature with an incorrect "svme-addr-check" spelling. Signed-off-by: Jiri Denemark --- src/cpu_map/sync_qemu_i386.py | 2 +- src/cpu_map/x86_EPYC-Milan.xml | 2 +- src/cpu_map/x86_features.xml | 2 +- 3 files changed, 3

Re: [PATCH 1/4] vsh-table: Use g_autofree where possible

2021-03-03 Thread Laine Stump
On 3/1/21 10:54 AM, Ján Tomko wrote: On a Thursday in 2021, Michal Privoznik wrote: On 2/25/21 1:20 PM, Ján Tomko wrote: On a Tuesday in 2021, Kristina Hanicova wrote: In: vshTableRowNew(), vshTablePrint(), vshTablePrintToStdout(). Signed-off-by: Kristina Hanicova --- tools/vsh-table.c | 16

Re: [libvirt PATCH] util: don't log error if SRIOV PF has no associated netdev

2021-03-03 Thread Laine Stump
ping On 2/23/21 10:35 PM, Laine Stump wrote: Some SRIOV PFs don't have a netdev associated with them (the spec apparently doesn't require it). In most cases when libvirt is dealing with an SRIOV VF, that VF must have a PF, and the PF *must* have an associated netdev (the only way to set the MAC

[libvirt PATCH 18/18] qemu: wire up support for backend specific audio settings

2021-03-03 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 164 +- src/qemu/qemu_validate.c | 34 tests/qemuxml2argvdata/audio-alsa-best.args | 2 + .../audio-alsa-best.x86_64-latest.args| 2 +-

[libvirt PATCH 17/18] conf: add support for audio backend specific settings

2021-03-03 Thread Daniel P . Berrangé
This pulls in the remaining QEMU audio backend specific settings to the XML schema. Signed-off-by: Daniel P. Berrangé ---

[libvirt PATCH 13/18] qemu: probe for -vnc audiodev property

2021-03-03 Thread Daniel P . Berrangé
The -audiodev arg is a new way to configure audio devices in QEMU to replace the QEMU_AUDIO_DRV env variable. This arg is not visible in the "query-command-line-options" output since it is entirely QAPI driven, not QemuOpts. It also isn't in "query-qmp-schema" though since there's no QMP command

[libvirt PATCH 16/18] qemu: wire up support for common audio backend settings

2021-03-03 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 62 +++ src/qemu/qemu_validate.c | 40 tests/qemuxml2argvdata/audio-alsa-best.args | 39 .../audio-alsa-best.x86_64-latest.args| 42

[libvirt PATCH 15/18] conf: introduce support for common audio settings

2021-03-03 Thread Daniel P . Berrangé
This introduces support for the QEMU audio settings that are common to all audio backends. These are expressed in the QAPI schema as settings common to all backends, but in reality some backends ignore some of them. For example, some backends are output only. The parser isn't attempting to apply

[libvirt PATCH 11/18] qemu: support use of elements

2021-03-03 Thread Daniel P . Berrangé
Currently the QEMU driver secretly sets the QEMU_AUDIO_DRV env variable depending on how are configured. This introduces support for configuring audio backends from the elements in the XML config. The existing default behaviour is now only used if no element is present. All except the 'jack'

[libvirt PATCH 10/18] conf: rename and improve virDomainDefFindAudioForSound

2021-03-03 Thread Daniel P . Berrangé
The virDomainDefFindAudioForSound only takes a virDomainSoundDefPtr as its arg, but we want to use the same functionality for VNC graphics. In addition if audio ID is zero, then we want to return the first available audio backend. Signed-off-by: Daniel P. Berrangé --- src/bhyve/bhyve_command.c

[libvirt PATCH 06/18] conf: refactor OSS audio backend specific options

2021-03-03 Thread Daniel P . Berrangé
To prepare for the introduction for more backend specific audio options, move the OSS options into a dedicated struct and introduce separate helper methods for parse/format/free. Signed-off-by: Daniel P. Berrangé --- docs/schemas/domaincommon.rng | 17 +--- src/bhyve/bhyve_command.c |

[libvirt PATCH 09/18] conf: add validation of audio backend IDs

2021-03-03 Thread Daniel P . Berrangé
Validate that if a non-zero audio ID is given for or elements, it must map to an backend that exists. Validate that audio IDs given in are unique. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_validate.c | 67 -- 1 file changed, 64 insertions(+),

[libvirt PATCH 07/18] conf: add coverage for all QEMU audio backend types

2021-03-03 Thread Daniel P . Berrangé
The current element only allows an "OSS" audio backend, as this is all that BHyve needed. This is now extended to cover most QEMU audio backends. These backends all have a variety of attributes they support, but this initial impl does the bare minimum, relying on built-in defaults for everything.

[libvirt PATCH 03/18] conf: don't force existance of audio child elements

2021-03-03 Thread Daniel P . Berrangé
The attributes on the elements are optional, so we should not force the elements themselves to be present, especially since we omit them when formating the XML thus breaking round-tripping. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 13 - 1 file changed, 4

[libvirt PATCH 08/18] conf: add support for audio backend for the VNC server

2021-03-03 Thread Daniel P . Berrangé
When there are multiple backends specified, it is possible to assign a specific one to the VNC server using Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.rst | 22 ++ docs/schemas/domaincommon.rng | 11 ++- src/conf/domain_conf.c

[libvirt PATCH 01/18] config: cleanup some typos / baggage wrt compiler checks

2021-03-03 Thread Daniel P . Berrangé
We had a copy and paste mistake from code we mirrored from QEMU, as well as failing to remove an earlier redundant check. Signed-off-by: Daniel P. Berrangé --- config.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/config.h b/config.h index

[libvirt PATCH 05/18] conf: add missing iteration over audio backends

2021-03-03 Thread Daniel P . Berrangé
Fixes 9375bc7373caddd31f1ac5c14a69eac5096ea416 Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2837ad67a7..34d1673546 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 04/18] conf: add helper to test for sound device codec support

2021-03-03 Thread Daniel P . Berrangé
The check for ICH6 || ICH9 is repeated in many places in the code. The new virDomainSoundModelSupportsCodecs() method provides a helper to standardize this check. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 11 +-- src/conf/domain_conf.h | 2 ++

[libvirt PATCH 02/18] conf: stronger error reporting when parsing audio related params

2021-03-03 Thread Daniel P . Berrangé
Check for varuous mandatory elements and improve error message clarity Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 16 1 file changed, 16 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b731744f04..d30ca627aa 100644 ---

[libvirt PATCH 00/18] qemu: add support for audio backend configuration

2021-03-03 Thread Daniel P . Berrangé
Historically we've done almost nothing with audio backend configuration. In QEMU we merely set QEMU_AUDIO_DRV to one of sdl, spice, none depending on . We also have the somewhat crazy ability to let QEMU inherit the QEMU_AUDIO_DRV env variable from libvirtd. Fairly recently BHyve wanted audio

Re: [PATCH 2/5] virIndexToDiskName: Use g_string_prepend(_c) to improve readability

2021-03-03 Thread Eric Blake
On 3/3/21 4:45 AM, Peter Krempa wrote: > Use a dynamic string helper so that we don't have to calculate the > string lenghts and then iterate from the rear. lengths > > Signed-off-by: Peter Krempa > --- > src/util/virutil.c | 21 ++--- > 1 file changed, 6 insertions(+), 15

Re: [PATCH 0/5] Clean up various places using strcpy()

2021-03-03 Thread Michal Privoznik
On 3/3/21 11:45 AM, Peter Krempa wrote: This series + https://listman.redhat.com/archives/libvir-list/2021-March/msg00081.html removes use of strcpy(). Peter Krempa (5): virIndexToDiskName: Make 'idx' unsigned and remove check virIndexToDiskName: Use g_string_prepend(_c) to improve

[PATCH 4/4] node_device_conf: Remove redundant variables/labels

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/node_device_conf.c | 213 ++-- 1 file changed, 85 insertions(+), 128 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index a64be74011..f13d70ca6c 100644 ---

[PATCH 2/4] node_device_conf: Refactoring functions in order to remove VIR_FREE

2021-03-03 Thread Kristina Hanicova
By: * declaration of an autofreed variable in for loop * use of a new variable * removal of VIR_FREE Signed-off-by: Kristina Hanicova --- src/conf/node_device_conf.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/conf/node_device_conf.c

[PATCH 3/4] node_device_conf: use g_autoptr in virNodeDevCapPCIDevIommuGroupParseXML()

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/node_device_conf.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index cfc72299de..a64be74011 100644 --- a/src/conf/node_device_conf.c +++

[PATCH 1/4] node_device_conf: Use g_autofree where possible

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/node_device_conf.c | 76 +++-- 1 file changed, 23 insertions(+), 53 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 1093a461af..20fafd2c15 100644 ---

[PATCH 0/4] Refactoring node_device_conf

2021-03-03 Thread Kristina Hanicova
This refactors file node_device_conf in order to remove VIR_FREE (if possible) and removes redundant variables and labels. Kristina Hanicova (4): node_device_conf: Use g_autofree where possible node_device_conf: Refactoring functions in order to remove VIR_FREE node_device_conf: use

Re: [libvirt PATCH 0/3] cgroup cpu.shares cleanup

2021-03-03 Thread Michal Privoznik
On 3/3/21 2:35 PM, Pavel Hrdina wrote: After the conversion to using systemd DBus APIs the behavior of changed for values outside of valid range. This series fixes the issue by enforcing the range on libvirt side instead of the previous magic conversion done by kernel. Pavel Hrdina (3):

Re: [PATCH 21/23] test driver: remove TEST_BLOCK_IOTUNE_MAX checks

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:14 +0300, Nikolay Shirokovskiy wrote: > The check is copied from qemu driver I guess and does not make much sense for > test driver. This patch is a preparation step to get rid of macros in this > place. And I guess it make sence just to drop this check instead of

Re: [PATCH 16/23] conf: get rid of macros in virDomainDiskDefIotuneParse

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:09 +0300, Nikolay Shirokovskiy wrote: > At first glance we don't get much win because of introduction of > virDomainBlockIoTuneFieldNames and virDomainBlockIoTuneFields. But we are > going > to use these two in other places to remove usage of macros too. > >

Re: [PATCH 11/23] test driver: remove iotune max checks

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:04 +0300, Nikolay Shirokovskiy wrote: > These checks are now in the above call to virDomainBlockIoTuneValidate. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/test/test_driver.c | 19 --- > 1 file changed, 19 deletions(-) Under same conditions

Re: [PATCH 10/23] qemu: remove iotune max checks

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:03 +0300, Nikolay Shirokovskiy wrote: > These checks are now in the above call to virDomainBlockIoTuneValidate. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_driver.c | 29 - > 1 file changed, 29 deletions(-) Once there

Re: [PATCH 09/23] qemu: add max iotune settings check to virDomainBlockIoTuneValidate

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:02 +0300, Nikolay Shirokovskiy wrote: > Now only qemu and test drivers support iotunes and for both of them this check > makes sense. I guess there is little chance that this patch will break loading > of some domains with incorrect config though. If this is the issue

Re: [PATCH 08/23] qemu: reset max iotune setting when needed

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:01 +0300, Nikolay Shirokovskiy wrote: > Currenly API is not very convinient when switching from read/write to total > tunes back and forth. read/write and total tunes can not be set simulaneously > so one need to choose one. Now if for example total_bytes_sec and >

Re: [PATCH 07/23] test driver: reuse virDomainBlockIoTuneValidate

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:50:00 +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/test/test_driver.c | 32 +--- > 1 file changed, 1 insertion(+), 31 deletions(-) Reviewed-by: Peter Krempa

Re: [PATCH 06/23] qemu: reuse virDomainBlockIoTuneValidate

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:59 +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_driver.c | 31 +-- > 1 file changed, 1 insertion(+), 30 deletions(-) Reviewed-by: Peter Krempa

[libvirt PATCH 2/3] cgroup: use virCgroupSetCpuShares instead of virCgroupSetupCpuShares

2021-03-03 Thread Pavel Hrdina
Now that we enforce the cpu.shares range kernel will no longer silently change the value that libvirt configures so there is no need to read the value back to get the actual configuration. Signed-off-by: Pavel Hrdina --- src/lxc/lxc_cgroup.c | 4 +--- src/lxc/lxc_driver.c | 6 ++

[libvirt PATCH 3/3] vircgroup: drop unused function virCgroupSetupCpuShares

2021-03-03 Thread Pavel Hrdina
Previous commit removed all usage of this function so we can remove it. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 20 src/util/vircgroup.h | 2 -- 3 files changed, 23 deletions(-) diff --git a/src/libvirt_private.syms

[libvirt PATCH 1/3] vircgroup: enforce range limit for cpu.shares

2021-03-03 Thread Pavel Hrdina
Before the conversion to using systemd DBus API to set the cpu.shares there was some magic conversion done by kernel which was documented in virsh manpage as well. Now systemd errors out if the value is out of range. Since we enforce the range for other cpu cgroup attributes 'quota' and 'period'

[libvirt PATCH 0/3] cgroup cpu.shares cleanup

2021-03-03 Thread Pavel Hrdina
After the conversion to using systemd DBus APIs the behavior of changed for values outside of valid range. This series fixes the issue by enforcing the range on libvirt side instead of the previous magic conversion done by kernel. Pavel Hrdina (3): vircgroup: enforce range limit for cpu.shares

Re: [PATCH 05/23] conf: factor out virDomainBlockIoTuneValidate

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:58 +0300, Nikolay Shirokovskiy wrote: > virDomainBlockIoTuneValidate can be reused in virDomainSetBlockIoTune > implementations. > > And also simplify if conditions. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/conf/domain_conf.c | 78 >

Re: [PATCH 04/23] qemu: remove extra check for QEMU_BLOCK_IOTUNE_MAX

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:57 +0300, Nikolay Shirokovskiy wrote: > This is checked in below call to qemuValidateDomainBlkdeviotune now. Note that > qemuValidateDomainBlkdeviotune does not check *_max_length values as we do > here. But I guess this is for good. I tried setting high _max_lengh

Re: [PATCH 03/23] qemu: reuse validation in qemuDomainSetBlockIoTune

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:56 +0300, Nikolay Shirokovskiy wrote: > There is a little difference though in removed and reused code in > qemuDomainSetBlockIoTune. > > First, removed code checked 'set_fields' instead of tune itself. set_fields is > true whenever corresponding

Re: [PATCH 02/23] qemu: factor out qemuValidateDomainBlkdeviotune

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:55 +0300, Nikolay Shirokovskiy wrote: > It can also be used for validation of input in qemuDomainSetBlockIoTune. > > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_validate.c | 100 > ++- >

Re: [PATCH 01/23] qemu: pass supportGroupNameOption as expected

2021-03-03 Thread Peter Krempa
On Mon, Jan 11, 2021 at 12:49:54 +0300, Nikolay Shirokovskiy wrote: > supportGroupNameOption was originally passed before the below patch. To solve > the issue of that patch this change is not necessary and it make sense to > pass supportGroupNameOption because of qemuMonitorSetBlockIoThrottle >

Re: [PATCH v6 1/5] migration/dirtyrate: Introduce virDomainStartDirtyRateCalc API

2021-03-03 Thread Michal Privoznik
On 2/26/21 9:35 AM, Hao Wang wrote: Introduce virDomainStartDirtyRateCalc API for start calculation of a domain's memory dirty rate with a specified time. Signed-off-by: Hao Wang --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hypervisor.h | 6 +

Re: [PATCH v6 0/5] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2021-03-03 Thread Michal Privoznik
On 2/26/21 9:35 AM, Hao Wang wrote: V5 -> V6: split DomainGetDirtyRateInfo(domdirtyrate) API into two parts: 1. DomainStartDirtyRateCalc(domdirtyrate-calc) for starting dirty rate calculation; 2. qemuDomainGetStatsDirtyRate(domstats --dirtyrate) for querying dirty rate

Re: [PATCH v6 3/5] migration/dirtyrate: Introduce domdirtyrate-calc virsh api

2021-03-03 Thread Michal Privoznik
On 2/26/21 9:35 AM, Hao Wang wrote: Introduce domdirtyrate-calc virsh api to start calculating domain's memory dirty rate: # virsh domdirtyrate-calc [--seconds ] Signed-off-by: Hao Wang --- docs/manpages/virsh.rst | 17 +++ tools/virsh-domain.c| 63

Re: [PATCH v6 5/5] migration/dirtyrate: Introduce command 'virsh domstats --dirtyrate'

2021-03-03 Thread Michal Privoznik
On 2/26/21 9:35 AM, Hao Wang wrote: Introduce command 'virsh domstats --dirtyrate' for reporting memory dirty rate infomation. The info is listed as: Domain: 'vm0' dirtyrate.calc_status=measured dirtyrate.calc_start_time=502814 dirtyrate.calc_period=1

Re: [PATCH] gitpublish: Drop custom prefix

2021-03-03 Thread Daniel P . Berrangé
On Wed, Mar 03, 2021 at 11:50:37AM +0100, Andrea Bolognani wrote: > On Wed, 2021-03-03 at 10:22 +, Daniel P. Berrangé wrote: > > On Wed, Mar 03, 2021 at 11:11:51AM +0100, Andrea Bolognani wrote: > > > Now that all projects except the main library are using GitLab > > > merge requests, all the

[PATCH v2 6/6] netdev_bandwidth_conf: Remove redundant variables/labels

2021-03-03 Thread Kristina Hanicova
In functions: virNetDevBandwidthParseRate(), virNetDevBandwidthParse() Signed-off-by: Kristina Hanicova Reviewed-by: Ján Tomko --- src/conf/netdev_bandwidth_conf.c | 42 +--- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git

Re: [PATCH] gitpublish: Drop custom prefix

2021-03-03 Thread Andrea Bolognani
On Wed, 2021-03-03 at 10:22 +, Daniel P. Berrangé wrote: > On Wed, Mar 03, 2021 at 11:11:51AM +0100, Andrea Bolognani wrote: > > Now that all projects except the main library are using GitLab > > merge requests, all the patches that end up on libvir-list are by > > definition intended for

[PATCH v2 5/6] Use g_autoptr instead of virNetDevBandwidthFree where possible

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/network/bridge_driver.c| 3 +-- src/qemu/qemu_driver.c | 5 ++--- src/test/test_driver.c | 3 +-- tests/virnetdevbandwidthtest.c | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/network/bridge_driver.c

[PATCH v2 4/6] Use g_steal_pointer where possible

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/network/bridge_driver.c | 3 +-- src/qemu/qemu_driver.c | 6 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 519a473995..29060139d7 100644 ---

[PATCH v2 3/6] netdev_bandwidth_conf: Refractor virNetDevBandwidthParse()

2021-03-03 Thread Kristina Hanicova
Refractoring includes: * removal of VIR_FREE * inversion of the condition * use of g_steal_pointer Signed-off-by: Kristina Hanicova --- src/conf/netdev_bandwidth_conf.c | 9 +++-- src/util/virnetdevbandwidth.h| 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH v2 2/6] netdev_bandwidth_conf: Use g_autofree where possible

2021-03-03 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova Reviewed-by: Ján Tomko --- src/conf/netdev_bandwidth_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/conf/netdev_bandwidth_conf.c b/src/conf/netdev_bandwidth_conf.c index 4fb7aa4e3d..1ff3785677 100644 ---

[PATCH v2 1/6] vsh-table: Use g_autofree where possible

2021-03-03 Thread Kristina Hanicova
In: vshTableRowNew(), vshTablePrint(), vshTablePrintToStdout(). Signed-off-by: Kristina Hanicova --- tools/vsh-table.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/vsh-table.c b/tools/vsh-table.c index d09cc9e14e..c5e57c0d7b 100644 ---

[PATCH v2 0/6] use g_autofree and g_autoptr

2021-03-03 Thread Kristina Hanicova
This is v2 from https://listman.redhat.com/archives/libvir-list/2021-February/msg01117.html I split commit 3/4 into more commits and left out autofreeing outer array as suggested by Jan Tomko. Patches 2/6 and 6/6 (previously 2/4 and 4/4) have already been reviewed-by and I am sending them for

[PATCH 3/5] remote_daemon_dispatch: Replace g_new + strcpy with g_strdup

2021-03-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/remote/remote_daemon_dispatch.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index e9f2a0ce5b..9700dba450 100644 ---

[PATCH 5/5] commandhelper: printCwd: Print result directly instead of copying it

2021-03-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/commandhelper.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/commandhelper.c b/tests/commandhelper.c index ee06339392..9b56feb120 100644 --- a/tests/commandhelper.c +++ b/tests/commandhelper.c @@ -221,9 +221,10 @@ static

[PATCH 2/5] virIndexToDiskName: Use g_string_prepend(_c) to improve readability

2021-03-03 Thread Peter Krempa
Use a dynamic string helper so that we don't have to calculate the string lenghts and then iterate from the rear. Signed-off-by: Peter Krempa --- src/util/virutil.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/util/virutil.c b/src/util/virutil.c

[PATCH 1/5] virIndexToDiskName: Make 'idx' unsigned and remove check

2021-03-03 Thread Peter Krempa
We can remove the check that 'idx' is negative by forcing callers to pass unsigned numbers, which they do already or have a check that 'idx' is positive. This in turn allows us to remove most return value NULL checks. Signed-off-by: Peter Krempa --- src/util/virutil.c | 8 +---

[PATCH 4/5] virHostCPUGetStatsLinux: Avoid 'strcpy'

2021-03-03 Thread Peter Krempa
Use an allocated buffer for 'cpu_header' so that g_strdup(_printf) can be used to fill it. Signed-off-by: Peter Krempa --- src/util/virhostcpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 4f6c3390ce..2446948bc1

[PATCH 0/5] Clean up various places using strcpy()

2021-03-03 Thread Peter Krempa
This series + https://listman.redhat.com/archives/libvir-list/2021-March/msg00081.html removes use of strcpy(). Peter Krempa (5): virIndexToDiskName: Make 'idx' unsigned and remove check virIndexToDiskName: Use g_string_prepend(_c) to improve readability remote_daemon_dispatch: Replace

Re: [PATCH] gitpublish: Drop custom prefix

2021-03-03 Thread Daniel P . Berrangé
On Wed, Mar 03, 2021 at 11:11:51AM +0100, Andrea Bolognani wrote: > Now that all projects except the main library are using GitLab > merge requests, all the patches that end up on libvir-list are by > definition intended for libvirt itself rather than one of the > subprojects, and so it's no

[PATCH] gitpublish: Drop custom prefix

2021-03-03 Thread Andrea Bolognani
Now that all projects except the main library are using GitLab merge requests, all the patches that end up on libvir-list are by definition intended for libvirt itself rather than one of the subprojects, and so it's no longer necessary to include additional information in the mail subject.

Re: [PATCH] build: Require glib >= 2.56

2021-03-03 Thread Andrea Bolognani
On Tue, 2021-03-02 at 16:16 -0700, Jim Fehlig wrote: > Based on Peter's info and some snooping > >RHEL-7: 2.56.1 >RHEL-8: 2.56.4 >Debian (Buster): 2.58.3 >OpenBSD (Ports): 2.66.7 >FreeBSD (Ports): 2.66.7 >openSUSE Leap 15.2, SLE15-SP2: 2.62.6 >Ubuntu (Bionic): 2.56.1 >

[libvirt PATCH] docs: Spell out our policy concerning minor releases

2021-03-03 Thread Andrea Bolognani
We've already applied this policy on multiple occasions, but it's good to have it written down so that there can be no confusion. Signed-off-by: Andrea Bolognani --- docs/platforms.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms.rst b/docs/platforms.rst index