Re: [PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread Yong Huang
On Thu, Mar 28, 2024 at 6:23 PM wrote: > From: Marc-André Lureau > > ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized > [-Werror=maybe-uninitialized] > ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized > [-Werror=maybe-uninitialized] >

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

2024-03-28 Thread Zhijian Li (Fujitsu)
On 28/03/2024 23:01, Peter Xu wrote: > On Thu, Mar 28, 2024 at 11:18:04AM -0300, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >>> The whole RDMA subsystem was deprecated in commit e9a54265f5 >>> ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") >>> released in v8.2.

Re: [PATCH 11/19] migration/block: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 02:20:44PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ../migration/block.c:966:16: error: ‘ret’ may be used uninitialized > [-Werror=maybe-uninitialized] > > Given that "cluster_size" must be <= BLK_MIG_BLOCK_SIZE, the previous > loop is

Re: [PATCH 15/19] migration: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 02:20:48PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized > [-Werror=maybe-uninitialized] > > When 'block' != NULL, 'dirty' is initialized. > > Signed-off-by: Marc-André

Re: [PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 02:20:45PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized > [-Werror=maybe-uninitialized] > ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized >

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

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 04:22:27PM +0100, Thomas Huth wrote: > Since e9a54265f5 was not very clear about rdma migration code, should we > maybe rather add a separate deprecation note for the migration part, and add > a proper warning message to the migration code in case someone tries to use > it

Re: [PATCH-for-9.1 v2 3/3] block/gluster: Remove RDMA protocol handling

2024-03-28 Thread Thomas Huth
On 28/03/2024 14.02, Philippe Mathieu-Daudé wrote: GlusterFS+RDMA has been deprecated 8 years ago in commit 0552ff2465 ("block/gluster: deprecate rdma support"): gluster volfile server fetch happens through unix and/or tcp, it doesn't support volfile fetch over rdma. The rdma code may

Re: [PATCH-for-9.1 v2 1/3] hw/rdma: Remove pvrdma device and rdmacm-mux helper

2024-03-28 Thread Thomas Huth
On 28/03/2024 14.02, Philippe Mathieu-Daudé wrote: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Remove: - PVRDMA device - generated vmw_pvrdma/ directory from linux-headers - rdmacm-mux tool

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 10:06:01AM -0500, Eric Blake wrote: > Adjusting cc list to add upstream NBD and drop developers unrelated to > this part of the qemu series... > > On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth

[RFC v2 4/5] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-03-28 Thread Jonah Palmer
Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost devices. The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these devices ensures that the backend is capable of offering and providing support for this feature, and that it can be disabled if the backend does

[RFC v2 1/5] virtio: Initialize sequence variables

2024-03-28 Thread Jonah Palmer
Initialize sequence variables for VirtQueue and VirtQueueElement structures. A VirtQueue's sequence variables are initialized when a VirtQueue is being created or reset. A VirtQueueElement's sequence variable is initialized when a VirtQueueElement is being initialized. These variables will be used

[RFC v2 5/5] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-03-28 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1 file

[RFC v2 0/5] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-03-28 Thread Jonah Palmer
The goal of these patches is to add support to a variety of virtio and vhost devices for the VIRTIO_F_IN_ORDER transport feature. This feature indicates that all buffers are used by the device in the same order in which they were made available by the driver. These patches attempt to implement a

[RFC v2 2/5] virtio: In-order support for split VQs

2024-03-28 Thread Jonah Palmer
Implements VIRTIO_F_IN_ORDER feature support for virtio devices using the split virtqueue layout. For a virtio device that has negotiated the VIRTIO_F_IN_ORDER feature whose virtqueues use a split virtqueue layout, it's essential that used VirtQueueElements are written to the used ring in-order.

[RFC v2 3/5] virtio: In-order support for packed VQs

2024-03-28 Thread Jonah Palmer
Implements VIRTIO_F_IN_ORDER feature support for virtio devices using the packed virtqueue layout. For a virtio device that has negotiated the VIRTIO_F_IN_ORDER feature whose virtqueues use a packed virtqueue layout, it's essential that used VirtQueueElements are written to the descriptor ring

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
On 28/03/2024 15.59, Daniel P. Berrangé wrote: On Thu, Mar 28, 2024 at 09:54:49AM -0500, Eric Blake wrote: On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able

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

2024-03-28 Thread Thomas Huth
On 28/03/2024 16.01, Peter Xu wrote: On Thu, Mar 28, 2024 at 11:18:04AM -0300, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Remove: - RDMA

Re: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2024-03-28 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 03:38:15PM +0100, Philippe Mathieu-Daudé wrote: > Previous commits re-organized the target-specific bits > from Xen files. We can now build the common files once > instead of per-target. > > Only 4 files call libxen API (thus its CPPFLAGS): > - xen-hvm-common.c, > -

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
Adjusting cc list to add upstream NBD and drop developers unrelated to this part of the qemu series... On Thu, Mar 28, 2024 at 02:13:42PM +, Richard W.M. Jones wrote: > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > Since version 2.66, glib has useful URI parsing functions,

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

2024-03-28 Thread Peter Xu
On Thu, Mar 28, 2024 at 11:18:04AM -0300, Fabiano Rosas wrote: > Philippe Mathieu-Daudé writes: > > > The whole RDMA subsystem was deprecated in commit e9a54265f5 > > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > > released in v8.2. > > > > Remove: > > - RDMA handling from

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Daniel P . Berrangé
On Thu, Mar 28, 2024 at 09:54:49AM -0500, Eric Blake wrote: > On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > > Since version 2.66, glib has useful URI parsing functions, too. > > Use those instead of the QEMU-internal ones to be finally able > > to get rid of the latter. The

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. The g_uri_get_host() also takes care > of removing the square brackets from

Re: [PATCH 00/19] -Werror=maybe-uninitialized fixes

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 02:20:33PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Depending on -Doptimization=, GCC (13.2.1 here) produces different > maybe-uninitialized warnings: > - g: produces -Werror=maybe-uninitialized errors > - 0: clean build > - 1:

Re: [PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Eric Blake
On Thu, Mar 28, 2024 at 02:20:37PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > ../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized > [-Werror=maybe-uninitialized] > > Signed-off-by: Marc-André Lureau > --- > nbd/client-connection.c | 2 +-

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

2024-03-28 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > The whole RDMA subsystem was deprecated in commit e9a54265f5 > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > released in v8.2. > > Remove: > - RDMA handling from migration > - dependencies on libibumad, libibverbs and librdmacm > > Keep the

Re: [PATCH for-9.1 8/9] block/ssh: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 03:06:05PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. > > Signed-off-by: Thomas Huth > --- > block/ssh.c | 69

Re: [PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Richard W.M. Jones
On Thu, Mar 28, 2024 at 03:06:03PM +0100, Thomas Huth wrote: > Since version 2.66, glib has useful URI parsing functions, too. > Use those instead of the QEMU-internal ones to be finally able > to get rid of the latter. The g_uri_get_host() also takes care > of removing the square brackets from

[PATCH for-9.1 8/9] block/ssh: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Signed-off-by: Thomas Huth --- block/ssh.c | 69 +++-- 1 file changed, 40 insertions(+), 29

[PATCH for-9.1 7/9] block/nfs: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Signed-off-by: Thomas Huth --- block/nfs.c | 102 ++-- 1 file changed, 52 insertions(+), 50

[PATCH for-9.1 1/9] tests: Remove Ubuntu 20.04 container

2024-03-28 Thread Thomas Huth
Since Ubuntu 22.04 is now available since two years, we can stop actively supporting the previous LTS version of Ubuntu now. Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/ubuntu2004.docker | 157 - tests/lcitool/refresh | 1 - 2 files

[PATCH for-9.1 6/9] block/nbd: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. The g_uri_get_host() also takes care of removing the square brackets from IPv6 addresses, so we can drop that part of the QEMU code now, too.

[PATCH for-9.1 3/9] tests: Update our CI to use CentOS Stream 9 instead of 8

2024-03-28 Thread Thomas Huth
RHEL 9 (and thus also the derivatives) are available since two years now, so according to QEMU's support policy, we can drop the active support for the previous major version 8 now. Thus upgrade our CentOS Stream container to major version 9 now. Signed-off-by: Thomas Huth ---

[PATCH for-9.1 5/9] block/gluster: Use URI parsing code from glib

2024-03-28 Thread Thomas Huth
Since version 2.66, glib has useful URI parsing functions, too. Use those instead of the QEMU-internal ones to be finally able to get rid of the latter. Cc: integrat...@gluster.org Signed-off-by: Thomas Huth --- block/gluster.c | 63 + 1 file

[PATCH for-9.1 2/9] tests/lcitool/libvirt-ci: Update to the latest master branch

2024-03-28 Thread Thomas Huth
We need the latest fixes for the lcitool to be able to properly update our CentOS docker file to CentOS Stream 9. Signed-off-by: Thomas Huth --- tests/lcitool/libvirt-ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index

[PATCH for-9.1 4/9] Bump minimum glib version to v2.66

2024-03-28 Thread Thomas Huth
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.org, available versions are: CentOS Stream 9: 2.66.7 Debian 11: 2.66.8 Fedora 38: 2.74.1 Freebsd:

[PATCH for-9.1 0/9] Switch to glib URI parsing code

2024-03-28 Thread Thomas Huth
In the QEMU 9.1 development cycle, we can drop the support for Ubuntu 20.04 and CentOS 8 since the following major versions of these distributions are available since 2 years already. This allows us to bump the minimum version of glib to 2.66 which comes with a nice set of URI parsing functions.

[PATCH for-9.1 9/9] util/uri: Remove the old URI parsing code

2024-03-28 Thread Thomas Huth
Now that we switched all consumers of the URI code to use the URI parsing functions from glib instead, we can remove our internal URI parsing code since it is not used anymore. Signed-off-by: Thomas Huth --- include/qemu/uri.h | 99 --- util/uri.c | 1466

Re: [PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Pierrick Bouvier
On 3/28/24 14:20, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../plugins/loader.c:405:15: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH-for-9.1 v2 3/3] block/gluster: Remove RDMA protocol handling

2024-03-28 Thread Philippe Mathieu-Daudé
GlusterFS+RDMA has been deprecated 8 years ago in commit 0552ff2465 ("block/gluster: deprecate rdma support"): gluster volfile server fetch happens through unix and/or tcp, it doesn't support volfile fetch over rdma. The rdma code may actually mislead, so to make sure things do not break,

[PATCH-for-9.1 v2 0/3] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Philippe Mathieu-Daudé
Since v1: - split in 3 (Thomas) - justify gluster removal Philippe Mathieu-Daudé (3): hw/rdma: Remove pvrdma device and rdmacm-mux helper migration: Remove RDMA protocol handling block/gluster: Remove RDMA protocol handling MAINTAINERS | 17 -

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Daniel P . Berrangé
On Thu, Mar 28, 2024 at 01:57:27PM +0100, Philippe Mathieu-Daudé wrote: > On 28/3/24 10:06, Daniel P. Berrangé wrote: > > On Wed, Mar 27, 2024 at 11:55:48AM +0100, Philippe Mathieu-Daudé wrote: > > > The whole RDMA subsystem was deprecated in commit e9a54265f5 > > > ("hw/rdma: Deprecate the pvrdma

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 10:06, Daniel P. Berrangé wrote: On Wed, Mar 27, 2024 at 11:55:48AM +0100, Philippe Mathieu-Daudé wrote: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Time to remove it. Keep the

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Eric Blake
On Mon, Mar 25, 2024 at 05:18:50PM +0800, zhuyangyang via wrote: > If g_main_loop_run()/aio_poll() is called in the coroutine context, > the pending coroutine may be woken up repeatedly, and the co_queue_wakeup > may be disordered. > > When the poll() syscall exited in

Re: [PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread Philippe Mathieu-Daudé
On 28/3/24 11:20, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-André Lureau --- hw/sd/sdhci.c | 2 +- 1 file

Re: [PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-03-28 Thread Philippe Mathieu-Daudé
On 27/3/24 20:27, Kevin Wolf wrote: Coverity complains that the check introduced in commit 3f934817 suggests that qiov could be NULL and we dereference it before reaching the check. In fact, all of the callers pass a non-NULL pointer, so just remove the misleading check. Resolves: Coverity CID

Re: [RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:24, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We are going to add more parameters to change. We want to make possible to change only one or any subset of available options. So all the options should be optional. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Look at block-job-change command: we have to specify both 'id' to chose the job to operate on and 'type' for QAPI union be parsed. But for user this looks redundant: when we specify 'id', QEMU should be able to

Re: [PATCH] block: Remove unnecessary NULL check in bdrv_pad_request()

2024-03-28 Thread Fiona Ebner
Am 27.03.24 um 20:27 schrieb Kevin Wolf: > Coverity complains that the check introduced in commit 3f934817 suggests > that qiov could be NULL and we dereference it before reaching the check. > In fact, all of the callers pass a non-NULL pointer, so just remove the > misleading check. > >

[PATCH 18/19] hw/virtio: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/virtio/vhost-shadow-virtqueue.c:545:13: error: ‘r’ may be used uninitialized [-Werror=maybe-uninitialized] '' is not guaranteed to be assigned when calling -Werror=maybe-uninitialized. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 2

[PATCH 19/19] RFC: hw/virtio: a potential leak fix

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau vhost_svq_get_buf() may return a VirtQueueElement that should be freed. It's unclear to me if the vhost_svq_get_buf() call should always return NULL. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-shadow-virtqueue.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 17/19] hw/nvme: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/nvme/ctrl.c:6081:21: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized] It's not obvious that 'result' is set in all code paths. When is a returned argument, it's even less clear. Looking at various assignments, 0 seems to be a suitable

[PATCH 16/19] tests: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../tests/unit/test-block-iothread.c:773:17: error: ‘job’ may be used uninitialized [-Werror=maybe-uninitialized] /usr/include/glib-2.0/glib/gtestutils.h:73:53: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau ---

[PATCH 13/19] hw/virtio-blk: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/block/virtio-blk.c:1212:12: error: ‘rq’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c

[PATCH 15/19] migration: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/ram.c:1873:23: error: ‘dirty’ may be used uninitialized [-Werror=maybe-uninitialized] When 'block' != NULL, 'dirty' is initialized. Signed-off-by: Marc-André Lureau --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 14/19] plugins: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../plugins/loader.c:405:15: error: ‘ctx’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index

[PATCH 12/19] migration: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/dirtyrate.c:186:5: error: ‘records’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/dirtyrate.c:168:12: error: ‘gen_id’ may be used uninitialized [-Werror=maybe-uninitialized] ../migration/migration.c:2273:5: error: ‘file’ may be used

[PATCH 11/19] migration/block: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../migration/block.c:966:16: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Given that "cluster_size" must be <= BLK_MIG_BLOCK_SIZE, the previous loop is entered at least once, so 'ret' is assigned a value in all conditions. Signed-off-by:

[PATCH 10/19] hw/rdma: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/rdma/rdma_backend.c:129:8: error: ‘ne’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/rdma/rdma_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.c

[PATCH 06/19] block/stream: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../block/stream.c:193:19: error: ‘unfiltered_bs’ may be used uninitialized [-Werror=maybe-uninitialized] ../block/stream.c:176:5: error: ‘len’ may be used uninitialized [-Werror=maybe-uninitialized] trace/trace-block.h:906:9: error: ‘ret’ may be used uninitialized

[PATCH 08/19] hw/vhost-scsi: fix -Werror=maybe-uninitialized

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/scsi/vhost-scsi.c:173:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] It can be reached when num_queues=0. It probably doesn't make much sense to instantiate a vhost-scsi with 0 IO queues though. For now, make vhost_scsi_set_workers()

[PATCH 09/19] hw/sdhci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/sd/sdhci.c:846:16: error: ‘res’ may be used uninitialized [-Werror=maybe-uninitialized] False-positive, because "length" is non-null. Signed-off-by: Marc-André Lureau --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 04/19] nbd: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../nbd/client-connection.c:419:8: error: ‘wait_co’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- nbd/client-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd/client-connection.c

[PATCH 07/19] hw/ahci: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/ide/ahci.c:989:58: error: ‘tbl_entry_size’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/ide/ahci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index

[PATCH 05/19] block/mirror: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../block/mirror.c:1066:22: error: ‘iostatus’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index

[PATCH 00/19] -Werror=maybe-uninitialized fixes

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau Hi, Depending on -Doptimization=, GCC (13.2.1 here) produces different maybe-uninitialized warnings: - g: produces -Werror=maybe-uninitialized errors - 0: clean build - 1: produces -Werror=maybe-uninitialized errors - 2: clean build - 3: produces few

[PATCH 03/19] hw/qxl: fix -Werror=maybe-uninitialized false-positives

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../hw/display/qxl.c:1352:5: error: ‘pci_region’ may be used uninitialized [-Werror=maybe-uninitialized] ../hw/display/qxl.c:1365:22: error: ‘pci_start’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- hw/display/qxl.c | 4

[PATCH 02/19] util/timer: with -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../util/qemu-timer.c:198:24: error: ‘expire_time’ may be used uninitialized [-Werror=maybe-uninitialized] ../util/qemu-timer.c:476:8: error: ‘rearm’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- util/qemu-timer.c | 6

[PATCH 01/19] util/coroutine: fix -Werror=maybe-uninitialized false-positive

2024-03-28 Thread marcandre . lureau
From: Marc-André Lureau ../util/qemu-coroutine.c:150:8: error: ‘batch’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau --- util/qemu-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-coroutine.c

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Vladimir Sementsov-Ogievskiy
On 28.03.24 12:40, Markus Armbruster wrote: Subject: all unions are type-based. Perhaps "support implicit union tags on the wire"? Yes, sounds good. Do you need this schema language feature for folding block jobs into the jobs abstraction, or is it just for making the wire protocol nicer

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2024 at 07:43:06AM +0100, Thomas Huth wrote: > On 27/03/2024 11.55, Philippe Mathieu-Daudé wrote: > > The whole RDMA subsystem was deprecated in commit e9a54265f5 > > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > > released in v8.2. Time to remove it. > > > >

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Markus Armbruster
Subject: all unions are type-based. Perhaps "support implicit union tags on the wire"? Do you need this schema language feature for folding block jobs into the jobs abstraction, or is it just for making the wire protocol nicer in places?

Re: [RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > We are going to add more parameters to change. We want to make possible > to change only one or any subset of available options. So all the > options should be optional. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 5

[PATCH v4] blockcommit: Reopen base image as RO after abort

2024-03-28 Thread Alexander Ivanov
If a blockcommit is aborted the base image remains in RW mode, that leads to a fail of subsequent live migration. How to reproduce: $ virsh snapshot-create-as vm snp1 --disk-only *** write something to the disk inside the guest *** $ virsh blockcommit vm vda --active --shallow && virsh

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Look at block-job-change command: we have to specify both 'id' to chose > the job to operate on and 'type' for QAPI union be parsed. But for user > this looks redundant: when we specify 'id', QEMU should be able to get > corresponding job's type. > > This

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Daniel P . Berrangé
On Wed, Mar 27, 2024 at 11:55:48AM +0100, Philippe Mathieu-Daudé wrote: > The whole RDMA subsystem was deprecated in commit e9a54265f5 > ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") > released in v8.2. Time to remove it. > > Keep the RAM_SAVE_FLAG_HOOK definition since it might

Re: [PATCH v1] coroutine: avoid inserting duplicate coroutine to co_queue_wakeup

2024-03-28 Thread Kevin Wolf
Am 27.03.2024 um 23:13 hat Eric Blake geschrieben: > On Mon, Mar 25, 2024 at 11:50:41AM -0400, Stefan Hajnoczi wrote: > > On Mon, Mar 25, 2024 at 05:18:50PM +0800, zhuyangyang wrote: > > > If g_main_loop_run()/aio_poll() is called in the coroutine context, > > > the pending coroutine may be woken

Re: [PATCH-for-9.1] rdma: Remove RDMA subsystem and pvrdma device

2024-03-28 Thread Thomas Huth
On 27/03/2024 11.55, Philippe Mathieu-Daudé wrote: The whole RDMA subsystem was deprecated in commit e9a54265f5 ("hw/rdma: Deprecate the pvrdma device and the rdma subsystem") released in v8.2. Time to remove it. Keep the RAM_SAVE_FLAG_HOOK definition since it might appears in old migration