[PATCH 0/2] interface: Refactor code and fix old listing API when interface is unbound

2024-05-06 Thread Peter Krempa
Patch 1/2 removes a pointless helper in favor of making an almost identical function more universal, so that patch 2/2 then fixes all cases in one place. Peter Krempa (2): interface_udev: Replace udevNumOfInterfacesByStatus by udevListInterfacesByStatus udevListInterfacesByStatus: Don't

[PATCH 2/2] udevListInterfacesByStatus: Don't try to return NULL names

2024-05-06 Thread Peter Krempa
In case when the interface is being detached/reattached it may happen that udev will return NULL from 'udev_device_get_sysname()'. As the RPC code requires nonnull strings in the return array it fails to serialize such reply: libvirt: XML-RPC error : Unable to encode message payload Fix this

[PATCH 1/2] interface_udev: Replace udevNumOfInterfacesByStatus by udevListInterfacesByStatus

2024-05-06 Thread Peter Krempa
Make the array-filling operation of udevListInterfacesByStatus optional and replace the completely redundant udevNumOfInterfacesByStatus by it. Further patches fixing the listing will not need to be duplicated. Signed-off-by: Peter Krempa --- src/interface/interface_backend_udev.c | 76

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-06 Thread Peter Xu
On Mon, May 06, 2024 at 12:08:43PM +0200, Jinpu Wang wrote: > Hi Peter, hi Daniel, Hi, Jinpu, Thanks for sharing this test results. Sounds like a great news. What's your plan next? Would it then be worthwhile / possible moving QEMU into that direction? Would that greatly simplify rdma code

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-06 Thread Peter Xu
On Mon, May 06, 2024 at 02:06:28AM +, Gonglei (Arei) wrote: > Hi, Peter Hey, Lei, Happy to see you around again after years. > RDMA features high bandwidth, low latency (in non-blocking lossless > network), and direct remote memory access by bypassing the CPU (As you > know, CPU resources

Re: [PATCH 0/4] Introduce SSH proxy

2024-05-06 Thread Michal Prívozník
On 4/19/24 12:12, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (4): > datatypes: Declare g_autoptr cleanup functions for more public objects > tools: Introduce SSH proxy > docs: Document SSH proxy > NEWS: Document SSH proxy feature > > NEWS.rst

Re: [PATCH] qemu_saveimage: add zstd to supported compression formats

2024-05-06 Thread Michal Prívozník
On 4/26/24 20:28, Adam Julis wrote: > Extend the list of supported formats, update and clarify comment > in qemu.conf.in (removed misleading sentence about the order of > compression format types). > > Signed-off-by: Adam Julis Commit message is a great place to put link to the issue you're

Re: [PATCH v2 0/4] qemu: Substract isolcpus from all online affinity

2024-05-06 Thread Pavel Hrdina
On Tue, Apr 23, 2024 at 04:16:20PM +0200, Michal Privoznik wrote: > v2 of: > > https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/4V7OI5AEGYRN4GFQMQPIN4MYPJNK3NYJ/ > > diff to v1: > - Don't error out on systems where /sys/devices/system/cpu/isolated is > unavailable. > -

Re: [PATCH v2 3/4] virhostcpu: Introduce virHostCPUGetIsolated()

2024-05-06 Thread Pavel Hrdina
On Tue, Apr 23, 2024 at 04:16:23PM +0200, Michal Privoznik wrote: > This is a helper that parses /sys/devices/system/cpu/isolated > into a virBitmap. It's going to be needed soon. > > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 1 + > src/util/virhostcpu.c| 31

Re: [PATCH v2] qemu-options: Deprecate "-runas" and introduce "-run-with user=..." instead

2024-05-06 Thread Paolo Bonzini
On Mon, May 6, 2024 at 1:21 PM Thomas Huth wrote: > > The old "-runas" option has the disadvantage that it is not visible > in the QAPI schema, so it is not available via the normal introspection > mechanisms. We've recently introduced the "-run-with" option for exactly > this purpose, which is

Re: [PATCH v2 0/4] qemu: Substract isolcpus from all online affinity

2024-05-06 Thread Michal Prívozník
On 4/23/24 16:16, Michal Privoznik wrote: > v2 of: > > https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/4V7OI5AEGYRN4GFQMQPIN4MYPJNK3NYJ/ > > diff to v1: > - Don't error out on systems where /sys/devices/system/cpu/isolated is > unavailable. > - Don't error out on systems

Re: [PATCH] NEWS: document qemu: ras as a new feature

2024-05-06 Thread Andrea Bolognani
On Fri, May 03, 2024 at 01:49:30PM GMT, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova > --- > NEWS.rst | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Andrea Bolognani and pushed. Thanks! -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] vsh: Don't init history in cmdComplete()

2024-05-06 Thread Andrea Bolognani
On Sat, May 04, 2024 at 05:32:39AM GMT, Michal Privoznik wrote: > Recent rework of virshtest uncovered a subtle bug that was > dormant in now vsh but before that even in monolithic virsh. > > In vsh.c there's this vshReadlineInit() function that's supposed > to initialize readline library, i.e.

Re: [PATCH v2] qemu-options: Deprecate "-runas" and introduce "-run-with user=..." instead

2024-05-06 Thread Philippe Mathieu-Daudé
On 6/5/24 13:20, Thomas Huth wrote: The old "-runas" option has the disadvantage that it is not visible in the QAPI schema, so it is not available via the normal introspection mechanisms. We've recently introduced the "-run-with" option for exactly this purpose, which is meant to handle the

[PATCH v2] qemu-options: Deprecate "-runas" and introduce "-run-with user=..." instead

2024-05-06 Thread Thomas Huth
The old "-runas" option has the disadvantage that it is not visible in the QAPI schema, so it is not available via the normal introspection mechanisms. We've recently introduced the "-run-with" option for exactly this purpose, which is meant to handle the options that affect the runtime behavior.

Re: [PATCH] vsh: Don't init history in cmdComplete()

2024-05-06 Thread Ján Tomko
On a Saturday in 2024, Michal Privoznik wrote: Recent rework of virshtest uncovered a subtle bug that was dormant in now vsh but before that even in monolithic virsh. In vsh.c there's this vshReadlineInit() function that's supposed to initialize readline library, i.e. set those global rl_*

[PATCH 04/13] security: Fix return types of .probe callbacks

2024-05-06 Thread Michal Privoznik
The .probe member of virSecurityDriver struct is declared to return virSecurityDriverStatus enum. But there are two instances (AppArmorSecurityManagerProbe() and virSecuritySELinuxDriverProbe()) where callbacks are defined to return an integer. This is an undefined behavior because integer has

[PATCH 13/13] ci: Introduce AlmaLinux 9

2024-05-06 Thread Michal Privoznik
AlmaLinux 9 was released a while ago, but for some reason it's missing in our CI. Add it there. Signed-off-by: Michal Privoznik --- ci/buildenv/almalinux-9.sh | 101 ++ ci/containers/almalinux-9.Dockerfile | 104 +++ ci/gitlab/builds.yml

[PATCH 12/13] ci: Introduce Ubuntu 24.04

2024-05-06 Thread Michal Privoznik
Ubuntu 24.04 was released recently. Add it to our CI. Signed-off-by: Michal Privoznik --- ci/buildenv/centos-stream-9.sh| 1 + ci/buildenv/debian-12-cross-aarch64.sh| 1 + ci/buildenv/debian-12-cross-armv6l.sh | 1 + ci/buildenv/debian-12-cross-armv7l.sh

[PATCH 11/13] ci: Introduce Fedora 40

2024-05-06 Thread Michal Privoznik
Fedora 40 was released recently. Add it to our CI. Signed-off-by: Michal Privoznik --- ci/buildenv/fedora-40-cross-mingw32.sh| 77 ci/buildenv/fedora-40-cross-mingw64.sh| 77 ci/buildenv/fedora-40.sh | 98

[PATCH 10/13] meson: Bump glib version to 2.58.0

2024-05-06 Thread Michal Privoznik
Now that we don't have any distro stuck with glib-2.56.0, we can bump the glib version. In fact, this is needed, because of g_clear_pointer. Since v7.4.0-rc1~301 we declare at compile time what version of glib APIs we want to use (by setting GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_MAX_ALLOWED =

[PATCH 09/13] ci: Drop AlmaLinux 8

2024-05-06 Thread Michal Privoznik
By the time of release, it's going to be more than two years since AlmaLinux 9 was released and per our support policy, AlmaLinux 8 (the previous major release) will be not supported. Remove it from our CI testing. Signed-off-by: Michal Privoznik --- ci/buildenv/almalinux-8.sh | 103

[PATCH 08/13] ci: Drop Ubuntu 20.04

2024-05-06 Thread Michal Privoznik
It's now more than two years since Ubuntu 22.04 was released and per our support policy, Ubuntu 20.04 (the previous major release) is now not supported. Remove it from our CI testing. Signed-off-by: Michal Privoznik --- ci/buildenv/ubuntu-2004.sh | 103 --

[PATCH 07/13] ci: Drop Fedora 38

2024-05-06 Thread Michal Privoznik
Since Fedora 40 was released recently, Fedora 38 is now unsupported. Remove it from our CI. Signed-off-by: Michal Privoznik --- ci/buildenv/fedora-38-cross-mingw32.sh| 77 ci/buildenv/fedora-38-cross-mingw64.sh| 77 ci/buildenv/fedora-38.sh

[PATCH 05/13] meson: Disable -fsanitize=function

2024-05-06 Thread Michal Privoznik
Strictly speaking, xdrproc_t is declared as following: typedef bool_t (*xdrproc_t)(XDR *, ...); But our rpcgen generates properly typed functions, e.g.: bool_t xdr_virNetMessageError(XDR *xdrs, virNetMessageError *objp) Now, these functions of ours are passed around as callbacks (via an

[PATCH 06/13] gitlab-ci: Move website_job to Fedora 39

2024-05-06 Thread Michal Privoznik
Currently, our website job depends on almalinux-8 container. Well, AlmaLinux 8 is going to be dropped soon. Therefore, switch the job to something newer. Fedora 39 was chosen by a roll of dice. Signed-off-by: Michal Privoznik --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 03/13] testutilsqemu: Don't leak struct testQemuArgs::vdpafds

2024-05-06 Thread Michal Privoznik
Allocated in testQemuInfoSetArgs(), the vdpafds member of testQemuArgs is never freed. Signed-off-by: Michal Privoznik --- tests/testutilsqemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 9c12a165b1..d70850cb5d 100644 ---

[PATCH 02/13] qemuxml2argvmock: Drop link time dependency on qemuFDPassDirectNew()

2024-05-06 Thread Michal Privoznik
While Linux linker has no trouble resolving the symbols, valgrind does. It has probably something to do with the fact that we don't tell what symbols to export from mock libraries. Anyway, just resolve the symbol at runtime. Signed-off-by: Michal Privoznik --- tests/qemuxml2argvmock.c | 8

[PATCH 01/13] domaincapsmock: Drop link time dependency on virQEMUCapsGet()

2024-05-06 Thread Michal Privoznik
While Linux linker has no trouble resolving the symbols, valgrind does. It has probably something to do with the fact that we don't tell what symbols to export from mock libraries. Anyway, just resolve the symbol at runtime. Signed-off-by: Michal Privoznik --- tests/domaincapsmock.c | 13

[PATCH 00/13] Big CI update (and some bug fixes)

2024-05-06 Thread Michal Privoznik
There's a lot happening here, but I did not find a way to split this any better. It all started with me wanting to switch from Ubuntu 20.04 to 24.04 and resulted in this. Firstly, Ubuntu 24.04 started to complain about a few things: 1) ASAN wasn't working (some missing .a archive). Fix is

Re: [PATCH] hyperv: prevent potential NULL dereference

2024-05-06 Thread Ján Tomko
On a Friday in 2024, Kristina Hanicova wrote: On Fri, May 3, 2024 at 11:43 AM Oleg Sviridov wrote: Return value of a function 'virDomainChrDefNew' is dereferenced at hyperv_driver.c without checking for NULL, which can lead to NULL dereference immediatly after. *immediately Found by