Re: [PATCH] nodedev: fix typo in mdevctl update warning

2022-03-16 Thread Jonathon Jongsma
On 3/16/22 1:48 PM, Boris Fiuczynski wrote: Signed-off-by: Boris Fiuczynski --- src/node_device/node_device_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index b0a5e6302c..17b6bb9299 100644 -

Re: [PATCH 3/3] nodedev: trigger mdev device definition update on udev add and remove

2022-03-16 Thread Jonathon Jongsma
On 3/16/22 8:32 AM, Michal Prívozník wrote: On 3/15/22 09:56, Boris Fiuczynski wrote: When nodedev objects are added and removed if possible check if mdev-types is supported by the object and trigger a mdev device definition update to correct the associated parent nodedevs. Signed-off-by: Boris

[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

[PATCH] nodedev: fix typo in mdevctl update warning

2022-03-16 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- src/node_device/node_device_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index b0a5e6302c..17b6bb9299 100644 --- a/src/node_device/node_device_udev.c +++ b/sr

Re: [PATCH 3/3] nodedev: trigger mdev device definition update on udev add and remove

2022-03-16 Thread Boris Fiuczynski
On 3/16/22 2:32 PM, Michal Prívozník wrote: On 3/15/22 09:56, Boris Fiuczynski wrote: When nodedev objects are added and removed if possible check if mdev-types is supported by the object and trigger a mdev device definition update to correct the associated parent nodedevs. Signed-off-by: Boris

[PATCH 1/2] qemu_process: Be nicer to killing QEMU when probing caps

2022-03-16 Thread Michal Privoznik
The qemuProcessQMPStop() function is intended to kill this dummy QEMU process we started only for querying capabilities. Nevertheless, it may be not plain QEMU binary we executed, but in fact it may be a memcheck tool (e.g. valgrind) that executes QEMU later. By switching to virProcessKillPainfully

[PATCH 2/2] qemu_process: Start QEMU for caps probing more robustly

2022-03-16 Thread Michal Privoznik
When probing QEMU capabilities, we look at whatever was specified in the domain XML and execute it with couple of arguments (-daemonize being one of them) Then, we use virCommandSetErrorBuffer() to read stderr of the child process hoping to read possible error message just before the process daemo

[PATCH 0/2] qemu_process: Start probing process more robustly

2022-03-16 Thread Michal Privoznik
I've found these in an old branch where dnsmasq starting is reworked too. But that part is not ready yet, so let's merge at least the first two patches. Michal Prívozník (2): qemu_process: Be nicer to killing QEMU when probing caps qemu_process: Start QEMU for caps probing more robustly src/

Re: [PATCH v2 0/2] qemu: domainjob: Allow operations if cb is not set in job structure

2022-03-16 Thread Michal Prívozník
On 3/16/22 15:08, Kristina Hanicova wrote: > This is v2 of: > https://listman.redhat.com/archives/libvir-list/2022-March/228905.html > > Diff to v1: > * add checks for cb structure in other functions as well > (suggested by Michal) > > Kristina Hanicova (2): > qemu: domainjob: Allow operatio

[PATCH v2 1/2] qemu: domainjob: Allow operations if cb is not set in job structure

2022-03-16 Thread Kristina Hanicova
We should allow resetting / freeing / restoring / parsing / formatting qemuDomainJobObj even if 'cb' attribute is not set. This is theoretical for now, but the attribute must not be always set in the future. It is sufficient to check if 'cb' exists before dereferencing it. This commit partially re

[PATCH v2 0/2] qemu: domainjob: Allow operations if cb is not set in job structure

2022-03-16 Thread Kristina Hanicova
This is v2 of: https://listman.redhat.com/archives/libvir-list/2022-March/228905.html Diff to v1: * add checks for cb structure in other functions as well (suggested by Michal) Kristina Hanicova (2): qemu: domainjob: Allow operations if cb is not set in job structure qemu: domainjob: Allow

[PATCH v2 2/2] qemu: domainjob: Allow InitJob if cb is not set in qemuDomainObjInitJob()

2022-03-16 Thread Kristina Hanicova
This allows init job even if cb structure is not set. This patch also includes slight rewriting of the function to make it look cleaner when freeing resources, by allocating privateData at the end. Signed-off-by: Kristina Hanicova --- src/qemu/qemu_domainjob.c | 11 ++- 1 file changed, 6

Re: [PATCH 3/3] nodedev: trigger mdev device definition update on udev add and remove

2022-03-16 Thread Michal Prívozník
On 3/15/22 09:56, Boris Fiuczynski wrote: > When nodedev objects are added and removed if possible check if mdev-types is > supported by the object and trigger a mdev device definition update to correct > the associated parent nodedevs. > > Signed-off-by: Boris Fiuczynski > --- > src/node_device

Re: Virtqemud wants to unlink /dev/urandom

2022-03-16 Thread Michal Prívozník
On 3/16/22 12:40, Nikola Knazekova wrote: > Hi guys, > > Thank you very much for the detailed explanation. > > With the mount namespace feature turned off, there were no SELinux denials. > > Michal I saw yourcommit >

Re: [libvirt RFC] virFile: new VIR_FILE_WRAPPER_BIG_PIPE to improve performance

2022-03-16 Thread Claudio Fontana
On 3/14/22 6:48 PM, Daniel P. Berrangé wrote: > On Mon, Mar 14, 2022 at 06:38:31PM +0100, Claudio Fontana wrote: >> On 3/14/22 6:17 PM, Daniel P. Berrangé wrote: >>> On Sat, Mar 12, 2022 at 05:30:01PM +0100, Claudio Fontana wrote: the first user is the qemu driver, virsh save/resume

Re: Virtqemud wants to unlink /dev/urandom

2022-03-16 Thread Nikola Knazekova
Hi guys, Thank you very much for the detailed explanation. With the mount namespace feature turned off, there were no SELinux denials. Michal I saw your commit , where firstly the existence of devices is checke

Re: [libvirt PATCH] Add Alpine builds to CI

2022-03-16 Thread Erik Skultety
On Tue, Mar 15, 2022 at 12:15:03PM +0100, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > ci/containers/alpine-314.Dockerfile | 82 > ci/containers/alpine-edge.Dockerfile | 81 +++ > ci/gitlab.yml| 3

Re: [libvirt PATCH] Add Alpine builds to CI

2022-03-16 Thread Erik Skultety
On Wed, Mar 16, 2022 at 12:03:09PM +0100, Erik Skultety wrote: > On Tue, Mar 15, 2022 at 12:33:31PM +0100, Martin Kletzander wrote: > > On Tue, Mar 15, 2022 at 12:15:03PM +0100, Martin Kletzander wrote: > > > Signed-off-by: Martin Kletzander > > > --- > > > ci/containers/alpine-314.Dockerfile | 8

Re: [libvirt PATCH] Add Alpine builds to CI

2022-03-16 Thread Erik Skultety
On Tue, Mar 15, 2022 at 12:33:31PM +0100, Martin Kletzander wrote: > On Tue, Mar 15, 2022 at 12:15:03PM +0100, Martin Kletzander wrote: > > Signed-off-by: Martin Kletzander > > --- > > ci/containers/alpine-314.Dockerfile | 82 > > ci/containers/alpine-edge.Dockerfile |

Re: [PATCH 0/4] qemu_cgroup: Slightly rework

2022-03-16 Thread Pavel Hrdina
On Tue, Mar 15, 2022 at 05:07:15PM +0100, Michal Privoznik wrote: > These are inspired by my earlier patches that solved the same issue for > namespaces: > > https://listman.redhat.com/archives/libvir-list/2022-March/229266.html > > Michal Prívozník (4): > qemu_cgroup: Drop ENOENT special case

Re: [PATCH] add build dependency on lxc_protocol.h to remote_daemon

2022-03-16 Thread Pavel Hrdina
On Wed, Mar 16, 2022 at 09:51:48AM +, Daniel P. Berrangé wrote: > On Wed, Mar 16, 2022 at 09:39:52AM +0100, Michal Prívozník wrote: > > On 3/14/22 15:58, Slater, Joseph wrote: > > > I was really only wanting to make sure that both remote_driver and > > > remote_daemon have access to lxc_protoc

Re: [PATCH] add build dependency on lxc_protocol.h to remote_daemon

2022-03-16 Thread Daniel P . Berrangé
On Wed, Mar 16, 2022 at 09:39:52AM +0100, Michal Prívozník wrote: > On 3/14/22 15:58, Slater, Joseph wrote: > > I was really only wanting to make sure that both remote_driver and > > remote_daemon have access to lxc_protocol.h. I am not an expert in meson > > builds but I think the only way to d

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: [PATCH] add build dependency on lxc_protocol.h to remote_daemon

2022-03-16 Thread Michal Prívozník
On 3/14/22 15:58, Slater, Joseph wrote: > I was really only wanting to make sure that both remote_driver and > remote_daemon have access to lxc_protocol.h. I am not an expert in meson > builds but I think the only way to do that is have a loop outside of > remote_daemon_generated and remote_dri