Re: [Libguestfs] [libnbd PATCH v3 05/22] states: Prepare to receive 64-bit replies

2023-06-12 Thread Eric Blake
On Thu, Jun 01, 2023 at 08:00:55AM -0500, Eric Blake wrote: > > > @@ -83,13 +96,18 @@ REPLY.STRUCTURED_REPLY.CHECK: > > > * not worth keeping the connection alive. > > > */ > > >if (length > MAX_REQUEST_SIZE + sizeof > > > h->sbuf.reply.payload.offset_data) { > > > -set_error (0,

Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region

2023-06-12 Thread Philippe Mathieu-Daudé
On 12/6/23 21:28, Bernhard Beschow wrote: Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland : The aim here is to eliminate any device-specific registers from the main BMDMA bar memory region so it can potentially be moved into the shared PCI IDE device. For each BMDMA bus create a new cm

Re: [RFC 4/6] migration: Deprecate -incoming

2023-06-12 Thread Peter Xu
On Mon, Jun 12, 2023 at 10:51:08PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Mon, Jun 12, 2023 at 09:33:42PM +0200, Juan Quintela wrote: > >> Only "defer" is recommended. After setting all migation parameters, > >> start incoming migration with "migrate-incoming uri" command. > >> > >

Re: [RFC 4/6] migration: Deprecate -incoming

2023-06-12 Thread Juan Quintela
Peter Xu wrote: > On Mon, Jun 12, 2023 at 09:33:42PM +0200, Juan Quintela wrote: >> Only "defer" is recommended. After setting all migation parameters, >> start incoming migration with "migrate-incoming uri" command. >> >> Signed-off-by: Juan Quintela >> --- >> docs/about/deprecated.rst | 7 ++

Re: [RFC 4/6] migration: Deprecate -incoming

2023-06-12 Thread Peter Xu
On Mon, Jun 12, 2023 at 09:33:42PM +0200, Juan Quintela wrote: > Only "defer" is recommended. After setting all migation parameters, > start incoming migration with "migrate-incoming uri" command. > > Signed-off-by: Juan Quintela > --- > docs/about/deprecated.rst | 7 +++ > softmmu/vl.c

[RFC 6/6] migration: Deprecated old compression method

2023-06-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 8 qapi/migration.json | 92 --- migration/options.c | 13 ++ 3 files changed, 79 insertions(+), 34 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.r

[RFC 0/6] Migration deprecated parts

2023-06-12 Thread Juan Quintela
Hi this series describe the migration parts that have to be deprecated. - It is an rfc because I doubt that I did the deprecation process right. Hello Markus O:-) - skipped field: It is older than me, I have never know what it stands for. As far as I know it has always been zero. - inc/blk m

[RFC 4/6] migration: Deprecate -incoming

2023-06-12 Thread Juan Quintela
Only "defer" is recommended. After setting all migation parameters, start incoming migration with "migrate-incoming uri" command. Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 7 +++ softmmu/vl.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/docs/about/d

[RFC 2/6] migration: migrate 'inc' command option is deprecated.

2023-06-12 Thread Juan Quintela
Use 'migrate_set_parameter block_incremental true' instead. Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 7 +++ qapi/migration.json | 11 +-- migration/migration.c | 5 + 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/about/deprec

[RFC 3/6] migration: migrate 'blk' command option is deprecated.

2023-06-12 Thread Juan Quintela
Use 'migrate_set_capability block true' instead. Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 7 +++ qapi/migration.json | 11 +++ migration/migration.c | 5 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/about/deprecated.rst b/

[RFC 5/6] migration: Deprecate block migration

2023-06-12 Thread Juan Quintela
It is obsolete. It is better to use driver_mirror+NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Signed-off-by: Juan Quintela --- Can any of you give one example of how to use driver_mirror+NBD for deprecated.rst? Thanks, Juan. --- docs/about/deprecate

[RFC 1/6] migration: skipped field is really obsolete.

2023-06-12 Thread Juan Quintela
Has return zero for more than 10 years. Just mark it deprecated. Signed-off-by: Juan Quintela --- docs/about/deprecated.rst | 10 ++ qapi/migration.json | 12 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprec

Re: [PATCH 5/5] cmd646: move device-specific BMDMA registers to separate memory region

2023-06-12 Thread Bernhard Beschow
Am 9. Juni 2023 18:51:19 UTC schrieb Mark Cave-Ayland : >The aim here is to eliminate any device-specific registers from the main BMDMA >bar memory region so it can potentially be moved into the shared PCI IDE >device. > >For each BMDMA bus create a new cmd646-bmdma-specific memory region >re

Re: [Libguestfs] [PATCH v4 09/24] nbd: Replace bool structured_reply with mode enum

2023-06-12 Thread Eric Blake
On Mon, Jun 12, 2023 at 06:07:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 08.06.23 16:56, Eric Blake wrote: > > The upcoming patches for 64-bit extensions requires various points in > > the protocol to make decisions based on what was negotiated. While we > > could easily add a 'bool exte

Re: [PATCH v4 06/24] nbd/client: Simplify cookie vs. index computation

2023-06-12 Thread Eric Blake
On Mon, Jun 12, 2023 at 05:27:19PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 08.06.23 16:56, Eric Blake wrote: > > Our code relies on a sentinel cookie value of zero for deciding when a > > packet has been handled, as well as relying on array indices between 0 > > and MAX_NBD_REQUESTS-1 for d

Re: [PATCH 2/5] cmd646: create separate header and QOM type for CMD646_IDE

2023-06-12 Thread Mark Cave-Ayland
On 12/06/2023 10:21, Bernhard Beschow wrote: Am 9. Juni 2023 18:51:16 UTC schrieb Mark Cave-Ayland : This will enable CMD646-specific fields to be added to CMD6464IDEState in future. Signed-off-by: Mark Cave-Ayland --- hw/ide/cmd646.c | 4 +++- include/hw/ide/cmd646.h | 38 ++

Re: [PATCH v4 11/24] nbd: Add types for extended headers

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, 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 and server, matching recent upstream nbd.git (through commit e6f3b94a934). This patch does not change any existing behavi

Re: [PATCH v4 10/24] nbd/client: Pass mode through to nbd_send_request

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Once the 64-bit headers extension is enabled, the data layout we send over the wire for a client request depends on the mode negotiated with the server. Rather than adding a parameter to nbd_send_request, we can add a member to struct NBDRequest, since it alr

Re: [PATCH v4 09/24] nbd: Replace bool structured_reply with mode enum

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: The upcoming patches for 64-bit extensions requires various points in the protocol to make decisions based on what was negotiated. While we could easily add a 'bool extended_headers' alongside the existing 'bool structured_reply', this does not scale well if

Re: [PATCH v4 08/24] nbd: Use enum for various negotiation modes

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Deciphering the hard-coded list of integer return values from nbd_start_negotiate() will only get more confusing when adding support for 64-bit extended headers. Better is to name things in an enum. Although the function in question is private to client.c, pu

Re: [PATCH v4 06/24] nbd/client: Simplify cookie vs. index computation

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Our code relies on a sentinel cookie value of zero for deciding when a packet has been handled, as well as relying on array indices between 0 and MAX_NBD_REQUESTS-1 for dereferencing purposes. As long as we can symmetrically convert between two forms, there i

Re: [PATCH v4 05/24] nbd: s/handle/cookie/ to match NBD spec

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, Eric Blake wrote: Externally, libnbd exposed the 64-bit opaque marker for each client NBD packet as the "cookie", because it was less confusing when contrasted with 'struct nbd_handle *' holding all libnbd state. It also avoids confusion between the nown 'handle' as a way to i

Re: [PATCH v4 03/24] nbd/server: Prepare for alternate-size headers

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 16:56, 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 headers will change in order to permit a 64-bit length in the reply for symmetry[2]. Additionally, where the reply he

Re: [PATCH 1/5] cmd646: checkpatch fixes

2023-06-12 Thread Philippe Mathieu-Daudé
On 9/6/23 20:51, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/ide/cmd646.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 4/5] cmd646: rename cmd646_bmdma_ops to bmdma_ops

2023-06-12 Thread Philippe Mathieu-Daudé
On 9/6/23 20:51, Mark Cave-Ayland wrote: This is to allow us to use the cmd646_bmdma_ops name for the CMD646 device-specific registers in the next commit. Signed-off-by: Mark Cave-Ayland --- hw/ide/cmd646.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mat

Re: [PATCH 2/5] cmd646: create separate header and QOM type for CMD646_IDE

2023-06-12 Thread Bernhard Beschow
Am 9. Juni 2023 18:51:16 UTC schrieb Mark Cave-Ayland : >This will enable CMD646-specific fields to be added to CMD6464IDEState in >future. > >Signed-off-by: Mark Cave-Ayland >--- > hw/ide/cmd646.c | 4 +++- > include/hw/ide/cmd646.h | 38 ++ > 2 file

Re: [Libguestfs] [PATCH v4 02/24] nbd: Consistent typedef usage in header

2023-06-12 Thread Vladimir Sementsov-Ogievskiy
On 08.06.23 17:17, Eric Blake wrote: On Thu, Jun 08, 2023 at 08:56:31AM -0500, Eric Blake wrote: We had a mix of struct declarataions followed by typedefs, and direct declarations struct definitions as part of a typedef. Pick a single style. Also float a couple of opaque typedefs earlier i