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

2024-06-05 Thread Ján Tomko
On a Wednesday in 2024, Michal Privoznik wrote: 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

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

2024-06-05 Thread Peter Xu
On Wed, Jun 05, 2024 at 08:48:28PM +, Dr. David Alan Gilbert wrote: > > > I just noticed this thread; some random notes from a somewhat > > > fragmented memory of this: > > > > > > a) Long long ago, I also tried rsocket; > > > https://lists.gnu.org/archive/html/qemu-devel/2015-01/msg0

[PATCH v2 4/4] Update documentation to reflect memory_backing_dir change in qemu.conf

2024-06-05 Thread Michael Galaxy via Devel
From: Michael Galaxy Update the documentation and changelog accordingly to reflect that the syntax of the memory_backing_dir setting has changed. Signed-off-by: Michael Galaxy --- NEWS.rst| 7 +++ docs/kbase/virtiofs.rst | 2 ++ src/qemu/qemu.conf.in | 2 ++ 3 files chang

[PATCH v2 3/4] Update unit test to support multiple memory backends

2024-06-05 Thread Michael Galaxy via Devel
From: Michael Galaxy Update the associated test case. Signed-off-by: Michael Galaxy --- tests/testutilsqemu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index d70850cb5d..dd8db4835e 100644 --- a/tests/testutilsqemu.c +

[PATCH v2 2/4] Support live migration between file-backed memory and anonymous memory.

2024-06-05 Thread Michael Galaxy via Devel
From: Michael Galaxy In our environment, we need to convert VMs into a live-update-comptabile configuration "on-the-fly" (via live migration). More specifically: We need to convert between anonymous memory-backed VMs and file-backed memory VMs. So, for this very specific case, this needs to work

[PATCH v2 1/4] qemu.conf changes to support multiple memory backend

2024-06-05 Thread Michael Galaxy via Devel
From: Michael Galaxy We start by introducing a backwards-compatible, comma-separated specification that will not break existing installations, such as in the following example: $ cat qemu.conf | grep memory_backing_dir memory_backing_dir = ["/path/to/pmem/0", "/path/to/pmem/1"] (The old syntax

[PATCH v2 0/4] multiple memory backend support for CPR Live Updates

2024-06-05 Thread Michael Galaxy via Devel
From: Michael Galaxy CPR-based support for whole-hypervisor kexec-based live updates is now finally merged into QEMU. In support of this, we need NUMA to be supported in these kinds of environments. To do this we use a technology called PMEM (persistent memory) in Linux, which underpins the abili

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

2024-06-05 Thread Peter Xu
On Wed, Jun 05, 2024 at 10:10:57AM -0400, Peter Xu wrote: > > e) Someone made a good suggestion (sorry can't remember who) - that the > > RDMA migration structure was the wrong way around - it should be the > > destination which initiates an RDMA read, rather than the source > > do

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

2024-06-05 Thread Peter Xu
Hey, Dave! On Wed, Jun 05, 2024 at 12:31:56AM +, Dr. David Alan Gilbert wrote: > * Michael Galaxy (mgal...@akamai.com) wrote: > > One thing to keep in mind here (despite me not having any hardware to test) > > was that one of the original goals here > > in the RDMA implementation was not simpl

[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
While __attribute((sentinel)) (exposed by glib under G_GNUC_NULL_TERMINATED macro) is a gcc extension, it's supported by clang too. It's already being used throughout our code but some functions that take variadic arguments and expect NULL at the end were lacking such annotation. Fill them in. Aft

[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/qemumonitortestutil

Re: [PATCH] rpm: ensure -Werror is disabled for mingw builds

2024-06-05 Thread Pavel Hrdina
On Wed, Jun 05, 2024 at 01:47:15PM +0100, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > libvirt.spec.in | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libvirt.spec.in b/libvirt.spec.in > index 0f3c882f05..1d3240ee6f 100644 > --- a/libvirt.sp

[PATCH] rpm: ensure -Werror is disabled for mingw builds

2024-06-05 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- libvirt.spec.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 0f3c882f05..1d3240ee6f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1485,8 +1485,9 @@ export SOURCE_DATE_EPOCH=$(stat --

Re: [PATCH v2 4/4] qemu: Reject TPM 1.2 in most scenarios

2024-06-05 Thread Peter Krempa
On Tue, Jun 04, 2024 at 19:02:02 +0200, Andrea Bolognani wrote: > Everywhere we use TPM 2.0 as our default, the chances of TPM > 1.2 being supported by the guest OS are very slim. Just reject > such configurations outright. > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_validate.c

Re: [PATCH v2 3/4] qemu: Default to TPM 2.0 in most scenarios

2024-06-05 Thread Peter Krempa
On Tue, Jun 04, 2024 at 19:02:01 +0200, Andrea Bolognani wrote: > TPM 1.2 is a pretty bad default these days, especially for > architectures which were introduced when TPM 2.0 already existed. > > We're already carving out exceptions for several scenarios, but > that's basically backwards: at this

Re: [PATCH v2 1/4] tests: Add TPM coverage to default-models tests

2024-06-05 Thread Peter Krempa
On Tue, Jun 04, 2024 at 19:01:59 +0200, Andrea Bolognani wrote: > We have a non-trivial amount of architecture-specific logic > dealing with TPM, so it's good to have coverage for it. > > Note that two architectures currently don't have support for > TPM devices enabled by default in QEMU: loongar

Re: [PATCH] rpm: fix setting of VIR_TEST_DEBUG

2024-06-05 Thread Peter Krempa
On Wed, Jun 05, 2024 at 12:03:46 +0100, Daniel P. Berrangé wrote: > The %meson_test macro expands to have a newline at the start, so > rather than expanding to > > VIR_TEST_DEBUG=1 meson test > > we get > > VIR_TEST_DEBUG=1 > meson test > > which has no effect, since VIR_TEST_DE

Re: [PATCH] interface: fix udev reference leak with invalid flags

2024-06-05 Thread Peter Krempa
On Wed, Jun 05, 2024 at 12:03:36 +0100, Daniel P. Berrangé wrote: > The udevInterfaceGetXMLDesc method takes a reference on the udev > driver as its first action. If the virCheckFlags() condition > fails, however, this reference is never released. > > Signed-off-by: Daniel P. Berrangé > --- > sr

[PATCH] rpm: fix setting of VIR_TEST_DEBUG

2024-06-05 Thread Daniel P . Berrangé
The %meson_test macro expands to have a newline at the start, so rather than expanding to VIR_TEST_DEBUG=1 meson test we get VIR_TEST_DEBUG=1 meson test which has no effect, since VIR_TEST_DEBUG isn't exported. Signed-off-by: Daniel P. Berrangé --- libvirt.spec.in | 3 ++- 1

[PATCH] interface: fix udev reference leak with invalid flags

2024-06-05 Thread Daniel P . Berrangé
The udevInterfaceGetXMLDesc method takes a reference on the udev driver as its first action. If the virCheckFlags() condition fails, however, this reference is never released. Signed-off-by: Daniel P. Berrangé --- src/interface/interface_backend_udev.c | 4 +++- 1 file changed, 3 insertions(+),