Re: [RFC PATCH v2 02/78] block: add fallthrough pseudo-keyword

2023-10-17 Thread Eric Blake
On Fri, Oct 13, 2023 at 10:56:29AM +0300, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > block/block-copy.c| 1 + >

Re: [PATCH v6 3/5] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Juan Quintela
Juan Quintela wrote: > Use blocked-mirror with NBD instead. > > Signed-off-by: Juan Quintela > Acked-by: Stefan Hajnoczi > Reviewed-by: Thomas Huth > Reviewed-by: Markus Armbruster Hi Kevin and Stefan Can we change the iotest output to fix this?

Re: [PATCH 7/7] hw/usb: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Pull the 'dma' property to the core XHCI type, declare its link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci-sysbus.c | 4 hw/usb/hcd-xhci.c| 2 ++ 2 files changed, 2

Re: [PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Declare link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/cadence_gem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index

Re: [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Declare link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/xilinx_axidma.c | 6 ++ hw/dma/xlnx-zdma.c | 7 ++- hw/dma/xlnx_csu_dma.c | 13 - 3 files changed, 8

Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/virtio-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c

Re: [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM VIRTIO_DEVICE() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c

Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros

2023-10-17 Thread Mark Cave-Ayland
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/vhost-user-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c

Re: [PATCH v3 0/8] qemu-img: rebase: add compression support

2023-10-17 Thread Kevin Wolf
Am 19.09.2023 um 18:57 hat Andrey Drobyshev geschrieben: > v2 --> v3: > * Patch 3/8: fixed logic in the if statement, so that we align on blk >when blk_old_backing == NULL; > * Patch 4/8: comment fix; > * Patch 5/8: comment fix; dropped redundant "if (blk_new_backing)" >statements. > >

Re: [PATCH v3 4/8] qemu-img: add chunk size parameter to compare_buffers()

2023-10-17 Thread Kevin Wolf
Am 19.09.2023 um 18:58 hat Andrey Drobyshev geschrieben: > Add @chsize param to the function which, if non-zero, would represent > the chunk size to be used for comparison. If it's zero, then > BDRV_SECTOR_SIZE is used as default chunk size, which is the previous > behaviour. > > In particular,

Re: [PULL 00/38] Migration 20231017 patches

2023-10-17 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH v8 4/7] qapi: add x-blockdev-replace command

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
Add a command that can replace bs in following BdrvChild structures: - qdev blk root child - block-export blk root child - any child of BlockDriverState selected by child-name Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 56

[PATCH v8 2/7] block/export: add blk_by_export_id()

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
We need it for further blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/export/export.c | 18 ++ include/sysemu/block-backend-global-state.h | 1 + 2 files changed, 19 insertions(+) diff --git a/block/export/export.c

[PATCH v8 6/7] iotests.py: introduce VM.assert_edges_list() method

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
Add an alternative method to check block graph, to be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

[PATCH v8 7/7] iotests: add filter-insertion

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
Demonstrate new blockdev-replace API for filter insertion and removal. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/filter-insertion | 236 ++ tests/qemu-iotests/tests/filter-insertion.out | 5 + 2 files changed, 241 insertions(+) create mode

[PATCH v8 5/7] block: bdrv_get_xdbg_block_graph(): report export ids

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
Currently for block exports we report empty blk names. That's not good. Let's try to find corresponding block export and report its id. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 block/export/export.c | 13 + include/block/export.h

[PATCH v8 3/7] block: make bdrv_find_child() function public

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
To be reused soon for blockdev-replace functionality. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 13 + blockdev.c | 14 -- include/block/block_int-io.h | 2 ++ 3 files changed, 15 insertions(+), 14 deletions(-) diff

[PATCH v8 0/7] blockdev-replace

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
Hi all! This series presents a new command blockdev-replace, which helps to insert/remove filters anywhere in the block graph. It can: - replace qdev block-node by qdev-id - replace export block-node by export-id - replace any child of parent block-node by node-name and child name So

[PATCH v8 1/7] block-backend: blk_root(): drop const specifier on return type

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
We'll need get non-const child pointer for graph modifications in further commits. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-backend.c | 2 +- include/sysemu/block-backend-global-state.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 11/12] hw/xen: automatically assign device index to block devices

2023-10-17 Thread David Woodhouse
On Tue, 2023-10-17 at 12:21 +0200, Kevin Wolf wrote: > Am 16.10.2023 um 17:19 hat David Woodhouse geschrieben: > > From: David Woodhouse > > > > There's no need to force the user to assign a vdev. We can automatically > > assign one, starting at xvda and searching until we find the first disk >

[PATCH v6 4/5] migration: Deprecate block migration

2023-10-17 Thread Juan Quintela
It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster --- docs/about/deprecated.rst | 10 ++

[PATCH v6 2/5] migration: migrate 'inc' command option is deprecated.

2023-10-17 Thread Juan Quintela
Use blockdev-mirror with NBD instead. Reviewed-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 9 + qapi/migration.json| 8 +++- migration/migration-hmp-cmds.c | 5 +

[PATCH v6 1/5] migration: Print block status when needed

2023-10-17 Thread Juan Quintela
The new line was only printed when command options were used. When we used migration parameters and capabilities, it wasn't. Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH v6 3/5] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Juan Quintela
Use blocked-mirror with NBD instead. Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster --- docs/about/deprecated.rst | 9 + qapi/migration.json| 7 --- migration/migration-hmp-cmds.c | 5 +

[PATCH v6 5/5] migration: Deprecate old compression method

2023-10-17 Thread Juan Quintela
Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Acked-by: Peter Xu Reviewed-by: Markus Armbruster --- docs/about/deprecated.rst | 8 + qapi/migration.json | 63 ++- migration/options.c | 13 3 files changed, 64

[PATCH v6 0/5] Migration deprecated parts

2023-10-17 Thread Juan Quintela
Based on: Message-ID: <20231017083003.15951-1-quint...@redhat.com> Migration 20231017 patches On this v6: - Fixed Markus comments - 1st patch is reviewed - dropped the RFC ones. Later, Juan. On this v5: - Rebased on top of last migration pull requesnt: - address markus co

Re: [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion

2023-10-17 Thread Manos Pitsidianakis
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé wrote: The get_memory_region() handler is used when (un)plugging the device, which can only occur *after* it is realized. virtio_pmem_realize() ensure the instance can not be realized without 'memdev'. Remove the superfluous check, replacing it

Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-17 Thread Manos Pitsidianakis
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/virtio-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c

Re: [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro

2023-10-17 Thread Manos Pitsidianakis
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM VIRTIO_DEVICE() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c

Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros

2023-10-17 Thread Manos Pitsidianakis
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé wrote: Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/vhost-user-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c

Re: [PATCH v5 5/7] migration: Deprecate old compression method

2023-10-17 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Signed-off-by: Juan Quintela >> Acked-by: Stefan Hajnoczi >> Acked-by: Peter Xu >> # @deprecated: Member @disk is deprecated because block migration is. >> +# Member @compression is deprecated because it is unreliable and >> +#

Re: [PATCH v5 1/7] migration: Print block status when needed

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > The new line was only printed when command options were used. When we > used migration parameters and capabilities, it wasn't. > > Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
On 17.10.23 18:00, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Send a new event when guest reads virtio-pci config after virtio_notify_config() call. That's useful to check that guest fetched modified config, for example after resizing disk backend. Signed-off-by: Vladimir

Re: [PATCH v5 4/7] migration: Deprecate block migration

2023-10-17 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> # >> +# @deprecated: Member @block-incremental is deprecated. Use > > Two spaces between sentences for consistency, please. Done. At least here I did the copy and paste right. >> diff --git a/migration/block.c b/migration/block.c >> index

Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Use blocked-mirror with NBD instead. >> >> Signed-off-by: Juan Quintela >> Acked-by: Stefan Hajnoczi >> Reviewed-by: Thomas Huth >> >> --- >> >> Improve documentation and style (markus) >> --- >> docs/about/deprecated.rst | 10

Re: [PATCH 2/4] qapi: introduce device-sync-config

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
On 17.10.23 17:57, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to the guest or just not available (not supported by

Re: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.

2023-10-17 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Use blockdev-mirror with NBD instead. >> >> Reviewed-by: Thomas Huth >> Acked-by: Stefan Hajnoczi >> Signed-off-by: Juan Quintela >> >> --- >> >> Improve documentation and style (thanks Markus) >> --- >> docs/about/deprecated.rst | 8

Re: [PATCH 4/4] qapi: introduce CONFIG_READ event

2023-10-17 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Send a new event when guest reads virtio-pci config after > virtio_notify_config() call. > > That's useful to check that guest fetched modified config, for example > after resizing disk backend. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [PATCH 2/4] qapi: introduce device-sync-config

2023-10-17 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Signed-off-by:

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: > Am 17.10.23 um 14:12 schrieb Kevin Wolf: > > Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: > >> I ran into similar issues now with mirror, (both deadlocks and stuck > >> guest IO at other times), and interestingly, also during job start.

Re: [PATCH 0/7] hw: Few more QOM/QDev cleanups

2023-10-17 Thread Michael S. Tsirkin
On Tue, Oct 17, 2023 at 04:01:43PM +0200, Philippe Mathieu-Daudé wrote: > - Remove a pointless check, > - Use QOM cast macros, > - Declare QDev links statically using DEFINE_PROP_LINK() virtio things Reviewed-by: Michael S. Tsirkin > Philippe Mathieu-Daudé (7): > hw/virtio/virtio-pmem:

[PATCH 7/7] hw/usb: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Philippe Mathieu-Daudé
Pull the 'dma' property to the core XHCI type, declare its link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci-sysbus.c | 4 hw/usb/hcd-xhci.c| 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Philippe Mathieu-Daudé
Declare link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/cadence_gem.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index f445d8bb5e..37e209cda6 100644 --- a/hw/net/cadence_gem.c

Re: [PATCH v5 5/7] migration: Deprecate old compression method

2023-10-17 Thread Markus Armbruster
Juan Quintela writes: > Signed-off-by: Juan Quintela > Acked-by: Stefan Hajnoczi > Acked-by: Peter Xu > --- > docs/about/deprecated.rst | 8 > qapi/migration.json | 79 +-- > migration/options.c | 13 +++ > 3 files changed, 72

[PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro

2023-10-17 Thread Philippe Mathieu-Daudé
Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/virtio-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 45b95ea070..fa53f0902c 100644 ---

[PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion

2023-10-17 Thread Philippe Mathieu-Daudé
The get_memory_region() handler is used when (un)plugging the device, which can only occur *after* it is realized. virtio_pmem_realize() ensure the instance can not be realized without 'memdev'. Remove the superfluous check, replacing it by an assertion. Signed-off-by: Philippe Mathieu-Daudé

[PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro

2023-10-17 Thread Philippe Mathieu-Daudé
Declare link statically using DEFINE_PROP_LINK(). Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/xilinx_axidma.c | 6 ++ hw/dma/xlnx-zdma.c | 7 ++- hw/dma/xlnx_csu_dma.c | 13 - 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/hw/dma/xilinx_axidma.c

[PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro

2023-10-17 Thread Philippe Mathieu-Daudé
Access QOM parent with the proper QOM VIRTIO_DEVICE() macro. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 93857ad523..51cb517999 100644 ---

[PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros

2023-10-17 Thread Philippe Mathieu-Daudé
Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/vhost-user-blk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index eecf3f7a81..4b37e26120 100644

[PATCH 0/7] hw: Few more QOM/QDev cleanups

2023-10-17 Thread Philippe Mathieu-Daudé
- Remove a pointless check, - Use QOM cast macros, - Declare QDev links statically using DEFINE_PROP_LINK() Philippe Mathieu-Daudé (7): hw/virtio/virtio-pmem: Replace impossible check by assertion hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros hw/display/virtio-gpu: Use

Re: [PATCH v5 4/7] migration: Deprecate block migration

2023-10-17 Thread Markus Armbruster
Juan Quintela writes: > It is obsolete. It is better to use driver-mirror with NBD instead. > > CC: Kevin Wolf > CC: Eric Blake > CC: Stefan Hajnoczi > CC: Hanna Czenczek > > Signed-off-by: Juan Quintela > Acked-by: Stefan Hajnoczi > --- > docs/about/deprecated.rst | 10 ++ >

Re: [PATCH v5 3/7] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Markus Armbruster
Juan Quintela writes: > Use blocked-mirror with NBD instead. > > Signed-off-by: Juan Quintela > Acked-by: Stefan Hajnoczi > Reviewed-by: Thomas Huth > > --- > > Improve documentation and style (markus) > --- > docs/about/deprecated.rst | 10 ++ > qapi/migration.json|

Re: [PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.

2023-10-17 Thread Markus Armbruster
Juan Quintela writes: > Use blockdev-mirror with NBD instead. > > Reviewed-by: Thomas Huth > Acked-by: Stefan Hajnoczi > Signed-off-by: Juan Quintela > > --- > > Improve documentation and style (thanks Markus) > --- > docs/about/deprecated.rst | 8 > qapi/migration.json

Re: [PULL 1/1] virtio-blk: don't start dataplane during the stop of dataplane

2023-10-17 Thread Stefan Hajnoczi
On Tue, Oct 17, 2023 at 12:02:26PM +0200, Kevin Wolf wrote: > Am 17.10.2023 um 11:01 hat Fiona Ebner geschrieben: > > Am 16.10.23 um 21:40 schrieb Stefan Hajnoczi: > > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > > > index 39e7f23fab..c2d59389cb 100644 > > > ---

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Fiona Ebner
Am 17.10.23 um 14:12 schrieb Kevin Wolf: > Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: >> I ran into similar issues now with mirror, (both deadlocks and stuck >> guest IO at other times), and interestingly, also during job start. >> >> Also had a backtrace similar to [0] once, so I took a

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Juan Quintela
skipped offset contains zeros and the migration >> * stream starts at the right place. >> */ >> p = addr; >> while (p < (uintprt_t)addr + FILE_TEST_OFFSET) { >> g_assert(*p == 0); >> p++; >> } >> g_assert_cmpint(cpu_to

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: >> Juan Quintela writes: >> >>> Fabiano Rosas wrote: >>> D> Juan Quintela writes: > From: Fabiano Rosas > > Add basic tests for file-based migration. > > Note that we cannot use test_precopy_common because that routine

Re: [PATCH 2/2] virtio: Drop out of coroutine context in virtio_load()

2023-10-17 Thread Juan Quintela
Michael Tokarev wrote: > 05.09.2023 17:50, Kevin Wolf wrote: >> virtio_load() as a whole should run in coroutine context because it >> reads from the migration stream and we don't want this to block. >> However, it calls virtio_set_features_nocheck() and devices don't >> expect their

[PATCH v3 4/6] block/nvme: nvme_process_completion() fix bound for cid

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
NVMeQueuePair::reqs has length NVME_NUM_REQS, which less than NVME_QUEUE_SIZE by 1. Fixes: 1086e95da17050 ("block/nvme: switch to a NVMeRequest freelist") Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Maksim Davydov --- block/nvme.c | 7 --- 1 file

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Juan Quintela
Fabiano Rosas wrote: > Juan Quintela writes: > >> Fabiano Rosas wrote: >> D> Juan Quintela writes: >>> From: Fabiano Rosas Add basic tests for file-based migration. Note that we cannot use test_precopy_common because that routine expects it to be possible to run

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-17 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: > D> Juan Quintela writes: >> >>> From: Fabiano Rosas >>> >>> Add basic tests for file-based migration. >>> >>> Note that we cannot use test_precopy_common because that routine >>> expects it to be possible to run the migration live. With the file

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: > Am 06.10.23 um 14:18 schrieb Fiona Ebner: > > Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: > >> On 28.09.23 11:06, Fiona Ebner wrote: > >>> For fixing the backup cancel deadlock, I tried the following: > >>> > diff --git

[PATCH v5 3/7] migration: migrate 'blk' command option is deprecated.

2023-10-17 Thread Juan Quintela
Use blocked-mirror with NBD instead. Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Reviewed-by: Thomas Huth --- Improve documentation and style (markus) --- docs/about/deprecated.rst | 10 ++ qapi/migration.json| 6 -- migration/migration-hmp-cmds.c |

[PATCH v5 1/7] migration: Print block status when needed

2023-10-17 Thread Juan Quintela
The new line was only printed when command options were used. When we used migration parameters and capabilities, it wasn't. Signed-off-by: Juan Quintela --- migration/migration-hmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/migration-hmp-cmds.c

[PATCH v5 0/7] Migration deprecated parts

2023-10-17 Thread Juan Quintela
Based on: Message-ID: <20231017083003.15951-1-quint...@redhat.com> Migration 20231017 patches On this v5: - Rebased on top of last migration pull requesnt: - address markus comments. Basically we recommend always blockdev-mirror + NBD. In deprecated.rst we also put the pos

[PATCH v5 2/7] migration: migrate 'inc' command option is deprecated.

2023-10-17 Thread Juan Quintela
Use blockdev-mirror with NBD instead. Reviewed-by: Thomas Huth Acked-by: Stefan Hajnoczi Signed-off-by: Juan Quintela --- Improve documentation and style (thanks Markus) --- docs/about/deprecated.rst | 8 qapi/migration.json| 8 +++-

[PATCH v5 6/7] [RFC] migration: Make -i/-b an error for hmp and qmp

2023-10-17 Thread Juan Quintela
[DON'T MERGE] Block migration is obsolete, users should use blockdev-mirror instead. Make it one error to set them. Signed-off-by: Juan Quintela --- migration/migration-hmp-cmds.c | 13 +++-- migration/migration.c | 33 ++--- 2 files changed, 13

[PATCH v5 4/7] migration: Deprecate block migration

2023-10-17 Thread Juan Quintela
It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi --- docs/about/deprecated.rst | 10 ++ qapi/migration.json | 29

[PATCH v5 7/7] [RFC] migration: Remove helpers needed for -i/-b migrate options

2023-10-17 Thread Juan Quintela
[DON'T MERGE] We were abusing capabilities and parameters to implement -i/-b. Previous patch convert that options into one error. Remove all the helpers needed to implement them. Signed-off-by: Juan Quintela --- migration/migration.h | 4 migration/options.h | 6 --

[PATCH v5 5/7] migration: Deprecate old compression method

2023-10-17 Thread Juan Quintela
Signed-off-by: Juan Quintela Acked-by: Stefan Hajnoczi Acked-by: Peter Xu --- docs/about/deprecated.rst | 8 qapi/migration.json | 79 +-- migration/options.c | 13 +++ 3 files changed, 72 insertions(+), 28 deletions(-) diff --git

Re: [PULL 00/25] Python patches

2023-10-17 Thread Vladimir Sementsov-Ogievskiy
On 17.10.23 02:44, John Snow wrote: On Mon, Oct 16, 2023 at 3:21 PM Stefan Hajnoczi wrote: Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. Hi Vladimir: all done! Thanks! I've created a MR to backport your changes to

Re: [RFC PATCH v3 40/78] hw/sd/sdhci.c: add fallthrough pseudo-keyword

2023-10-17 Thread Philippe Mathieu-Daudé
On 13/10/23 10:46, Emmanouil Pitsidianakis wrote: In preparation of raising -Wimplicit-fallthrough to 5, replace all fall-through comments with the fallthrough attribute pseudo-keyword. Signed-off-by: Emmanouil Pitsidianakis --- hw/sd/sdhci.c | 8 1 file changed, 4 insertions(+), 4

Re: [PATCH 11/12] hw/xen: automatically assign device index to block devices

2023-10-17 Thread Kevin Wolf
Am 16.10.2023 um 17:19 hat David Woodhouse geschrieben: > From: David Woodhouse > > There's no need to force the user to assign a vdev. We can automatically > assign one, starting at xvda and searching until we find the first disk > name that's unused. > > This means we can now allow '-drive

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Fiona Ebner
Am 06.10.23 um 14:18 schrieb Fiona Ebner: > Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: >> On 28.09.23 11:06, Fiona Ebner wrote: >>> For fixing the backup cancel deadlock, I tried the following: >>> diff --git a/blockjob.c b/blockjob.c index 58c5d64539..fd6132ebfe 100644

Re: [PATCH v2 3/3] hw/nvme: Add SPDM over DOE support

2023-10-17 Thread Jonathan Cameron via
On Tue, 17 Oct 2023 15:21:55 +1000 Alistair Francis wrote: > From: Wilfred Mallawa > > Setup Data Object Exchance (DOE) as an extended capability for the NVME > controller and connect SPDM to it (CMA) to it. > > Signed-off-by: Wilfred Mallawa > Signed-off-by: Alistair Francis > --- >

Re: [PATCH v2 2/3] backends: Initial support for SPDM socket support

2023-10-17 Thread Jonathan Cameron via
On Tue, 17 Oct 2023 15:21:54 +1000 Alistair Francis wrote: > From: Huai-Cheng Kuo > > SPDM enables authentication, attestation and key exchange to assist in > providing infrastructure security enablement. It's a standard published > by the DMTF [1]. > > SPDM supports multiple transports,

Re: [PULL 1/1] virtio-blk: don't start dataplane during the stop of dataplane

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 11:01 hat Fiona Ebner geschrieben: > Am 16.10.23 um 21:40 schrieb Stefan Hajnoczi: > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > > index 39e7f23fab..c2d59389cb 100644 > > --- a/hw/block/virtio-blk.c > > +++ b/hw/block/virtio-blk.c > > @@ -1166,7 +1166,7 @@

Re: [PATCH v2 1/3] hw/pci: Add all Data Object Types defined in PCIe r6.0

2023-10-17 Thread Jonathan Cameron via
On Tue, 17 Oct 2023 15:21:53 +1000 Alistair Francis wrote: > Add all of the defined protocols/features from the PCIe-SIG r6.0 > "Table 6-32 PCI-SIG defined Data Object Types (Vendor ID = 0001h)" > table. > > Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron If you feel like

Re: [PULL 1/1] virtio-blk: don't start dataplane during the stop of dataplane

2023-10-17 Thread Fiona Ebner
Am 16.10.23 um 21:40 schrieb Stefan Hajnoczi: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 39e7f23fab..c2d59389cb 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -1166,7 +1166,7 @@ static void virtio_blk_handle_output(VirtIODevice > *vdev, VirtQueue

Re: [PATCH 2/2] virtio: Drop out of coroutine context in virtio_load()

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 07:19 hat Michael Tokarev geschrieben: > 05.09.2023 17:50, Kevin Wolf wrote: > > virtio_load() as a whole should run in coroutine context because it > > reads from the migration stream and we don't want this to block. > > > > However, it calls virtio_set_features_nocheck() and

[PULL 16/38] migration/rdma: Unfold ram_control_after_iterate()

2023-10-17 Thread Juan Quintela
Once there: - Remove unused data parameter - unfold it in its callers - change all callers to call qemu_rdma_registration_stop() - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID:

[PULL 30/38] multifd: reset next_packet_len after sending pages

2023-10-17 Thread Juan Quintela
From: Elena Ufimtseva Sometimes multifd sends just sync packet with no pages (normal_num is 0). In this case the old value is being preserved and being accounted for while only packet_len is being transferred. Reset it to 0 after sending and accounting for. Signed-off-by: Elena Ufimtseva

[PULL 32/38] migration/ram: Remove RAMState from xbzrle_cache_zero_page

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas 'rs' is not used in that function. It's a leftover from commit 9360447d34 ("ram: Use MigrationStats for statistics"). Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 23/38] migration/rdma: Check sooner if we are in postcopy for save_page()

2023-10-17 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-11-quint...@redhat.com> --- migration/rdma.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index c147c94b08..e973579a52

[PULL 20/38] qemu-file: Remove QEMUFileHooks

2023-10-17 Thread Juan Quintela
The only user was rdma, and its use is gone. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-8-quint...@redhat.com> --- migration/qemu-file.h | 4 migration/qemu-file.c | 6 -- migration/rdma.c | 9 - 3 files

[PULL 26/38] migration/rdma: Remove all "ret" variables that are used only once

2023-10-17 Thread Juan Quintela
Change code that is: int ret; ... ret = foo(); if (ret[ < 0]?) { to: if (foo()[ < 0]) { Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-14-quint...@redhat.com> --- migration/rdma.c | 29 - 1 file

[PULL 31/38] migration/ram: Refactor precopy ram loading code

2023-10-17 Thread Juan Quintela
From: Nikolay Borisov Extract the ramblock parsing code into a routine that operates on the sequence of headers from the stream and another the parses the individual ramblock. This makes ram_load_precopy() easier to comprehend. Signed-off-by: Nikolay Borisov Reviewed-by: Philippe Mathieu-Daudé

[PULL 25/38] migration/rdma: Declare for index variables local

2023-10-17 Thread Juan Quintela
Declare all variables that are only used inside a for loop inside the for statement. This makes clear that they are not used outside of the for loop. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-13-quint...@redhat.com> ---

[PULL 34/38] migration/ram: Move xbzrle zero page handling into save_zero_page

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas It makes a bit more sense to have the zero page handling of xbzrle right where we save the zero page. Also invert the exit condition to remove one level of indentation which makes the next patch easier to grasp. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas

[PULL 28/38] migration: check for rate_limit_max for RATE_LIMIT_DISABLED

2023-10-17 Thread Juan Quintela
From: Elena Ufimtseva In migration rate limiting atomic operations are used to read the rate limit variables and transferred bytes and they are expensive. Check first if rate_limit_max is equal to RATE_LIMIT_DISABLED and return false immediately if so. Note that with this patch we will also

[PULL 36/38] migration/multifd: Remove direct "socket" references

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas We're about to enable support for other transports in multifd, so remove direct references to sockets. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 24/38] migration/rdma: Use i as for index instead of idx

2023-10-17 Thread Juan Quintela
Once there, all the uses are local to the for, so declare the variable inside the for statement. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-12-quint...@redhat.com> --- migration/rdma.c | 49

[PULL 13/38] migration: Non multifd migration don't care about multifd flushes

2023-10-17 Thread Juan Quintela
RDMA was having trouble because migrate_multifd_flush_after_each_section() can only be true or false, but we don't want to send any flush when we are not in multifd migration. CC: Fabiano Rosas Reviewed-by: Li Zhijian Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID:

[PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas Add a smoke test that migrates to a file and gives it to the script. It should catch the most annoying errors such as changes in the ram flags. After code has been merged it becomes way harder to figure out what is causing the script to fail, the person making the change is

[PULL 02/38] migration: Use g_autofree to simplify ram_dirty_bitmap_reload()

2023-10-17 Thread Juan Quintela
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011023627.86691-1-phi...@linaro.org> --- migration/ram.c | 17 ++--- 1 file

[PULL 06/38] migration: Fix analyze-migration.py 'configuration' parsing

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas The 'configuration' state subsections are currently not being parsed and the script fails when analyzing an aarch64 stream: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 625, in dump.read(dump_memory = args.memory) File

[PULL 21/38] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-10-17 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-9-quint...@redhat.com> --- migration/qemu-file.h | 17 - migration/rdma.h | 16 migration/ram.c | 2 +- 3 files changed, 17 insertions(+), 18

[PULL 29/38] multifd: fix counters in multifd_send_thread

2023-10-17 Thread Juan Quintela
From: Elena Ufimtseva Previous commit cbec7eb76879d419e7dbf531ee2506ec0722e825 "migration/multifd: Compute transferred bytes correctly" removed accounting for packet_len in non-rdma case, but the next_packet_size only accounts for pages, not for the header packet (normal_pages * PAGE_SIZE) that

[PULL 27/38] migration: Improve json and formatting

2023-10-17 Thread Juan Quintela
Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231013104736.31722-2-quint...@redhat.com> --- qapi/migration.json | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 360e609f66..db3df12d6c 100644

[PULL 09/38] migration: Fix analyze-migration read operation signedness

2023-10-17 Thread Juan Quintela
From: Fabiano Rosas The migration code uses unsigned values for 16, 32 and 64-bit operations. Fix the script to do the same. This was causing an issue when parsing the migration stream generated on the ppc64 target because one of instance_ids was larger than the 32bit signed maximum: Traceback

  1   2   >