[libvirt PATCH v2] nwfilter: merge updateMutex and updateLock

2022-03-17 Thread Daniel P . Berrangé
The updateLock is a R/W lock held by anything which needs to read or modify the rules associated with an NWFilter. APIs for defining/undefining NW filters rules hold a write lock on updateLock. APIs for creating/deleting NW filter bindings hold a read lock on updateLock, which prevents define/und

Re: [libvirt PATCH v2 13/13] qemu_conf: Use automatic memory management

2022-03-17 Thread Michal Prívozník
On 3/16/22 23:10, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/qemu/qemu_conf.c | 70 ++-- > 1 file changed, 29 insertions(+), 41 deletions(-) > > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c > index 81449b8b77..4b5f75b694

Re: [libvirt PATCH v2 00/13] Automatic mutex management - part 4

2022-03-17 Thread Michal Prívozník
On 3/16/22 23:10, Tim Wiederhake wrote: > Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD > to simplify mutex management. > > V1: https://listman.redhat.com/archives/libvir-list/2022-March/229144.html > > Changes since V1: > * Renamed mutex in nwfilter_driver.c > * Remov

Re: [libvirt PATCH v2 07/10] esx_stream: Use automatic mutex management

2022-03-17 Thread Tim Wiederhake
On Thu, 2022-03-17 at 10:44 +0100, Pavel Hrdina wrote: > On Fri, Mar 04, 2022 at 06:28:37PM +0100, Tim Wiederhake wrote: > > Signed-off-by: Tim Wiederhake > > --- > >  src/esx/esx_stream.c | 65 ++-- > > > >  1 file changed, 21 insertions(+), 44 deletions(-)

Re: [libvirt PATCH v2 07/10] esx_stream: Use automatic mutex management

2022-03-17 Thread Pavel Hrdina
On Fri, Mar 04, 2022 at 06:28:37PM +0100, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/esx/esx_stream.c | 65 ++-- > 1 file changed, 21 insertions(+), 44 deletions(-) > > diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c > index

[libvirt PATCH v2 01/13] nwfilter_driver: Statically initialize mutex

2022-03-16 Thread Tim Wiederhake
This enables a later patch to simplify locking during initialization and cleanup of virNWFilterDriverState. Signed-off-by: Tim Wiederhake --- src/conf/virnwfilterobj.h | 1 - src/nwfilter/nwfilter_driver.c | 11 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src

[libvirt PATCH v2 13/13] qemu_conf: Use automatic memory management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_conf.c | 70 ++-- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 81449b8b77..4b5f75b694 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_

[libvirt PATCH v2 09/13] nwfilter_ipaddrmap: Use automatic mutex management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/nwfilter_ipaddrmap.c | 80 ++- 1 file changed, 31 insertions(+), 49 deletions(-) diff --git a/src/conf/nwfilter_ipaddrmap.c b/src/conf/nwfilter_ipaddrmap.c index e2f123b9d9..4090cc2769 100644 --- a/src/conf/nwfilter_ipadd

[libvirt PATCH v2 12/13] remote_daemon_stream: Use automatic memory management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/remote/remote_daemon_stream.c | 34 +-- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_stream.c index eb7ed5edf3..a6d2c915e6 100644 --- a/src/remote/rem

[libvirt PATCH v2 10/13] virNetlinkEventAddClient: Remove goto

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/util/virnetlink.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 3216765492..c6c8c33c7c 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -1114

[libvirt PATCH v2 11/13] virnetlink: Use automatic memory management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/util/virnetlink.c | 222 +++--- 1 file changed, 101 insertions(+), 121 deletions(-) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index c6c8c33c7c..04a39a905b 100644 --- a/src/util/virnetlink.c +++ b/src/util/

[libvirt PATCH v2 08/13] nwfilter_learnipaddr: Use automatic mutex management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_learnipaddr.c | 83 + 1 file changed, 24 insertions(+), 59 deletions(-) diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c index 99bffdc4fb..2c85972012 100644 --- a/src/nwfilt

[libvirt PATCH v2 06/13] nwfilter_dhcpsnoop: Replace virNWFilterSnoopLock macros

2022-03-16 Thread Tim Wiederhake
Use automatic mutex management instead. Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_dhcpsnoop.c | 89 +++ 1 file changed, 30 insertions(+), 59 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index c526653bc

[libvirt PATCH v2 03/13] nwfilter_driver: Use automatic mutex management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_driver.c | 83 ++ 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index eefb2b0fff..bfda96b7ed 100644 --- a/src/nwfilter/nwfilter

[libvirt PATCH v2 02/13] nwfilter_driver: Split up nwfilterStateCleanup

2022-03-16 Thread Tim Wiederhake
This allows nwfilterStateCleanupLocked to be used in nwfilterStateInitialize in a later patch. Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_driver.c | 89 +- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/src/nwfilter/nwfilter_driver.c

[libvirt PATCH v2 07/13] nwfilter_dhcpsnoop: Replace virNWFilterSnoopReqLock functions

2022-03-16 Thread Tim Wiederhake
Use automatic mutex management instead. Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_dhcpsnoop.c | 277 ++ 1 file changed, 95 insertions(+), 182 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index f33db02f

[libvirt PATCH v2 05/13] nwfilter_dhcpsnoop: Replace virNWFilterSnoopActiveLock macros

2022-03-16 Thread Tim Wiederhake
Use automatic mutex management instead. Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_dhcpsnoop.c | 42 --- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index f8cffc7d5

[libvirt PATCH v2 04/13] nwfilter_gentech: Use automatic mutex management

2022-03-16 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/nwfilter/nwfilter_gentech_driver.c | 33 +- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c index 7bbf1e12fb..a8c0c6aa22 100644 --- a/src/

[libvirt PATCH v2 00/13] Automatic mutex management - part 4

2022-03-16 Thread Tim Wiederhake
Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD to simplify mutex management. V1: https://listman.redhat.com/archives/libvir-list/2022-March/229144.html Changes since V1: * Renamed mutex in nwfilter_driver.c * Removed all instances where a lock guard had to be initialize

Re: [libvirt PATCH v2 03/10] remote_daemon_dispatch: Use automatic mutex management

2022-03-16 Thread Michal Prívozník
On 3/4/22 18:28, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/remote/remote_daemon_dispatch.c | 187 +--- > 1 file changed, 58 insertions(+), 129 deletions(-) > > diff --git a/src/remote/remote_daemon_dispatch.c > b/src/remote/remote_daemon_dispatch.

Re: [libvirt PATCH v2 06/10] admin: Use automatic mutex management

2022-03-16 Thread Michal Prívozník
On 3/4/22 18:28, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/admin/admin_server_dispatch.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/admin/admin_server_dispatch.c > b/src/admin/admin_server_dispatch.c > index f533fcf539..893c7f1de2 1006

Re: [libvirt PATCH v2 00/10] Automatic mutex management - part 3

2022-03-16 Thread Michal Prívozník
On 3/4/22 18:28, Tim Wiederhake wrote: > Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD > to simplify mutex management. > > v1: > https://listman.redhat.com/archives/libvir-list/2022-February/msg00674.html > > Changed since v1: > * Removed locking / unlocking in storag

Re: [libvirt PATCH v2 00/10] Automatic mutex management - part 3

2022-03-14 Thread Tim Wiederhake
ping On Fri, 2022-03-04 at 18:28 +0100, Tim Wiederhake wrote: > Use the recently implemented VIR_LOCK_GUARD and > VIR_WITH_MUTEX_LOCK_GUARD > to simplify mutex management. > > v1: > https://listman.redhat.com/archives/libvir-list/2022-February/msg00674.html > > Changed since v1: > * Removed lock

Re: [libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-03-09 Thread Michal Prívozník
On 1/27/22 12:00, Andrea Bolognani wrote: > This makes it possible to reduce the number of cases we have to > consider, because 'sles' declares itself to be like 'suse' and > both 'rhel' and 'centos' declare themselves to be like 'fedora'. > > We have to move the check for Ubuntu before the one fo

Re: [libvirt PATCH v2 0/6] Add support for 'blob' to virtio video device

2022-03-08 Thread Jonathon Jongsma
ping On 2/24/22 2:47 PM, Jonathon Jongsma wrote: Add support to libvirt for the 'blob' option for virtio video devices in qemu. Also do a little preparatory refactoring of the video device xml parsing code. Changes in v2: - Added some basic documentation - add a qemu capability - Make sur

Re: [libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-03-07 Thread Andrea Bolognani
On Tue, Feb 15, 2022 at 01:38:47PM -0500, Andrea Bolognani wrote: > On Thu, Jan 27, 2022 at 12:00:18PM +0100, Andrea Bolognani wrote: > > This makes it possible to reduce the number of cases we have to > > consider, because 'sles' declares itself to be like 'suse' and > > both 'rhel' and 'centos' d

[libvirt PATCH v2 07/10] esx_stream: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/esx/esx_stream.c | 65 ++-- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c index 5b20804bb1..2b49c8dd12 100644 --- a/src/esx/esx_stream.c +++ b/src/esx/esx_st

[libvirt PATCH v2 05/10] nodesuspend: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/util/virnodesuspend.c | 54 +-- 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index e1167605ca..5feef79c43 100644 --- a/src/util/virnodesuspend.c +++ b

[libvirt PATCH v2 02/10] openvz: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/openvz/openvz_driver.c | 91 -- 1 file changed, 28 insertions(+), 63 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index aa1db09540..d8e4dd7f8b 100644 --- a/src/openvz/openvz_driver.c ++

[libvirt PATCH v2 10/10] storage: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/storage/storage_driver.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index ee710f6b76..e3e1604311 100644 --- a/src/storage/storage_driver.c +++ b/sr

[libvirt PATCH v2 09/10] storage: Removing mutex locking in initialization and cleanup

2022-03-04 Thread Tim Wiederhake
These functions are only ever called in a single threaded environment and the mutex would not have prevented concurrent access anyway. Signed-off-by: Tim Wiederhake --- src/storage/storage_driver.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/storage/storage_driver.c b/src/stora

[libvirt PATCH v2 04/10] netdev: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/util/virnetdev.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index fcf679ec37..5df48af60c 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -3568,12 +3568,

[libvirt PATCH v2 08/10] esx_vi: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/esx/esx_vi.c | 109 --- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 36e9dc1d2c..b56d84fc43 100644 --- a/src/esx/esx_vi.c +++ b/src/esx/esx_vi.c @@ -380,1

[libvirt PATCH v2 06/10] admin: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/admin/admin_server_dispatch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dispatch.c index f533fcf539..893c7f1de2 100644 --- a/src/admin/admin_server_dispatch.c +++ b/src/ad

[libvirt PATCH v2 03/10] remote_daemon_dispatch: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/remote/remote_daemon_dispatch.c | 187 +--- 1 file changed, 58 insertions(+), 129 deletions(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 510856024c..1a73976831 100644 --- a/src/remot

[libvirt PATCH v2 01/10] test: Use automatic mutex management

2022-03-04 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/test/test_driver.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 4eca5c4a65..34e4652375 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -1386,16 +

[libvirt PATCH v2 00/10] Automatic mutex management - part 3

2022-03-04 Thread Tim Wiederhake
Use the recently implemented VIR_LOCK_GUARD and VIR_WITH_MUTEX_LOCK_GUARD to simplify mutex management. v1: https://listman.redhat.com/archives/libvir-list/2022-February/msg00674.html Changed since v1: * Removed locking / unlocking in storage driver initialization and cleanup instead of working

Re: [libvirt PATCH v2] qemu: support multiqueue for vdpa net device

2022-03-04 Thread Martin Kletzander
On Thu, Mar 03, 2022 at 01:43:11PM -0600, Jonathon Jongsma wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024406 Signed-off-by: Jonathon Jongsma --- Changes in v2: - remove error message in virDomainNetDefParseXML(). The model is already checked in the post parse validation ste

[libvirt PATCH v2] qemu: support multiqueue for vdpa net device

2022-03-03 Thread Jonathon Jongsma
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024406 Signed-off-by: Jonathon Jongsma --- Changes in v2: - remove error message in virDomainNetDefParseXML(). The model is already checked in the post parse validation step. src/conf/domain_conf.c| 2 ++ src/qe

[libvirt PATCH v2 6/6] qemu: Implement 'blob' support for virtio gpu

2022-02-24 Thread Jonathon Jongsma
This can improve performance for some guests since it reduces copying of display data between host and guest. Requires udmabuf on the host. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_cgroup.c| 28 - src/qemu/qemu_command.c | 3 ++

[libvirt PATCH v2 5/6] qemu: Add capability for virtio-gpu.blob

2022-02-24 Thread Jonathon Jongsma
Capability to determine whether this qemu supports the 'blob' option for virtio-gpu. Signed-off-by: Jonathon Jongsma --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 +

[libvirt PATCH v2 3/6] conf: use enum variable for video type

2022-02-24 Thread Jonathon Jongsma
Rather than storing the video type as an integer, use the proper enum type within the struct. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 4 +--- src/conf/domain_conf.h | 2 +- src/libxl/libxl_conf.c | 10 ++ src/libxl/libxl_domain.c | 11

[libvirt PATCH v2 2/6] conf: switch to virXMLProp* functions

2022-02-24 Thread Jonathon Jongsma
In virDomainVideoModelDefParseXML(), use the virXMLProp* functions rather than reimplementing them with virXPath* functions. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 78 +- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git a

[libvirt PATCH v2 4/6] conf: add support for 'blob' in virtio video device

2022-02-24 Thread Jonathon Jongsma
Add the ability to enable blob resources for the virtio video device. This will accelerate the display path due to less or no copying of pixel data. Blob resource support can be enabled with e.g.: Some additional background information about blob resources: https://lists.freedes

[libvirt PATCH v2 1/6] conf: Refactor video model parsing

2022-02-24 Thread Jonathon Jongsma
Factor out a separate function to parse out the element for video devices. Signed-off-by: Jonathon Jongsma --- src/conf/domain_conf.c | 95 ++ 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt PATCH v2 0/6] Add support for 'blob' to virtio video device

2022-02-24 Thread Jonathon Jongsma
Add support to libvirt for the 'blob' option for virtio video devices in qemu. Also do a little preparatory refactoring of the video device xml parsing code. Changes in v2: - Added some basic documentation - add a qemu capability - Make sure that the /dev/udmabuf device is accessible to qemu (c

[libvirt PATCH v2 3/5] conf: switch nvram parsing to use XML node / property helpers

2022-02-22 Thread Daniel P . Berrangé
Instead of using XPath, parse the using the XML node and property helpers so the code is consistent with the parsing of . Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --

[libvirt PATCH v2 4/5] conf: move nvram parsing into virDomainLoaderDefParseXML

2022-02-22 Thread Daniel P . Berrangé
The virDomainLoaderDef struct contains fields for both and elements, so it makes sense to parse them in the same method, just like we'll format them in the same method. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 92 ++--

[libvirt PATCH v2 0/5] Cleanup and test more firmware handling scenarios

2022-02-22 Thread Daniel P . Berrangé
There are a mind bending number of possible ways to configure the firmware with/without NVRAM. Only a small portion are tested and many error scenarios are silently ignored. This series attempts to get coverage of every possible XML config scenario and report explicit errors in all invalid configs

[libvirt PATCH v2 5/5] conf: stop ignoring / with firmware auto-select

2022-02-22 Thread Daniel P . Berrangé
Currently if the firmware attribute is set then we silently ignore most of the and element configs. This changes the code so that we always fully parse the and but then use a post-parse method to explicitly reject invalid combinations. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P.

[libvirt PATCH v2 2/5] tests: don't permit NVRAM path when using firmware auto-select

2022-02-22 Thread Daniel P . Berrangé
When using we still parse the path, but completely ignore it, replacing any user provided content with a custom generated path. This makes sense since when undefining the guest, the code to cleanup NVRAM also uses the same generated path. Instead of silently ignoring user config, we should repor

[libvirt PATCH v2 1/5] qemu: fix populating NVRAM vars from template with R/W loader

2022-02-22 Thread Daniel P . Berrangé
The QEMU driver will populate the template to the nvram file any time it sees both the template and nvram paths present. It will auto-generate a nvram path per-VM if not provided by the user, but only if the loader is marked R/O. So with a R/O loader we have these possible scenarios - No NVRAM

Re: [libvirt PATCH v2] Make systemd unit ordering more robust

2022-02-22 Thread Michal Prívozník
On 2/15/22 15:52, Martin Kletzander wrote: > Since libvirt-guests script/service can operate on various URIs and we do > support both socket activation and traditional services, the ordering should > be > specified for all the possible sockets and services. > > Also remove the Wants= dependency s

Re: [libvirt PATCH v2] util: drop support for obsolete systemd in RHEL-7

2022-02-16 Thread Ján Tomko
On a Wednesday in 2022, Daniel P. Berrangé wrote: The systemd version in RHEL-7 lacked support for the LISTEN_FDNAMES env variable with socket activation. Since we stopped targetting RHEL-7 we can drop some considerable amount of compatibility code. Signed-off-by: Daniel P. Berrangé --- docs/da

[libvirt PATCH v2] util: drop support for obsolete systemd in RHEL-7

2022-02-16 Thread Daniel P . Berrangé
The systemd version in RHEL-7 lacked support for the LISTEN_FDNAMES env variable with socket activation. Since we stopped targetting RHEL-7 we can drop some considerable amount of compatibility code. Signed-off-by: Daniel P. Berrangé --- docs/daemons.rst| 26 --- src/loc

Re: [libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-02-15 Thread Andrea Bolognani
On Thu, Jan 27, 2022 at 12:00:18PM +0100, Andrea Bolognani wrote: > This makes it possible to reduce the number of cases we have to > consider, because 'sles' declares itself to be like 'suse' and > both 'rhel' and 'centos' declare themselves to be like 'fedora'. > > We have to move the check for U

[libvirt PATCH v2] Make systemd unit ordering more robust

2022-02-15 Thread Martin Kletzander
Since libvirt-guests script/service can operate on various URIs and we do support both socket activation and traditional services, the ordering should be specified for all the possible sockets and services. Also remove the Wants= dependency since do not want to start any service. We cannot know w

Re: [libvirt PATCH v2 0/6] virnetclient: Cleanups and improvements

2022-02-14 Thread Daniel P . Berrangé
On Mon, Feb 14, 2022 at 05:03:29PM +0100, Andrea Bolognani wrote: > Changes from [v1]: > > * most patches have been pushed; > * reduce quoting for most users by only using it when it's > actually necessary to do so. This still has the back compatibility problems I mentioned previously and

[libvirt PATCH v2 6/6] virnetclient: Escape socket path

2022-02-14 Thread Andrea Bolognani
Just like the name of the netcat command and the connection URI, the socket path is a user-provided piece of information that might contain characters that have special meaning for the shell, and as such should be escaped. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 10 +++

[libvirt PATCH v2 4/6] virnetclient: Don't unnecessarily quote user-provided values

2022-02-14 Thread Andrea Bolognani
If the output of virNetClientDoubleEscapeShell() matches its input, then no escaping actually happened and quoting the value in the generated script is unnecessary. With this change, awkward use of quotes such as sh -c 'if 'nc' -q' is completely gone when using the default settings. Closes: h

[libvirt PATCH v2 5/6] virnetsockettest: Test more socket paths

2022-02-14 Thread Andrea Bolognani
While unlikely, the socket path might also contain unusual characters that need special handling. Adjust test cases so that these scenarios are covered. Note that none of these inputs will actually work outside of the test suite at the moment, but we're going to address that in the next commit. S

[libvirt PATCH v2 2/6] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
This makes the generated script a bit shorter and removes an unnecessary call to test. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 3 +-- tests/virnetsockettest.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetcli

[libvirt PATCH v2 3/6] virnetclient: Handle netcatPath presence all at once

2022-02-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 7e7e9d52a6..9c7047c7f8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@

[libvirt PATCH v2 1/6] virnetclient: Improve spacing of ssh script

2022-02-14 Thread Andrea Bolognani
This results in the generated script having consistent spacing throughout, instead of having repeated whitespace in some parts and commands that are separated by a semicolon and no spacing at all in others. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 12 tests/virnets

[libvirt PATCH v2 0/6] virnetclient: Cleanups and improvements

2022-02-14 Thread Andrea Bolognani
Changes from [v1]: * most patches have been pushed; * reduce quoting for most users by only using it when it's actually necessary to do so. [v1] https://listman.redhat.com/archives/libvir-list/2022-February/msg00477.html Andrea Bolognani (6): virnetclient: Improve spacing of ssh script

Re: [libvirt PATCH v2 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-11 Thread Michal Prívozník
On 2/11/22 13:29, Jiri Denemark wrote: > If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store > the required size in subjectlen. And since we're not checking the return > value of this function, we would happily overwrite some random memory. > > Signed-off-by: Jiri Denemark >

[libvirt PATCH v2 0/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-11 Thread Jiri Denemark
Jiri Denemark (2): qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject qemu_migration_cookie: Properly fetch cert DN src/qemu/qemu_migration_cookie.c | 34 1 file changed, 21 insertions(+), 13 deletions(-) -- 2.35.0

[libvirt PATCH v2 1/2] qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject

2022-02-11 Thread Jiri Denemark
We use 'ret' for storing values to be returned from a function. Return values from called functions that are not supposed to be returned further are usually called 'rv' (or 'rc'). Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/qemu/qemu_migra

[libvirt PATCH v2 2/2] qemu_migration_cookie: Properly fetch cert DN

2022-02-11 Thread Jiri Denemark
If 1024 was not enough to fit the DN, gnutls_x509_crt_get_dn would store the required size in subjectlen. And since we're not checking the return value of this function, we would happily overwrite some random memory. Signed-off-by: Jiri Denemark --- Notes: Version 2: - do not pass NULL t

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-03 Thread Michal Prívozník
On 2/2/22 13:44, Daniel P. Berrangé wrote: > Introduce support for > > > > > > > > > which is used as a way to receive debug messages from the > firmware on x86 platforms. > > Note that the default port is 0x0xe9 since that's the original nipick: s/0x// > Bochs debu

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Daniel P . Berrangé
On Wed, Feb 02, 2022 at 07:47:37AM -0800, Andrea Bolognani wrote: > On Wed, Feb 02, 2022 at 03:38:59PM +, Daniel P. Berrangé wrote: > > On Wed, Feb 02, 2022 at 06:46:25AM -0800, Andrea Bolognani wrote: > > > I think it would still make sense to reflect QEMU's current default > > > in the XML, w

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Andrea Bolognani
On Wed, Feb 02, 2022 at 03:38:59PM +, Daniel P. Berrangé wrote: > On Wed, Feb 02, 2022 at 06:46:25AM -0800, Andrea Bolognani wrote: > > I think it would still make sense to reflect QEMU's current default > > in the XML, which would make sure that the same input XML results in > > the same devic

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Daniel P . Berrangé
On Wed, Feb 02, 2022 at 06:46:25AM -0800, Andrea Bolognani wrote: > On Wed, Feb 02, 2022 at 02:32:32PM +, Daniel P. Berrangé wrote: > > On Wed, Feb 02, 2022 at 06:29:32AM -0800, Andrea Bolognani wrote: > > > On Wed, Feb 02, 2022 at 12:44:44PM +, Daniel P. Berrangé wrote: > > > > Introduce s

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Andrea Bolognani
On Wed, Feb 02, 2022 at 02:32:32PM +, Daniel P. Berrangé wrote: > On Wed, Feb 02, 2022 at 06:29:32AM -0800, Andrea Bolognani wrote: > > On Wed, Feb 02, 2022 at 12:44:44PM +, Daniel P. Berrangé wrote: > > > Introduce support for > > > > > > > > > > > > > > > > > > >

Re: [libvirt PATCH v2 3/3] qemu: add tests for the ISA debug console command line

2022-02-02 Thread Andrea Bolognani
On Wed, Feb 02, 2022 at 12:44:45PM +, Daniel P. Berrangé wrote: > +++ b/tests/qemuxml2argvdata/serial-debugcon.xml > @@ -0,0 +1,29 @@ > + > + QEMUGuest1 > + c7a5fdbd-edaf-9455-926a-d65c16db1809 > + 219136 > + 219136 > + 1 > + > +hvm > + > + > + > + destroy > + restart > +

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Daniel P . Berrangé
On Wed, Feb 02, 2022 at 06:29:32AM -0800, Andrea Bolognani wrote: > On Wed, Feb 02, 2022 at 12:44:44PM +, Daniel P. Berrangé wrote: > > Introduce support for > > > > > > > > > > > > > > > > > > which is used as a way to receive debug messages from the > > firmware on

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Andrea Bolognani
On Wed, Feb 02, 2022 at 12:44:44PM +, Daniel P. Berrangé wrote: > Introduce support for > > > > > > > > > which is used as a way to receive debug messages from the > firmware on x86 platforms. > > Note that the default port is 0x0xe9 since that's the original > Bochs

Re: [libvirt PATCH v2 1/3] conf: validate serial port model in ABI checks

2022-02-02 Thread Andrea Bolognani
On Wed, Feb 02, 2022 at 12:44:43PM +, Daniel P. Berrangé wrote: > The serial port model cannot be allowed to change across migration > as it affects ABI. > > Signed-off-by: Daniel P. Berrangé > --- > src/conf/domain_conf.c | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Andrea B

[libvirt PATCH v2 3/3] qemu: add tests for the ISA debug console command line

2022-02-02 Thread Daniel P . Berrangé
The XML-to-XML test validates that we don't accidentally copy the isa-debug into a . Signed-off-by: Daniel P. Berrangé --- .../serial-debugcon.x86_64-latest.args| 39 + tests/qemuxml2argvdata/serial-debugcon.xml| 29 + tests/qemuxml2argvtest.c

[libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-02 Thread Daniel P . Berrangé
Introduce support for which is used as a way to receive debug messages from the firmware on x86 platforms. Note that the default port is 0x0xe9 since that's the original Bochs debug port. Thus for use with SeaBIOS/OVMF, the iobase port needs to be explicitly set to 0x

[libvirt PATCH v2 1/3] conf: validate serial port model in ABI checks

2022-02-02 Thread Daniel P . Berrangé
The serial port model cannot be allowed to change across migration as it affects ABI. Signed-off-by: Daniel P. Berrangé --- src/conf/domain_conf.c | 8 1 file changed, 8 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 58e696416d..9415ecb13b 100644 --- a

[libvirt PATCH v2 0/3] qemu: support the SeaBIOS/EDK2 debug console

2022-02-02 Thread Daniel P . Berrangé
# virsh dumpxml fedora34x86_64 | xmllint -xpath '/domain/devices/console[2]' - # virsh console --devname console1 fedora34x86_64 Of course you really want to start the guest paused initially to allow time to connect to the console before resuming CPUs, a

[libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-01-27 Thread Andrea Bolognani
This makes it possible to reduce the number of cases we have to consider, because 'sles' declares itself to be like 'suse' and both 'rhel' and 'centos' declare themselves to be like 'fedora'. We have to move the check for Ubuntu before the one for Debian, however, because 'ubuntu' declares itself

[libvirt PATCH v2 0/1] meson: Fixes and improvements to handling of qemu_user and qemu_group

2022-01-27 Thread Andrea Bolognani
Changes from [v1]: * most patches have been pushed; * added comments. [v1] https://listman.redhat.com/archives/libvir-list/2022-January/msg01189.html Andrea Bolognani (1): meson: Check for os-release's ID_LIKE in addition to ID meson.build | 15 +++ 1 file changed, 7 insertio

Re: [libvirt PATCH v2 1/1] docs: Drop node.gif

2022-01-19 Thread Peter Krempa
On Wed, Jan 19, 2022 at 18:00:49 +0100, Andrea Bolognani wrote: > It's the only GIF file we have in our repository. > > We could convert it to PNG, but that would result in a > significantly bigger file (~5.5 KiB vs ~1.5 KiB). > > Since the image doesn't really enhance the documentation very > mu

[libvirt PATCH v2 0/1] docs: Drop node.gif

2022-01-19 Thread Andrea Bolognani
Changes from [v1] * drop the file instead of converting it. [v1] https://listman.redhat.com/archives/libvir-list/2022-January/msg00317.html Andrea Bolognani (1): docs: Drop node.gif docs/goals.html.in | 3 --- docs/images/meson.build | 1 - docs/images/node.gif| Bin 1397 -> 0

[libvirt PATCH v2 1/1] docs: Drop node.gif

2022-01-19 Thread Andrea Bolognani
It's the only GIF file we have in our repository. We could convert it to PNG, but that would result in a significantly bigger file (~5.5 KiB vs ~1.5 KiB). Since the image doesn't really enhance the documentation very much, simply drop it instead. Signed-off-by: Andrea Bolognani --- docs/goals.

Re: [libvirt PATCH v2 1/2] docs: coding-style: Clarify on virXXXPtr types

2022-01-17 Thread Tim Wiederhake
On Mon, 2022-01-17 at 11:40 +0100, Peter Krempa wrote: > On Mon, Jan 17, 2022 at 11:19:02 +0100, Tim Wiederhake wrote: > > This partially reverts commit 9ccbed6afb. > > > > Signed-off-by: Tim Wiederhake > > --- > >  docs/coding-style.rst | 7 ++- > >  1 file changed, 6 insertions(+), 1 deletio

Re: [libvirt PATCH v2 1/2] docs: coding-style: Clarify on virXXXPtr types

2022-01-17 Thread Peter Krempa
On Mon, Jan 17, 2022 at 11:19:02 +0100, Tim Wiederhake wrote: > This partially reverts commit 9ccbed6afb. > > Signed-off-by: Tim Wiederhake > --- > docs/coding-style.rst | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/docs/coding-style.rst b/docs/coding-style.rst

[libvirt PATCH v2 2/2] docs: coding-style: One variable declaration per line

2022-01-17 Thread Tim Wiederhake
This was not mentioned before. Signed-off-by: Tim Wiederhake --- docs/coding-style.rst | 13 + 1 file changed, 13 insertions(+) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index ee4d551805..01f1e25127 100644 --- a/docs/coding-style.rst +++ b/docs/coding-style.rst @@ -

[libvirt PATCH v2 1/2] docs: coding-style: Clarify on virXXXPtr types

2022-01-17 Thread Tim Wiederhake
This partially reverts commit 9ccbed6afb. Signed-off-by: Tim Wiederhake --- docs/coding-style.rst | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/coding-style.rst b/docs/coding-style.rst index 37e6009db4..ee4d551805 100644 --- a/docs/coding-style.rst +++ b/docs/cod

[libvirt PATCH v2 0/2] Code style documentation

2022-01-17 Thread Tim Wiederhake
Some additions and clarifications to libvirt's code style documentation, based on points of feedback that are given regularly on the mailing list. V1: https://listman.redhat.com/archives/libvir-list/2022-January/msg00631.html Changes since V1: * patch 1: Do create typedefs for public types, do no

Re: [libvirt PATCH v2 1/3] scripts: Check spelling

2022-01-11 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 03:58:55PM -0700, Jim Fehlig wrote: > On 1/10/22 11:21, Andrea Bolognani wrote: > > On Mon, Jan 10, 2022 at 04:41:25PM +0100, Tim Wiederhake wrote: > > > +("/src/security/apparmor/libvirt-lxc", "devic"), > > > > Looking at the context where this appears: > > > >deny

Re: [libvirt PATCH v2 1/3] scripts: Check spelling

2022-01-10 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 04:41:25PM +0100, Tim Wiederhake wrote: > +("/docs/glib-adoption.rst", "preferrable"), This is an actual typo, isn't it? > +("/docs/js/main.js", "whats"), > +("/src/libxl/libxl_logger.c", "purposedly"), > +("/src/qemu/qemu_process.c", "wee"), > +("/test

Re: [libvirt PATCH v2 3/3] Fix some typos

2022-01-10 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 04:41:27PM +0100, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/qemu/qemu_cgroup.c| 2 +- > tests/qemucapabilitiesnumbering.c | 2 +- > tests/qemucapabilitiestest.c | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) This patc

[libvirt PATCH v2 3/3] Fix some typos

2022-01-10 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/qemu/qemu_cgroup.c| 2 +- tests/qemucapabilitiesnumbering.c | 2 +- tests/qemucapabilitiestest.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 308be5b00f..22a6f5

[libvirt PATCH v2 2/3] ci: Add spell checking

2022-01-10 Thread Tim Wiederhake
Allow failure to not have false-positives fail the builds. Signed-off-by: Tim Wiederhake --- .gitlab-ci.yml | 12 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ba11a0431..5e46f3dcb8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,6 +87

[libvirt PATCH v2 1/3] scripts: Check spelling

2022-01-10 Thread Tim Wiederhake
This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack of

[libvirt PATCH v2 0/3] ci: Check spelling

2022-01-10 Thread Tim Wiederhake
This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack of

Re: [libvirt PATCH v2 1/1] virt-ssh-helper: Add manual page

2022-01-10 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 02:32:48PM +0100, Olaf Hering wrote: > Mon, 10 Jan 2022 13:29:28 + Andrea Bolognani : > > I'm definitely open to moving it if you can make a convincing enough case > > for it :) > > I was hoping the binary can be moved to libexec, which means a man page is > not strict

<    3   4   5   6   7   8   9   10   11   12   >