Re: [PATCH v4 0/1] ROM migration

2023-06-09 Thread Vladimir Sementsov-Ogievskiy
On 09.06.23 18:55, Michael S. Tsirkin wrote: This is tagged, pull request will be delayed due to kvm forum though. OK, thanks! On Fri, Jun 09, 2023 at 04:32:40PM +0300, Vladimir Sementsov-Ogievskiy wrote: ping. On 22.05.23 23:17, Vladimir Sementsov-Ogievskiy wrote: v4: preparation

Re: [PATCH] coverity: physmem: use simple assertions instead of modelling

2023-06-09 Thread Vladimir Sementsov-Ogievskiy
ping On 20.04.23 22:06, Vladimir Sementsov-Ogievskiy wrote: On 16.03.23 00:22, Paolo Bonzini wrote: On 3/15/23 15:28, Vladimir Sementsov-Ogievskiy wrote: On 22.02.23 18:57, Peter Maydell wrote: On Wed, 22 Feb 2023 at 14:19, Stefan Hajnoczi wrote: On Wed, 15 Feb 2023 at 15:22, Vladimir

Re: [PATCH v4 0/1] ROM migration

2023-06-09 Thread Vladimir Sementsov-Ogievskiy
ping. On 22.05.23 23:17, Vladimir Sementsov-Ogievskiy wrote: v4: preparation patches are already merged to master 01: fix false-positive "error: ‘size’ may be used uninitialized", keep r-bs Vladimir Sementsov-Ogievskiy (1): pci: ROM preallocation for incoming migration hw

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
On 06.06.23 19:25, Richard Henderson wrote: This test consistently fails on Azure cloud build hosts in a way that suggests a timing problem in the test itself: --- .../194.out +++ .../194.out.bad @@ -14,7 +14,6 @@ {"return": {}} {"data": {"status": "setup"}, "event": "MIGRATION",

[PATCH] iotests: fix 194: filter out racy postcopy-active event

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
The event is racy: it will not appear in the output if bitmap is migrated during downtime period of migration and postcopy phase is not started. Fixes: ae00aa239847 "iotests: 194: test also migration of dirty bitmap" Reported-by: Richard Henderson Signed-off-by: Vladimir Sementsov

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
On 07.06.23 15:44, Stefan Hajnoczi wrote: The line of output that has changed was originally added by the following commit: commit ae00aa2398476824f0eca80461da215e7cdc1c3b Author: Vladimir Sementsov-Ogievskiy Date: Fri May 22 01:06:46 2020 +0300 iotests: 194: test also migration

Re: [PATCH v3 14/14] nbd/server: Add FLAG_PAYLOAD support to CMD_BLOCK_STATUS

2023-06-02 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Allow a client to request a subset of negotiated meta contexts. For example, a client may ask to use a single connection to learn about both block status and dirty bitmaps, but where the dirty bitmap queries only need to be performed on a subset of the disk;

Re: [PATCH v3 13/14] nbd/server: Prepare for per-request filtering of BLOCK_STATUS

2023-06-01 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: The next commit will add support for the new addition of NBD_CMD_FLAG_PAYLOAD during NBD_CMD_BLOCK_STATUS, where the client can request that the server only return a subset of negotiated contexts, rather than all contexts. To make that task easier, this

Re: [PATCH v3 12/14] nbd/client: Request extended headers during negotiation

2023-06-01 Thread Vladimir Sementsov-Ogievskiy
On 31.05.23 23:26, Eric Blake wrote: On Wed, May 31, 2023 at 09:33:20PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 31.05.23 20:54, Eric Blake wrote: On Wed, May 31, 2023 at 08:39:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: All the pieces

Re: [PATCH v3 12/14] nbd/client: Request extended headers during negotiation

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 31.05.23 20:54, Eric Blake wrote: On Wed, May 31, 2023 at 08:39:53PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd

Re: [PATCH v3 11/14] nbd/client: Accept 64-bit block status chunks

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 31.05.23 20:40, Eric Blake wrote: On Wed, May 31, 2023 at 08:00:43PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: Because we use NBD_CMD_FLAG_REQ_ONE with NBD_CMD_BLOCK_STATUS, a client in narrow mode should not be able to provoke a server into sending

Re: [PATCH v3 12/14] nbd/client: Request extended headers during negotiation

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: All the pieces are in place for a client to finally request extended headers. Note that we must not request extended headers when qemu-nbd why must not? It should gracefully report ENOTSUP? Or not? is used to connect to the kernel module (as nbd.ko does

Re: [PATCH v3 11/14] nbd/client: Accept 64-bit block status chunks

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Because we use NBD_CMD_FLAG_REQ_ONE with NBD_CMD_BLOCK_STATUS, a client in narrow mode should not be able to provoke a server into sending a block status result larger than the client's 32-bit request. But in extended mode, a 64-bit status request must be

Re: [PATCH v3 10/14] nbd/client: Initial support for extended headers

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Update the client code to be able to send an extended request, and parse an extended header from the server. Note that since we reject any structured reply with a too-large payload, we can always normalize a valid header back into the compact form, so that

Re: [PATCH v3 09/14] nbd/server: Initial support for extended headers

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Time to support clients that request extended headers. Now we can finally reach the code added across several previous patches. Even though the NBD spec has been altered to allow us to accept NBD_CMD_READ larger than the max payload size (provided our

Re: [PATCH v3 08/14] nbd/server: Support 64-bit block status

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: The NBD spec states that if the client negotiates extended headers, the server must avoid NBD_REPLY_TYPE_BLOCK_STATUS and instead use NBD_REPLY_TYPE_BLOCK_STATUS_EXT which supports 64-bit lengths, even if the reply does not need more than 32 bits. As of this

Re: [PATCH v3 07/14] nbd/server: Refactor to pass full request around

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
tic changes. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 06/14] nbd/server: Refactor handling of request payload

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Upcoming additions to support NBD 64-bit effect lengths allow for the possibility to distinguish between payload length (capped at 32M) and effect length (up to 63 bits). Without that extension, only the NBD_CMD_WRITE request has a payload; but with the

Re: [Libguestfs] [PATCH v3 05/14] nbd: Add types for extended headers

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 30.05.23 21:22, Eric Blake wrote: On Tue, May 30, 2023 at 04:23:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: Add the constants and structs necessary for later patches to start implementing the NBD_OPT_EXTENDED_HEADERS extension in both the client

Re: [PATCH v3 03/14] nbd/server: Prepare for alternate-size headers

2023-05-31 Thread Vladimir Sementsov-Ogievskiy
On 30.05.23 19:29, Eric Blake wrote: On Mon, May 29, 2023 at 05:26:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 15.05.23 22:53, Eric Blake wrote: Upstream NBD now documents[1] an extension that supports 64-bit effect lengths in requests. As part of that extension, the size of the reply

Re: [PATCH v3 05/14] nbd: Add types for extended headers

2023-05-30 Thread Vladimir Sementsov-Ogievskiy
behavior, but merely sets the stage. This patch does not change the status quo that neither the client nor server use a packed-struct representation for the request header. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- docs/interop/nbd.txt | 1 + include/block

Re: [PATCH v3 04/14] nbd: Prepare for 64-bit request effect lengths

2023-05-30 Thread Vladimir Sementsov-Ogievskiy
On 15.05.23 22:53, Eric Blake wrote: Widen the length field of NBDRequest to 64-bits, although we can assert that all current uses are still under 32 bits. Move the request magic number to nbd.h, to live alongside the reply magic number. Convert 'bool structured_reply' into a tri-state enum

Re: [PATCH v3 03/14] nbd/server: Prepare for alternate-size headers

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
by the 32-bit NBD_INFO_BLOCK_SIZE field; allowing a client and server to mutually agree to transactions larger than 4G would require yet another extension. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 8 +++--- nbd/server.c| 64

Re: [PATCH v3 02/14] nbd/client: Add safety check on chunk payload length

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 01/14] nbd/client: Use smarter assert

2023-05-29 Thread Vladimir Sementsov-Ogievskiy
ersize strings", v4.2.0) Reported-by: Dr. David Alan Gilbert Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] qcow2: Explicit mention of padding bytes

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
of the header (such as the header extension format listing padding from n - m, or the snapshot table entry listing variable padding), we might as well call out the remaining 7 bytes as padding until such time (as any) as they gain another meaning. Signed-off-by: Eric Blake CC: Vladimir Sementsov-Ogievskiy

[PATCH v4 0/1] ROM migration

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
v4: preparation patches are already merged to master 01: fix false-positive "error: ‘size’ may be used uninitialized", keep r-bs Vladimir Sementsov-Ogievskiy (1): pci: ROM preallocation for incoming migration hw/pci/pci.c | 79 ++

[PATCH v4 1/1] pci: ROM preallocation for incoming migration

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
rror: ‘size’ may be used uninitialized" Suggested-by: Michael S. Tsirkin Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: David Hildenbrand Reviewed-by: Juan Quintela --- hw/pci/pci.c | 79 ++-- 1 file changed, 46 insertions(+), 33

Re: [PATCH v7 1/4] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
On 22.05.23 15:13, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 22.05.23 12:27, Markus Armbruster wrote: "Michael S. Tsirkin" writes: On Fri, Apr 21, 2023 at 01:32:04PM +0300, Vladimir Sementsov-Ogievskiy wrote: DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR

Re: [PATCH v7 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
On 22.05.23 13:47, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug, as there are time

Re: [PATCH v7 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
On 19.05.23 18:20, Philippe Mathieu-Daudé wrote: Hi Vladimir, On 21/4/23 12:32, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually completed. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe

Re: [PATCH v7 1/4] qapi/qdev.json: unite DEVICE_* event data into single structure

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
On 22.05.23 12:27, Markus Armbruster wrote: "Michael S. Tsirkin" writes: On Fri, Apr 21, 2023 at 01:32:04PM +0300, Vladimir Sementsov-Ogievskiy wrote: DEVICE_DELETED and DEVICE_UNPLUG_GUEST_ERROR has equal data, let's refactor it to one structure. That also helps to add

Re: [PATCH v3 3/3] pci: ROM preallocation for incoming migration

2023-05-22 Thread Vladimir Sementsov-Ogievskiy
On 19.05.23 08:34, Michael S. Tsirkin wrote: On Mon, May 15, 2023 at 03:52:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the file 2. Than, on incoming migration we

Re: [PATCH 0/5] Restore vmstate on cancelled/failed migration

2023-05-18 Thread Vladimir Sementsov-Ogievskiy
On 18.05.23 14:23, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: Hi all. The problem I want to solve is that guest-panicked state may be lost when migration is failed (or cancelled) after source stop. Still, I try to go further and restore all possible paused states in the same

Re: [PATCH 2/5] migration: never fail in global_state_store()

2023-05-18 Thread Vladimir Sementsov-Ogievskiy
On 18.05.23 14:18, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: Actually global_state_store() can never fail. Let's get rid of extra error paths. To make things clear, use new runstate_get() and use same approach for global_state_store() and global_state_store_running(). Signed

[PATCH 3/5] runstate: drop unused runstate_store()

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
The function is unused since previous commit. Drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/runstate.h | 1 - softmmu/runstate.c| 12 2 files changed, 13 deletions(-) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index

[PATCH 0/5] Restore vmstate on cancelled/failed migration

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
. Vladimir Sementsov-Ogievskiy (5): runstate: add runstate_get() migration: never fail in global_state_store() runstate: drop unused runstate_store() migration: switch from .vm_was_running to .vm_old_state migration: restore vmstate on migration failure include/migration/global_state.h | 2

[PATCH 1/5] runstate: add runstate_get()

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
It's necessary to restore the state after failed/cancelled migration in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/runstate.h | 1 + softmmu/runstate.c| 5 + 2 files changed, 6 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu

[PATCH 4/5] migration: switch from .vm_was_running to .vm_old_state

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
No logic change here, only refactoring. That's a preparation for next commit where we finally restore the stopped vm state on migration failure or cancellation. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 11 ++- migration/migration.h | 9 ++--- 2 files

[PATCH 2/5] migration: never fail in global_state_store()

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
Actually global_state_store() can never fail. Let's get rid of extra error paths. To make things clear, use new runstate_get() and use same approach for global_state_store() and global_state_store_running(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/global_state.h | 2

[PATCH 5/5] migration: restore vmstate on migration failure

2023-05-17 Thread Vladimir Sementsov-Ogievskiy
ame transitions like for inmigrate state. This commit changes the behavior that was introduced by commit 42da5550d6 "migration: set state to post-migrate on failure" and provides a bit different fix on related https://bugzilla.redhat.com/show_bug.cgi?id=1355683 Signed-off-by

[PATCH v5 0/3] COLO: improve build options

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
Hi all! Most patches merged, thanks to Juan! Here is remaining three patches. 01: update commit msg, add r-b by Zhang, - patch is unrelated to 02-03, may be merged in separate 02: fix missed invocation in migration/rdma.c 03: fix reversed assertion Vladimir Sementsov-Ogievskiy (3

[PATCH v5 3/3] migration: process_incoming_migration_co(): move colo part to colo

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
Let's make better public interface for COLO: instead of colo_process_incoming_thread and not trivial logic around creating the thread let's make simple colo_incoming_co(), hiding implementation from generic code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/colo.h | 9

[PATCH v5 2/3] migration: split migration_incoming_co

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
-NULL during qemu_loadvm_state(), and colo_incoming_co for COLO, non-NULL only around specific yield. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/colo.c | 4 ++-- migration/migration.c | 8 ++-- migration/migration.h | 9 - migration/rdma.c | 5 ++--- 4 files changed, 18 inser

[PATCH v5 1/3] configure: add --disable-colo-proxy option

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
Add option to not build filter-rewriter and colo-compare when they are not needed. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Zhang Chen --- meson_options.txt | 2 ++ net/meson.build | 13 ++--- scripts/meson

[PATCH v3 1/3] pci: pci_add_option_rom(): improve style

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
Fix over-80 lines and missing curly brackets for if-operators, which are required by QEMU coding style. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: David Hildenbrand --- hw/pci/pci.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/pci

[PATCH v3 0/3] ROM migration

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
running QEMU with old option ROM of small size and want to migrate to new environment where we don't have this ROM file. All the details are in patch 03; 01-02 are simple code style improvements. Vladimir Sementsov-Ogievskiy (3): pci: pci_add_option_rom(): improve style pci: pci_add_option_rom

[PATCH v3 2/3] pci: pci_add_option_rom(): refactor: use g_autofree for path variable

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: David Hildenbrand --- hw/pci/pci.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e26e2a7e65..3a0107758c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2307,7 +2307,7

[PATCH v3 3/3] pci: ROM preallocation for incoming migration

2023-05-15 Thread Vladimir Sementsov-Ogievskiy
;qom-get", "arguments": { "path": "/machine/peripheral/CARD_ID/virtio-net-pci.rom[0]", "property": "size" } } Suggested-by: Michael S. Tsirkin Signed-off-by: Vladimir Sementsov-Ogievskiy Re

Re: [PATCH v2] migration: Add documentation for backwards compatiblity

2023-05-11 Thread Vladimir Sementsov-Ogievskiy
On 11.05.23 15:00, Juan Quintela wrote: +Now we start with the more interesting cases. Let start with the +same qemu but not the same machine type. sounds like "different machine type on source and target" for me.. Maybe, "not latest machine type" ? Now we start with the more interesting

Re: [PATCH v2] migration: Add documentation for backwards compatiblity

2023-05-11 Thread Vladimir Sementsov-Ogievskiy
: Reviewed-by: Vladimir Sementsov-Ogievskiy Some small remarks below. --- [v2] - Add all danp fixes [v1] I will really appreciate reviews: - I don't speak natively .rst format, so let me what I have done wrong. - English is not my native language either (no points if had guessed

Re: [PATCH v9 0/6] block: refactor blockdev transactions

2023-05-11 Thread Vladimir Sementsov-Ogievskiy
On 11.05.23 12:00, Kevin Wolf wrote: Am 10.05.2023 um 17:06 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! Let's refactor QMP transactions implementation into new (relatively) transaction API. v9: 01: fix leaks That's a clever use of g_autofree. Wouldn't have thought

Re: [PATCH v9 0/6] block: refactor blockdev transactions

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
Interesting, I see two 5/6 letters, equal body, but a bit different headers (the second has empty "Sender").. On 10.05.23 18:06, Vladimir Sementsov-Ogievskiy wrote: Hi all! Let's refactor QMP transactions implementation into new (relatively) transaction API. v9: 01: fix leaks 02-0

[PATCH v9 5/6] blockdev: use state.bitmap in block-dirty-bitmap-add action

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
path. (Note also that bitmap-remove is the only bitmap action that has .commit() phase, except for simple g_free the state on .clean()) 3. Again, other bitmap actions behave this way: keep the bitmap pointer during the transaction. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v9 1/6] blockdev: refactor transaction to use Transaction API

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
let's just transform what we have into new-style transaction actions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 309 ++--- 1 file changed, 178 insertions(+), 131 deletions(-) diff --git a/blockdev.c b/blockdev.c index d7b5c18f0a

[PATCH v9 4/6] blockdev: transaction: refactor handling transaction properties

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
Only backup supports GROUPED mode. Make this logic more clear. And avoid passing extra thing to each action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 96 +- 1 file changed, 22 insertions(+), 74 deletions(-) diff --git

[PATCH v9 3/6] blockdev: qmp_transaction: refactor loop to classic for

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- blockdev.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index f72084d206..f236e5c27e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2367,7 +2367,7 @@ void

[PATCH v9 6/6] blockdev: qmp_transaction: drop extra generic layer

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 266 + 1 file changed, 85 insertions(+), 181 deletions(-) diff --git a/blockdev.c b/blockdev.c index 10003bdc52..75f7e209a9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1178,54 +1178,8

[PATCH v9 0/6] block: refactor blockdev transactions

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! Let's refactor QMP transactions implementation into new (relatively) transaction API. v9: 01: fix leaks 02-03: add r-b 04: fix leak, s/Transaction/transaction/ 05: new, was part of 06 06: rework of bitmap-add action moved to 05 Vladimir Sementsov-Ogievskiy (6): blockdev: refactor

[PATCH v9 2/6] blockdev: transactions: rename some things

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
t, we have to rename global map of actions, to not conflict with new name for function argument. Rename also dev_entry loop variable accordingly to new name of the list. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- blockdev.c | 30 +++--- 1 file c

Re: [PATCH v8 5/5] blockdev: qmp_transaction: drop extra generic layer

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
On 10.05.23 14:47, Kevin Wolf wrote: Am 21.04.2023 um 13:53 hat Vladimir Sementsov-Ogievskiy geschrieben: Let's simplify things: First, actions generally don't need access to common BlkActionState structure. The only exclusion are backup actions that need block_job_txn. Next, for transaction

Re: [PATCH v4 04/10] configure: add --disable-colo-proxy option

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
On 10.05.23 15:18, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: On 09.05.23 21:42, Juan Quintela wrote: "Zhang, Chen" wrote: -Original Message----- From: Vladimir Sementsov-Ogievskiy Sent: Saturday, April 29, 2023 3:49 AM To: qemu-devel@nongnu.org Cc: lukasstra

Re: [PATCH v4 04/10] configure: add --disable-colo-proxy option

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
On 09.05.23 21:42, Juan Quintela wrote: "Zhang, Chen" wrote: -Original Message----- From: Vladimir Sementsov-Ogievskiy Sent: Saturday, April 29, 2023 3:49 AM To: qemu-devel@nongnu.org Cc: lukasstra...@web.de; quint...@redhat.com; Zhang, Chen ; vsement...@yandex-team.ru; Pao

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-10 Thread Vladimir Sementsov-Ogievskiy
On 09.05.23 18:54, Michael S. Tsirkin wrote: On Wed, May 03, 2023 at 02:39:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 03.05.23 13:05, Michael S. Tsirkin wrote: On Wed, May 03, 2023 at 12:50:09PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 03.05.23 12:20, David Hildenbrand wrote

Re: [PATCH v4 00/10] COLO: improve build options

2023-05-05 Thread Vladimir Sementsov-Ogievskiy
On 05.05.23 10:56, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Saturday, April 29, 2023 3:49 AM To:qemu-devel@nongnu.org Cc:lukasstra...@web.de;quint...@redhat.com; Zhang, Chen ;vsement...@yandex-team.ru Subject: [PATCH v4 00/10] COLO: improve build

Re: [PATCH v4 10/10] migration: block incoming colo when capability is disabled

2023-05-04 Thread Vladimir Sementsov-Ogievskiy
On 05.05.23 01:10, Lukas Straub wrote: On Fri, 28 Apr 2023 22:49:28 +0300 Vladimir Sementsov-Ogievskiy wrote: We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy Good patch

Re: [PATCH v4 09/10] migration: disallow change capabilities in COLO state

2023-05-04 Thread Vladimir Sementsov-Ogievskiy
On 04.05.23 11:09, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Saturday, April 29, 2023 3:49 AM To: qemu-devel@nongnu.org Cc: lukasstra...@web.de; quint...@redhat.com; Zhang, Chen ; vsement...@yandex-team.ru; Peter Xu ; Leonardo Bras Subject

Re: [PATCH v4 07/10] migration: split migration_incoming_co

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 23:48, Peter Xu wrote: On Fri, Apr 28, 2023 at 10:49:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: Originally, migration_incoming_co was introduced by 25d0c16f625feb3b6 "migration: Switch to COLO process after finishing loadvm" to be able to enter from COLO c

Re: [PATCH v4 03/10] build: move COLO under CONFIG_REPLICATION

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 19:41, Peter Xu wrote: ## # @query-colo-status: @@ -1674,7 +1676,8 @@ # Since: 3.1 ## { 'command': 'query-colo-status', - 'returns': 'COLOStatus' } + 'returns': 'COLOStatus', + 'if': 'CONFIG_REPLICATION' } I still see a bunch of other colo related definitions around in

Re: [PATCH] iotests/nbd-reconnect-on-open: Fix NBD socket path

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
: ab7f7e67a7e7b49964109501dfcde4ec29bae60e Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH] migration: Fix block_bitmap_mapping migration

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
Fixes: b804b35b1c8a0edfd127ac20819c234be55ac7fc migration: Create migrate_block_bitmap_mapping() function Reported-by: Kevin Wolf Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 20:15, Juan Quintela wrote: Kevin Wolf wrote: Am 27.04.2023 um 17:22 hat Juan Quintela geschrieben: Notice that we changed the test of ->has_block_bitmap_mapping for the test that block_bitmap_mapping is not NULL. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sement

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 13:05, Michael S. Tsirkin wrote: On Wed, May 03, 2023 at 12:50:09PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 03.05.23 12:20, David Hildenbrand wrote: On 25.04.23 18:14, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 03.05.23 12:20, David Hildenbrand wrote: On 25.04.23 18:14, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the file 2. Than, on incoming migration we rewrite ROM from the incoming

Re: [PATCH v4 08/10] migration: process_incoming_migration_co(): move colo part to colo

2023-05-03 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 23:54, Peter Xu wrote: On Fri, Apr 28, 2023 at 10:49:26PM +0300, Vladimir Sementsov-Ogievskiy wrote: +int coroutine_fn colo_incoming_co(void) +{ +MigrationIncomingState *mis = migration_incoming_get_current(); +Error *local_err = NULL; +QemuThread th; + +assert

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-02 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 13:11, Juan Quintela wrote: "Michael S. Tsirkin" wrote: CC pbonzini,dgilbert,quintela,armbru : guys, is poking at runstate_check like this the right way to figure out we are not going to use the device locally before incoming migration will overwrite ROM contents?

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-05-02 Thread Vladimir Sementsov-Ogievskiy
On 02.05.23 12:48, Michael S. Tsirkin wrote: On Wed, Apr 26, 2023 at 11:00:46PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 26.04.23 07:43, Michael S. Tsirkin wrote: On Tue, Apr 25, 2023 at 07:14:34PM +0300, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following

Re: [PATCH v2 3/3] pci: ROM preallocation for incoming migration

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 11:30, Juan Quintela wrote: "Michael S. Tsirkin" wrote: On Tue, Apr 25, 2023 at 07:14:34PM +0300, Vladimir Sementsov-Ogievskiy wrote: On incoming migration we have the following sequence to load option ROM: 1. On device realize we do normal load ROM from the fil

[PATCH v4 05/10] migration: drop colo_incoming_thread from MigrationIncomingState

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
have_colo_incoming_thread variable is unused. colo_incoming_thread can be local. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 7 --- migration/migration.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration

[PATCH v4 03/10] build: move COLO under CONFIG_REPLICATION

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
without REPLICATION, but this requires deeper audit of colo & replication code, which may be done later if needed. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Dr. David Alan Gilbert --- hmp-commands.hx| 2 ++ migration/colo.c

[PATCH v4 04/10] configure: add --disable-colo-proxy option

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
COLO Proxy subsystem. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- meson_options.txt | 2 ++ net/meson.build | 13 ++--- scripts/meson-buildoptions.sh | 3 +++ stubs/colo-compare.c | 7 +++ stubs/meson.build

[PATCH v4 08/10] migration: process_incoming_migration_co(): move colo part to colo

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Let's make better public interface for COLO: instead of colo_process_incoming_thread and not trivial logic around creating the thread let's make simple colo_incoming_co(), hiding implementation from generic code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/colo.h | 9

[PATCH v4 09/10] migration: disallow change capabilities in COLO state

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
unreachable: we can get into COLO state only with enabled capability and can't disable it while we are in COLO state. So substitute the error by simple assertion. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 5 + migration/options.c | 2 +- 2 files changed, 2

[PATCH v4 01/10] block/meson.build: prefer positive condition for replication

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Lukas Straub --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b

[PATCH v4 02/10] colo: make colo_checkpoint_notify static and provide simpler API

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
external callers. Also this helps us to make COLO module optional in further patch (i.e. we are going to add possibility not build the COLO module). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/migration/colo.h | 9 - migration/colo.c | 29

[PATCH v4 07/10] migration: split migration_incoming_co

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
-NULL during qemu_loadvm_state(), and colo_incoming_co for COLO, non-NULL only around specific yield. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/colo.c | 4 ++-- migration/migration.c | 8 ++-- migration/migration.h | 9 - 3 files changed, 16 insertions(+), 5 deletions(-) d

[PATCH v4 06/10] migration: process_incoming_migration_co: simplify code flow around ret

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index d4fa1a853c..8db0892317 100644 --- a/migration/migration.c +++ b/migration/migration.c

[PATCH v4 00/10] COLO: improve build options

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
, provide personal configure option for COLO Proxy subsystem. Vladimir Sementsov-Ogievskiy (10): block/meson.build: prefer positive condition for replication colo: make colo_checkpoint_notify static and provide simpler API build: move COLO under CONFIG_REPLICATION configure: add --disable-colo

[PATCH v4 10/10] migration: block incoming colo when capability is disabled

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
We generally require same set of capabilities on source and target. Let's require x-colo capability to use COLO on target. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/migration/migration.c b/migration

Re: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 12:34, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 27.04.23 12:53, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 53 1 file changed, 53 insertions(+) diff --git a/docs

Re: [PATCH 2/2] migration: Drop unused parameter for migration_tls_client_create()

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 11:34, Juan Quintela wrote: It is not needed since we moved the accessor for tls properties to options.c. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 1/2] migration: Drop unused parameter for migration_tls_get_creds()

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 11:34, Juan Quintela wrote: It is not needed since we moved the accessor for tls properties to options.c. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v3 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 10:30, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: We don't allow to use x-colo capability when replication is not configured. So, no reason to build COLO when replication is disabled, it's unusable in this case. Note also that the check in migrate_caps_check

Re: [PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 10:33, Juan Quintela wrote: Vladimir Sementsov-Ogievskiy wrote: Add option to not build filter-mirror, filter-rewriter and colo-compare when they are not needed. There could be more agile configuration, for example add separate options for each filter, but that may be done

Re: [PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 00:18, Lukas Straub wrote: On Thu, 27 Apr 2023 23:29:46 +0300 Vladimir Sementsov-Ogievskiy wrote: Add option to not build filter-mirror, filter-rewriter and colo-compare when they are not needed. There could be more agile configuration, for example add separate options for each

[PATCH v3 0/4] COLO: improve build options

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
in this case. So, let's not compile in unreachable code and interface we cannot use when CONFIG_REPLICATION is unset. Also, provide personal configure option for COLO Proxy subsystem. Vladimir Sementsov-Ogievskiy (4): block/meson.build: prefer positive condition for replication scripts/qapi: allow

[PATCH v3 1/4] block/meson.build: prefer positive condition for replication

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b 100644 --- a/block/meson.build

[PATCH v3 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
without REPLICATION, but this requires deeper audit of colo & replication code, which may be done later if needed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hmp-commands.hx| 2 ++ migration/colo.c | 28 - migration/meson.build

[PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
COLO Proxy subsystem. Signed-off-by: Vladimir Sementsov-Ogievskiy --- meson_options.txt | 2 ++ net/meson.build | 14 ++ scripts/meson-buildoptions.sh | 3 +++ stubs/colo-compare.c | 7 +++ stubs/meson.build | 1 + 5 files changed

[PATCH v3 2/4] scripts/qapi: allow optional experimental enum values

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
uot;s. So let's fix it. We are going to use it in the next commit, to make unstable x-colo migration capability optional: { 'name': 'x-colo', 'features': [ 'unstable' ], 'if': 'CONFIG_COLO' } Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/qapi/types.py | 2 ++ 1 file changed, 2 inser

<    1   2   3   4   5   6   7   8   9   10   >