[PATCH 5/5] NEWS: Document pstore device addition

2024-06-10 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index f3ca29443a..2e735f69ce 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,13 @@ v10.5.0 (unreleased) * **New features** + * Introduce pstore device

[PATCH 4/5] security: Set seclabels for pstore device

2024-06-10 Thread Michal Privoznik
The acpi-erst backend for pstore device exposes a path in the host accessible to the guest and as such we must set seclabels on it to grant QEMU RW access. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 10 ++ src/security/security_selinux.c | 9 + src

[PATCH 3/5] qemu: Build cmd line for pstore device

2024-06-10 Thread Michal Privoznik
Nothing special going on here. Signed-off-by: Michal Privoznik --- src/qemu/qemu_alias.c | 10 src/qemu/qemu_command.c | 51 +++ .../pstore-acpi-erst.x86_64-latest.args | 2 + 3 files changed, 63 insertions(+) diff --git

[PATCH 2/5] conf: Introduce pstore device

2024-06-10 Thread Michal Privoznik
any additional RAM to the guest and thus I've decided to expose it as another device type instead of memory model. Signed-off-by: Michal Privoznik --- docs/formatdomain.rst | 32 src/ch/ch_domain.c| 1 + src/conf/domain_conf.c

[PATCH 1/5] qemu_capabilities: Introduce QEMU_CAPS_DEVICE_ACPI_ERST

2024-06-10 Thread Michal Privoznik
This capability tracks whether QEMU has acpi-erst device. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_7.0.0_aarch64+hvf.xml | 1 + tests

[PATCH 0/5] Introduce pstore device

2024-06-10 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): qemu_capabilities: Introduce QEMU_CAPS_DEVICE_ACPI_ERST conf: Introduce pstore device qemu: Build cmd line for pstore device security: Set seclabels for pstore device NEWS: Document pstore device addition NEWS.rst

[PATCH 0/2] lib: Annotate more functions as NULL terminated

2024-06-05 Thread Michal Privoznik
I'm working on something that's calling qemuMonitorCreateObjectProps() and was getting random errors only to find out I was missing NULL sentinel. This sparked me to look at other functions that might be missing the G_GNUC_NULL_TERMINATED attribute too and found some. Michal Prívozník (2): lib:

[PATCH 1/2] lib: Annotate more function as NULL terminated

2024-06-05 Thread Michal Privoznik
in. After this, there are still some functions left untouched because they expect a different sentinel than NULL. Unfortunately, glib does not provide macro for different sentinels. We may come up with our own, but let's save that for future work. Signed-off-by: Michal Privoznik --- src/qemu

[PATCH 2/2] qemumonitortestutils: Fix G_GNUC_PRINTF annotation of qemuMonitorTestAddErrorResponse()

2024-06-05 Thread Michal Privoznik
The qemuMonitorTestAddErrorResponse() function is a printf-like function. But the annotation was mistakenly done in .c file instead of corresponding .h file rendering the annotation ineffective. Move the annotation to the header file. Signed-off-by: Michal Privoznik --- tests

[PATCH] NEWS: Document my contributions for upcoming release

2024-05-30 Thread Michal Privoznik
These are either features/bugfixes I've worked on or participated in. Signed-off-by: Michal Privoznik --- NEWS.rst | 23 +++ 1 file changed, 23 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 14505116b1..57e8f0d0c3 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -45,6 +45,16

[PATCH] qemu_hotplug: Clear QoS if required in qemuDomainChangeNet()

2024-05-30 Thread Michal Privoznik
its removal) and thus instead of removing the old QoS setting nothing is done. Fortunately, the fix is simple - pass olddev which contains the old QoS setting. Fixes: 812a146dfe784315edece43d09f8d9e432f8230e Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1

[PATCH] log_cleaner: Detect rotated filenames properly

2024-05-29 Thread Michal Privoznik
an empty string instead of NULL which then makes str2int parsing fail. Just check for this case before parsing the string. Based on the original patch sent by David. Reported-by: David Negreira Signed-off-by: Michal Privoznik --- The original patch was posted here: https://lists.libvirt.org

[PATCH v2] run.in: Detect binaries in builddir properly

2024-05-28 Thread Michal Privoznik
progpath.startswith(builddir). While builddir is an absolute path, progpath isn't necessarily. And while looking into the code, I've noticed chcon() function accessing variable outside its scope when printing out the path it's working on. Signed-off-by: Michal Privoznik --- v2 of: https

[PATCH 6/6] vsh: Don't crash when @text is NULL in vshCompleterFilter()

2024-05-27 Thread Michal Privoznik
just right but is then subsequently passed to vshCompleterFilter() which isn't prepared for this case. Signed-off-by: Michal Privoznik --- tools/vsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index c91d756885..6cc1f60d87 100644 --- a/tools/vsh.c

[PATCH 5/6] vsh: Restore original rl_line_buffer after completion

2024-05-27 Thread Michal Privoznik
: 41400ac1dda55b817388a4050aa823051bda2e05 Fixes: a0e1ada63c0afdc2af3b9405cbf637d8bd28700c Signed-off-by: Michal Privoznik --- tools/vsh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/vsh.c b/tools/vsh.c index de869248b4..c91d756885 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -3511,6 +3511,7

[PATCH 3/6] bash-completion: Run virsh/virt-admin in quiet mode

2024-05-27 Thread Michal Privoznik
no daemon is running. Suppress extra prints by passing '-q' in the bash-completion script. Signed-off-by: Michal Privoznik --- tools/bash-completion/vsh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bash-completion/vsh.in b/tools/bash-completion/vsh.in index

[PATCH 4/6] vsh: Close stderr among with stdin in cmdComplete

2024-05-27 Thread Michal Privoznik
stdin. Signed-off-by: Michal Privoznik --- tools/vsh.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 61a3066f49..de869248b4 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -3488,17 +3488,20 @@ const vshCmdInfo info_complete

[PATCH 2/6] virt-admin: Make --timeout of daemon-timeout positional argument

2024-05-27 Thread Michal Privoznik
We currently require full argument specification: virt-admin daemon-timeout --timeout X Well, the '--timeout' feels a bit redundant. Turn the argument into a positional so that the following works too: virt-admin daemon-timeout X Signed-off-by: Michal Privoznik --- docs/manpages/virt

[PATCH 0/6] Random fixes

2024-05-27 Thread Michal Privoznik
It started simple - I pointed somebody to debug logs kbase article only to realize our own examples don't work. And ended up fixing bash completion. Fans of 'Malcolm in the Middle' know the feeling. Michal Prívozník (6): kbase: Use virt-admin daemon-timeout correctly virt-admin: Make

[PATCH 1/6] kbase: Use virt-admin daemon-timeout correctly

2024-05-27 Thread Michal Privoznik
-by: Michal Privoznik --- docs/kbase/debuglogs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/kbase/debuglogs.rst b/docs/kbase/debuglogs.rst index f08132d099..dff2cfd144 100644 --- a/docs/kbase/debuglogs.rst +++ b/docs/kbase/debuglogs.rst @@ -25,7 +25,7 @@ the system

[PATCH] run.in: Detect binaries in builddir properly

2024-05-22 Thread Michal Privoznik
progpath.startswith(builddir). While builddir is an absolute path, progpath isn't necessarily. And while looking into the code, I've noticed chcon() function accessing variable outside its scope when printing out the path it's working on. Signed-off-by: Michal Privoznik --- run.in | 4 ++-- 1

[PATCH] src: Fix return types of .stateInitialize callbacks

2024-05-22 Thread Michal Privoznik
The virStateDriver struct has .stateInitialize callback which is declared to return virDrvStateInitResult enum. But some drivers return a plain int in their implementation which is UB. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c| 2 +- src/ch/ch_driver.c

[PATCH 0/2] Make affinity setting a bit more debug friendly

2024-05-16 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): qemu_process: Issue an info message when subtracting isolcpus virprocess: Debug affinity map in virProcessSetAffinity() src/qemu/qemu_process.c | 6 ++ src/util/virprocess.c | 6 -- 2 files changed, 10 insertions(+), 2 deletions(-) --

[PATCH 1/2] qemu_process: Issue an info message when subtracting isolcpus

2024-05-16 Thread Michal Privoznik
that to a regular WARN if users complain. Fixes: da95bcb6b2d9b04958e0f2603202801dd29debb8 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7ef7040a85..2c33ac3bf7 100644 --- a/src/qemu

[PATCH 2/2] virprocess: Debug affinity map in virProcessSetAffinity()

2024-05-16 Thread Michal Privoznik
The aim of virProcessSetAffinity() is to set affinity of given process to given CPUs. While we currently print the PID into logs, the CPU map is not printed. It may help when debugging weird scenarios. Signed-off-by: Michal Privoznik --- src/util/virprocess.c | 6 -- 1 file changed, 4

[PATCH 2/2] gitlab-ci: Switch coverity job to AlmaLinux 9

2024-05-14 Thread Michal Privoznik
It's currently running against AlmaLinux 8 which went out of support. Signed-off-by: Michal Privoznik --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3114c7410e..7f80896e6e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab

[PATCH 1/2] gitlab-ci: Switch potfile job to AlmaLinux 9

2024-05-14 Thread Michal Privoznik
It's currently running against AlmaLinux 8 which went out of support. Signed-off-by: Michal Privoznik --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81ac2ecddd..3114c7410e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab

[PATCH 0/2] ci: Finish dropping AlmaLinux 8

2024-05-14 Thread Michal Privoznik
I've switched our CI jobs from AlmaLinux 8 to AlmaLinux 9, but apparently forgot about two. Michal Prívozník (2): gitlab-ci: Switch potfile job to AlmaLinux 9 gitlab-ci: Switch coverity job to AlmaLinux 9 .gitlab-ci.yml | 8 1 file changed, 4 insertions(+), 4 deletions(-) --

[PATCH] tests: Link some mocks with libtest_qemu_driver.so

2024-05-14 Thread Michal Privoznik
ver with the QEMU driver, well, its test suite suitable version (libtest_qemu_driver.so). Signed-off-by: Michal Privoznik --- This obsoletes some patches I've sent earlier: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/RM56P5RDBYCVYQVKHOFFKUZ2B276NQD3/ https://lists.l

[PATCH] github: Update lockdown message when openin a PR

2024-05-10 Thread Michal Privoznik
The message that's thrown at users when they try to open a pull request on github suggests opening the MR on gitlab instead. While this works for other libvirt subprojects, for the main libvirt.git we still use e-mail workflow. Update the message to reflect this fact. Signed-off-by: Michal

[PATCH v3 3/3] NEWS: Document SSH proxy feature

2024-05-09 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d72c15bf10..ef0e4f8b51 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -22,6 +22,11 @@ v10.4.0 (unreleased) It is now possible to set on/off ``ras`` feature in the domain

[PATCH v3 2/3] docs: Document SSH proxy

2024-05-09 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- docs/docs.rst | 3 ++ docs/meson.build | 1 + docs/nss.rst | 7 docs/ssh-proxy.rst | 85 ++ 4 files changed, 96 insertions(+) create mode 100644 docs/ssh-proxy.rst diff --git a/docs/docs.rst b

[PATCH v3 1/3] tools: Introduce SSH proxy

2024-05-09 Thread Michal Privoznik
d/blob/main/src/ssh-generator/ssh-proxy.c 2: https://github.com/systemd/systemd/blob/main/src/ssh-generator/20-systemd-ssh-proxy.conf.in Resolves: https://gitlab.com/libvirt/libvirt/-/issues/579 Signed-off-by: Michal Privoznik --- libvirt.spec.in | 33 +++ meson

[PATCH v3 0/3] Introduce SSH proxy

2024-05-09 Thread Michal Privoznik
v3 of: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/EXJPQJSZEOTXAJRKPDAMCWRC4S2QDQFF/ diff to v2: - New naming scheme: user@qemu:system/VM and user@qemu:session/VM for choosing explicit connection URI for fetching VM. Old user@qemu/VM is kept for convenience.

[PATCH v2 08/10] ci: Drop Ubuntu 20.04

2024-05-07 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 Reviewed-by: Daniel P. Berrangé --- ci/buildenv/ubuntu-2004.sh | 103

[PATCH v2 10/10] ci: Introduce Ubuntu 24.04

2024-05-07 Thread Michal Privoznik
Ubuntu 24.04 was released recently. Add it to our CI. Also, to be able to run ASAN/UBSAN builds on Ubuntu 24.04 libclang-rt-dev needs to be installed (because clang's runtime was moved into a separate package). Hence so many seemingly unrelated changes. Signed-off-by: Michal Privoznik --- ci

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

2024-05-07 Thread Michal Privoznik
-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- meson.build | 2 +- src/libvirt_private.syms | 1 - src/util/glibcompat.c| 125 --- src/util/glibcompat.h| 10 4 files changed, 1 insertion(+), 137 deletions(-) diff --git

[PATCH v2 07/10] ci: Switch from Fedora 38 to Fedora 40

2024-05-07 Thread Michal Privoznik
Since Fedora 40 was released recently, Fedora 38 is now unsupported. Drop Fedora 38 and introduce Fedora 40 to our CI. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- ...-mingw32.sh => fedora-40-cross-mingw32.sh} | 0 ...-mingw64.sh => fedora-40-cross-mingw64.sh} |

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

2024-05-07 Thread Michal Privoznik
v2 of: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MMENBGZ3HYYKUVPY6FJ443SYCBNFTDHH/ diff to v1: - Juggled some patches around, namely: squashed Fedora and AlmaLinux drop & reintroduction patches, reordered some for easier review. - Switched website job to AlmaLinux

[PATCH v2 06/10] ci: Switch from AlmaLinux 8 to AlmaLinux 9

2024-05-07 Thread Michal Privoznik
to be moved to newer AlmaLinux. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- .gitlab-ci.yml | 6 +++--- ci/buildenv/{almalinux-8.sh => almalinux-9.sh} | 8 +++- ...linux-8.Dockerfile => almalinux-9.Dockerfile} | 10 -- ci/

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

2024-05-07 Thread Michal Privoznik
behavior. Ideally, we would fix our rpcgen to generate proper function headers, but: a) my brain is too small to do that, and b) we would lose compiler protection if an xdr_*() function is called directly but argument of a wrong type is passed. Silence UBSAN for now. Signed-off-by: Michal

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

2024-05-07 Thread Michal Privoznik
strictly bigger space of possible values than the enum. Defined those aforementioned callbacks so that they return the correct enum instead of int. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrangé --- src/security/security_apparmor.c | 2 +- src/security/security_selinux.c | 2

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

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

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

2024-05-07 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 Reviewed-by: Daniel P. Berrangé

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

2024-05-07 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 Reviewed-by: Daniel P. Berrangé

[PATCH v2 2/3] docs: Document SSH proxy

2024-05-07 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- docs/docs.rst | 3 ++ docs/meson.build | 1 + docs/nss.rst | 7 + docs/ssh-proxy.rst | 68 ++ 4 files changed, 79 insertions(+) create mode 100644 docs/ssh-proxy.rst diff --git a/docs/docs.rst b

[PATCH v2 3/3] NEWS: Document SSH proxy feature

2024-05-07 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index d72c15bf10..ef0e4f8b51 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -22,6 +22,11 @@ v10.4.0 (unreleased) It is now possible to set on/off ``ras`` feature in the domain

[PATCH v2 0/3] Introduce SSH proxy

2024-05-07 Thread Michal Privoznik
v2 of: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/QYFHZFXUVKPM3JCPUKFVPBRZOIG2R2RK/ diff to v1: - rebased onto current master - Worked in Dan's review Michal Prívozník (3): tools: Introduce SSH proxy docs: Document SSH proxy NEWS: Document SSH proxy feature

[PATCH v2 1/3] tools: Introduce SSH proxy

2024-05-07 Thread Michal Privoznik
d/blob/main/src/ssh-generator/ssh-proxy.c 2: https://github.com/systemd/systemd/blob/main/src/ssh-generator/20-systemd-ssh-proxy.conf.in Resolves: https://gitlab.com/libvirt/libvirt/-/issues/579 Signed-off-by: Michal Privoznik --- libvirt.spec.in | 33 +++ meson

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

2024-05-06 Thread Michal Privoznik
strictly bigger space of possible values than the enum. Defined those aforementioned callbacks so that they return the correct enum instead of int. Signed-off-by: Michal Privoznik --- src/security/security_apparmor.c | 2 +- src/security/security_selinux.c | 2 +- 2 files changed, 2 insertions

[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
-by: Michal Privoznik --- meson.build | 2 +- src/libvirt_private.syms | 1 - src/util/glibcompat.c| 125 --- src/util/glibcompat.h| 10 4 files changed, 1 insertion(+), 137 deletions(-) diff --git a/meson.build b/meson.build index

[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 -- ci

[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
behavior. Ideally, we would fix our rpcgen to generate proper function headers, but: a) my brain is too small to do that, and b) we would lose compiler protection if an xdr_*() function is called directly but argument of a wrong type is passed. Silence UBSAN for now. Signed-off-by: Michal

[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 --- a/tests

[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

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

2024-05-03 Thread Michal Privoznik
t.c this means some test cases might create virsh history file which breaks our promise of not touching user's data in test suite. Resolves: https://bugs.gentoo.org/931109 Signed-off-by: Michal Privoznik --- tools/vsh.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --

[PATCH RESEND] NEWS: Document my contributions for upcoming release

2024-05-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Rebased version of the patch sent earlier, because the file was changed meanwhile. NEWS.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 7ced82e3da..554ca559a2 100644 --- a/NEWS.rst +++ b/NEWS.rst

[PATCH] NEWS: Document my contributions for upcoming release

2024-04-30 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 852dadf532..4958326875 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,8 +17,20 @@ v10.3.0 (unreleased) * **New features** + * conf: Introduce

[PATCH] scripts/meson-dist.py: Git builddir from env too

2024-04-29 Thread Michal Privoznik
-off-by: Michal Privoznik --- Another option is to pass both directories as arguments. But this inconsistent solution bothers me. Especially since I want to copy the script somewhere else (stay tuned to learn more). meson.build | 4 ++-- scripts/meson-dist.py | 4 ++-- 2 files changed

[PATCH] virnetdevbandwidth.c: Put a limit to "quantum"

2024-04-25 Thread Michal Privoznik
TC. Fixes: 065054daa71f645fc83aff0271f194d326208616 Resolves: https://issues.redhat.com/browse/RHEL-34112 Signed-off-by: Michal Privoznik --- src/util/virnetdevbandwidth.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c index

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

2024-04-23 Thread Michal Privoznik
Resolves: https://issues.redhat.com/browse/RHEL-33082 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index da2b024f92..521598471f 100644 --- a/src/qemu/qemu_process.c +++ b/src

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

2024-04-23 Thread Michal Privoznik
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 where /sys/devices/system/cpu/isolated is empty. Both

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

2024-04-23 Thread Michal Privoznik
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 +++ src/util/virhostcpu.h| 1 + 3 files changed, 33

[PATCH v2 1/4] virbitmap: Introduce virBitmapParseUnlimitedAllowEmpty()

2024-04-23 Thread Michal Privoznik
that accepts empty files. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 40 +++- src/util/virbitmap.h | 3 +++ tests/virbitmaptest.c| 40 4 files changed, 79

[PATCH v2 2/4] virfile: Introduce virFileReadValueBitmapAllowEmpty()

2024-04-23 Thread Michal Privoznik
that accepts empty files. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virfile.c | 81 ++-- src/util/virfile.h | 2 + 3 files changed, 65 insertions(+), 19 deletions(-) diff --git a/src/libvirt_private.syms b/src

[PATCH 2/2] qemu: Substract isolcpus from all online affinity

2024-04-22 Thread Michal Privoznik
Resolves: https://issues.redhat.com/browse/RHEL-33082 Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index da2b024f92..ef5338eda3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[PATCH 1/2] virhostcpu: Introduce virHostCPUGetIsolated()

2024-04-22 Thread Michal Privoznik
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| 21 + src/util/virhostcpu.h| 1 + 3 files changed, 23 insertions

[PATCH 0/2] qemu: Substract isolcpus from all online affinity

2024-04-22 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virhostcpu: Introduce virHostCPUGetIsolated() qemu: Substract isolcpus from all online affinity src/libvirt_private.syms | 1 + src/qemu/qemu_process.c | 7 +++ src/util/virhostcpu.c| 21 + src/util/virhostcpu.h| 1

[PATCH] virnetdevopenvswitch: Create OVS ports as transient

2024-04-22 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/util/virnetdevopenvswitch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index f1765ae1c8..e23f4c83b6 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevope

[PATCH 3/4] docs: Document SSH proxy

2024-04-19 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- docs/docs.rst | 3 +++ docs/meson.build | 1 + docs/nss.rst | 7 ++ docs/ssh-proxy.rst | 60 ++ 4 files changed, 71 insertions(+) create mode 100644 docs/ssh-proxy.rst diff --git a/docs/docs.rst

[PATCH 4/4] NEWS: Document SSH proxy feature

2024-04-19 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 852dadf532..3bfd6d6919 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,11 @@ v10.3.0 (unreleased) * **New features** + * SSH proxy for VM + +Libvirt now

[PATCH 2/4] tools: Introduce SSH proxy

2024-04-19 Thread Michal Privoznik
d/blob/main/src/ssh-generator/ssh-proxy.c 2: https://github.com/systemd/systemd/blob/main/src/ssh-generator/20-systemd-ssh-proxy.conf.in Resolves: https://gitlab.com/libvirt/libvirt/-/issues/579 Signed-off-by: Michal Privoznik --- libvirt.spec.in | 27 +++ meson

[PATCH 1/4] datatypes: Declare g_autoptr cleanup functions for more public objects

2024-04-19 Thread Michal Privoznik
Some public objects (like virDomain, virInterface, and so on) are missing g_autoptr() cleanup functions. Provide missing declarations. Note, this is only for our internal use - hence datatypes.h. Signed-off-by: Michal Privoznik --- src/datatypes.h | 16 1 file changed, 16

[PATCH 0/4] Introduce SSH proxy

2024-04-19 Thread Michal Privoznik
*** 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 | 5 + docs/docs.rst

[PATCH] libvirt_nss: Fix ERROR() macro

2024-04-18 Thread Michal Privoznik
the retval and print that instead. While touching this area, decrease the ebuf size, since its current size (1KiB) is triggering our stack limit (2KiB) in some cases. Signed-off-by: Michal Privoznik --- tools/nss/libvirt_nss.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 3/3] qemu_command: Generate mem-reserve for controllers

2024-04-15 Thread Michal Privoznik
Pretty straightforward. Just put mem-reserve attribute whenever it's set. Previous commit ensures it's set only for valid controller models. Resolves: https://issues.redhat.com/browse/RHEL-7461 Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 3 +++ tests

[PATCH 2/3] qemu_validate: Restrict setting @memReserve only to some controllers

2024-04-15 Thread Michal Privoznik
Only two controller models allow setting mem-reserve: pcie-root-port and pci-bridge. Reflect this fact during validation. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src

[PATCH 1/3] conf: Introduce @memReserve to

2024-04-15 Thread Michal Privoznik
computed by FW and thus allow hot plug of such PCI devices. Signed-off-by: Michal Privoznik --- docs/formatdomain.rst| 6 ++ src/conf/domain_conf.c | 9 + src/conf/domain_conf.h | 3 +++ src/conf/schemas

[PATCH 0/3] Allow reserving more memory for PCI controllers

2024-04-15 Thread Michal Privoznik
This is a rebased version I've posted a while ago: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/DFQXPLJGZK72W3JOEDQAY52VDCYYIJRH/ Michal Prívozník (3): conf: Introduce @memReserve to qemu_validate: Restrict setting @memReserve only to some controllers

[PATCH] domain_interface: Fix build on FreeBSD

2024-04-15 Thread Michal Privoznik
In one of my recent commits I've chopped just too much and moved a variable declaration into a function not realizing it's still used on FreeBSD. Bring it back but only for the FreeBSD case. Fixes: f8b5bd855f8312457fd9ad8a68fb044982bd3cc6 Signed-off-by: Michal Privoznik --- Pushed as build

[PATCH] vbox: Drop needless g_new0(..., 0) in vbox_snapshot_conf.c

2024-04-12 Thread Michal Privoznik
, but all of them later use VIR_EXPAND_N() to allocate more memory (if needed). But VIR_EXPAND_N() accepts a variable set to NULL happily. Therefore, just drop those three calls to g_new0(..., 0) and let VIR_EXPAND_N() allocate memory. Signed-off-by: Michal Privoznik --- src/vbox

[PATCH] vsh: Drop fwd declaration of a nonexistent function

2024-04-12 Thread Michal Privoznik
The vshFindTypedParamByName() function no longer exists (as of v1.0.2-rc1~82), but its header file declaration was still kept around. Drop it. Signed-off-by: Michal Privoznik --- tools/vsh.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/vsh.h b/tools/vsh.h index f06d65407d

[PATCH 5/5] domain_interface: Introduce and use virDomainInterfaceClearQoS()

2024-04-12 Thread Michal Privoznik
://issues.redhat.com/browse/RHEL-30373 Signed-off-by: Michal Privoznik --- src/hypervisor/domain_interface.c | 36 ++- src/hypervisor/domain_interface.h | 2 ++ src/libvirt_private.syms | 1 + src/lxc/lxc_driver.c | 5 + src/qemu/qemu_hotplug.c

[PATCH 4/5] conf: Move virDomainClearNetBandwidth() to src/hypervisor/

2024-04-12 Thread Michal Privoznik
). Secondly, in near future it'll call another function from src/hypervisor/ and that's not really allowed from src/conf/. Signed-off-by: Michal Privoznik --- src/conf/netdev_bandwidth_conf.c | 14 -- src/conf/netdev_bandwidth_conf.h | 3 --- src/hypervisor/domain_interface.c | 16

[PATCH 2/5] hypervisor: Introduce and use virDomainInterfaceVportRemove()

2024-04-12 Thread Michal Privoznik
Both LXC and QEMU drivers have the same code to remove vport when removing a domain's interface. Instead of repeating the same pattern in both drivers, move the code into hypervisor agnostic location (src/hypervisor/) and switch to calling this new function. Signed-off-by: Michal Privoznik

[PATCH 3/5] virnetdevopenvswitch: Drop @brname arg from virNetDevOpenvswitchRemovePort()

2024-04-12 Thread Michal Privoznik
The @brname argument of virNetDevOpenvswitchRemovePort() is and was unused ever since its introduction in v0.9.11-rc1~257. Just remove it. Signed-off-by: Michal Privoznik --- src/hypervisor/domain_interface.c | 4 +--- src/util/virnetdevopenvswitch.c | 2 +- src/util/virnetdevopenvswitch.h

[PATCH 1/5] virnetdevopenvswitch: Fix comment to virNetDevOpenvswitchInterfaceGetMaster()

2024-04-12 Thread Michal Privoznik
The comment to virNetDevOpenvswitchInterfaceGetMaster() contains wrong function name. Fix this. Signed-off-by: Michal Privoznik --- src/util/virnetdevopenvswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevopenvswitch.c b/src/util

[PATCH 0/5] Clear QoS for OVS more frequently

2024-04-12 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): virnetdevopenvswitch: Fix comment to virNetDevOpenvswitchInterfaceGetMaster() hypervisor: Introduce and use virDomainInterfaceVportRemove() virnetdevopenvswitch: Drop @brname arg from virNetDevOpenvswitchRemovePort() conf: Move

[PATCH] qemusecuritytest: Call real virFileExists in mock

2024-04-09 Thread Michal Privoznik
-by: Michal Privoznik --- Green pipeline: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/1245457856 Okay, it doesn't test FreeBSD, but it tests x86_64-ubuntu-2204-clang which was also experiencing the failure: https://gitlab.com/libvirt/libvirt/-/jobs/6574951734 tests/qemusecuritymock.c

[PATCH] rpcgen: tests: Include stdint.h in test_demo.c

2024-04-08 Thread Michal Privoznik
://gitlab.com/libvirt/libvirt/-/issues/619 Signed-off-by: Michal Privoznik --- scripts/rpcgen/tests/test_demo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/rpcgen/tests/test_demo.c b/scripts/rpcgen/tests/test_demo.c index ae19a674cf..e6ba7ddbc5 100644 --- a/scripts/rpcgen/tests

[PATCH 1/2] tests: mock: Accept spaces in build path

2024-04-05 Thread Michal Privoznik
colon or a semicolon are valid separators [1]). This can be seen in action by running say: LD_DEBUG=libs ./virpcitest 1: https://man7.org/linux/man-pages/man8/ld.so.8.html Signed-off-by: Michal Privoznik --- tests/securityselinuxlabeltest.c | 2 +- tests/securityselinuxtest.c | 2 +

[PATCH 2/2] tests: Allow spaces in path to virt-aa-helper

2024-04-05 Thread Michal Privoznik
The virt-aa-helper bash script constructs a path to itself when it runs. But it isn't prepared for the case when there is a space in the path leading to the script (something, something, double quotes, something). Signed-off-by: Michal Privoznik --- tests/virt-aa-helper-test | 4 ++-- 1 file

  1   2   3   >