Re: [PATCH 00/23] E500 Cleanup

2024-09-26 Thread Bernhard Beschow
Am 24. September 2024 08:33:26 UTC schrieb "Cédric Le Goater" : >On 9/23/24 23:25, Bernhard Beschow wrote: >> >> >> >> Am 23. September 2024 20:23:54 UTC schrieb "Cédric Le Goater" >> : >>> Hello Bernhard, >> >> Hi Cédric, >> >>> >>> On 9/23/24 11:29, Bernhard Beschow wrote: This ser

Re: [PATCH v2] tests/qemu-iotests/testenv: Use the "r2d" machine for sh4

2024-09-26 Thread Michael Tokarev
25.09.2024 10:24, Thomas Huth wrote: Commit 0ea0538fae516f9b4 removed the default machine of the sh4 binaries, so a lot of iotests are failing now without such a default machine. Teach the iotest harness to use the "r2d" machine instead to fix this problem. Signed-off-by: Thomas Huth --- v2:

Re: [PATCH v2] tests/qemu-iotests/testenv: Use the "r2d" machine for sh4

2024-09-26 Thread Thomas Huth
On 26/09/2024 12.24, Michael Tokarev wrote: 25.09.2024 10:24, Thomas Huth wrote: Commit 0ea0538fae516f9b4 removed the default machine of the sh4 binaries, so a lot of iotests are failing now without such a default machine. Teach the iotest harness to use the "r2d" machine instead to fix this pro

[PATCH v13 03/10] scsi/constant: add persistent reservation in/out protocol constants

2024-09-26 Thread Changqi Lu
Add constants for the persistent reservation in/out protocol in the scsi/constant module. The constants include the persistent reservation command, type, and scope values defined in sections 6.13 and 6.14 of the SCSI Primary Commands-4 (SPC-4) specification. Signed-off-by: Changqi Lu Signed-off-b

[PATCH v13 04/10] scsi/util: add helper functions for persistent reservation types conversion

2024-09-26 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the persistent reservation types used in the SCSI protocol and those used in the block layer. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: Stefan Hajnoczi --- include/scsi/utils.h | 8 +

[PATCH v13 01/10] block: add persistent reservation in/out api

2024-09-26 Thread Changqi Lu
Add persistent reservation in/out operations at the block level. The following operations are included: - read_keys:retrieves the list of registered keys. - read_reservation: retrieves the current reservation status. - register: registers a new reservation key. - reserve:

[PATCH v13 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-09-26 Thread Changqi Lu
Add persistent reservation in/out operations in the SCSI device layer. By introducing the persistent reservation in/out api, this enables the SCSI device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservation keys, initiating and releasin

[PATCH v13 07/10] hw/nvme: add helper functions for converting reservation types

2024-09-26 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the reservation types used in the NVME protocol and those used in the block layer. Reviewed-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h |

[PATCH v13 08/10] hw/nvme: enable ONCS and rescap function

2024-09-26 Thread Changqi Lu
This commit enables ONCS to support the reservation function at the controller level. Also enables rescap function in the namespace by detecting the supported reservation function in the backend driver. Reviewed-by: Klaus Jensen Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: S

[PATCH v13 00/10] Support persistent reservation operations

2024-09-26 Thread Changqi Lu
Hi, Patch v13 has been modified, thanks to Stefan for the code review. v12->v13: - Fix byte swaps at hw/nvme/ctrl.c. v11->v12: - Fixed endian conversion during command parsing; - Add the maximum number of keys, currently limited to 128. v10->v11: - Before executing the pr operation, check wheth

[PATCH v13 10/10] block/iscsi: add persistent reservation in/out driver

2024-09-26 Thread Changqi Lu
Add persistent reservation in/out operations for iscsi driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: z

[PATCH v13 06/10] block/nvme: add reservation command protocol constants

2024-09-26 Thread Changqi Lu
Add constants for the NVMe persistent command protocol. The constants include the reservation command opcode and reservation type values defined in section 7 of the NVMe 2.0 specification. Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h

[PATCH v13 09/10] hw/nvme: add reservation protocal command

2024-09-26 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservati

[PATCH v13 02/10] block/raw: add persistent reservation in/out driver

2024-09-26 Thread Changqi Lu
Add persistent reservation in/out operations for raw driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: zhe

Re: [PATCH v2] tests/qemu-iotests/testenv: Use the "r2d" machine for sh4

2024-09-26 Thread Michael Tokarev
26.09.2024 13:55, Thomas Huth wrote: .. I'm planning to provide a patch to remove sh4eb-softmmu completely (since it is useless nowadays) ... I can add it there, too. That'll do it too, for sure. Thanks, /mjt

Re: [PATCH v4] scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout

2024-09-26 Thread Alberto Garcia
ping On Tue, Jul 30, 2024 at 04:15:52PM +0200, Alberto Garcia wrote: > This tool converts a disk image to qcow2, writing the result directly > to stdout. This can be used for example to send the generated file > over the network.

[PATCH 2/2] hw/block/xen-block: Update sector-size handling

2024-09-26 Thread Anthony PERARD
The use of "feature-large-sector-size" have been removed from the protocol, as it hasn't been evenly implemented across all backend and frontend. Linux for example will happily expose "sector-size" != 512 even when "feature-large-sector-size" hasn't been set by the frontend. The specification have

[PATCH 0/2] Xen: Update sector-size handling in block backend

2024-09-26 Thread Anthony PERARD
The specification have been clarified regarding what "sector" is in Xen PV block protocol by Xen commit 221f2748e8da ("blkif: reconcile protocol specification with in-use implementations") and "feature-large-sector-size" have been removed. https://xenbits.xenproject.org/gitweb/?p=xen.git;a=commit;

Re: [PATCH v2 1/1] hw/nvme: add atomic write support

2024-09-26 Thread alan . adamson
On 9/24/24 5:15 AM, Klaus Jensen wrote: On Sep 19 17:07, Alan Adamson wrote: Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic. Ne

[PATCH 04/27] qemu-img: pass current cmd info into command handlers

2024-09-26 Thread Michael Tokarev
This info will be used to generate --help output. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 130188e287..e8234104e5 100644 --

[PATCH resend v3 00/27] qemu-img: refersh options and --help handling, cleanups

2024-09-26 Thread Michael Tokarev
This is a re-send of this patchset from Apr-24, after multiple pings. I rebased it on top of current qemu/master, though nothing has really changed - it is still the same changes. We should either apply it or drop it if it is not appropriate for some reason. Complete silence for half a year isn't

[PATCH 02/27] qemu-img: create: convert img_size to signed, simplify handling

2024-09-26 Thread Michael Tokarev
Initializing an unsigned as -1, or using temporary sval for conversion is awkward. Since we don't allow other "negative" values anyway, use signed value and pass it to bdrv_img_create() (where it is properly converted to unsigned), simplifying code. Signed-off-by: Michael Tokarev Reviewed-by: Da

[PATCH 01/27] qemu-img: measure: convert img_size to signed, simplify handling

2024-09-26 Thread Michael Tokarev
qemu_opt_set_number() expects signed int64_t. Use int64_t instead of uint64_t for img_size, use -1 as "unset" value instead of UINT64_MAX, and do not require temporary sval for conversion from string. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 19 +++---

[PATCH v3 0/1] hw/nvme: add atomic write support

2024-09-26 Thread Alan Adamson
Changelog: v3: - Use cpu_to_le16() to properly handle endianness. - Use 'continue' rather than'break' when walking SQs. - No need to lock all the SQs when walking them so remove atomic_lock since it is running from the main loop. v2: - Include changes suggested by

[PATCH 21/27] qemu-img: bench: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 64 +- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 76000c485c..fff537df26 100644 --- a/qemu-img.c +++

[PATCH 25/27] qemu-img: implement short --help, remove global help() function

2024-09-26 Thread Michael Tokarev
now once all individual subcommands has --help support, remove the large unreadable help() thing and replace it with small global --help, which refers to individual command --help for more info. While at it, also line-wrap list of formats after 75 chars. Since missing_argument() and unrecognized_

[PATCH 08/27] qemu-img: simplify --repair error message

2024-09-26 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 1bd88fcf63..9157a6b45d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -859,8 +859,9 @@ static int img_check(const img_

[PATCH 15/27] qemu-img: snapshot: make -l (list) the default, simplify option handling

2024-09-26 Thread Michael Tokarev
When no -l/-a/-c/-d specified, assume -l (list). Use the same values for SNAPSHOT_LIST/etc constants as the option chars (lacd), this makes it possible to simplify option handling a lot, combining cases for 4 options into one. Also remove bdrv_oflags handling (only list can use RO mode). Signed-

[PATCH 14/27] qemu-img: snapshot: allow specifying -f fmt

2024-09-26 Thread Michael Tokarev
For consistency with other commands, and since it already accepts --image-opts, allow specifying -f fmt too. Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- docs/tools/qemu-img.rst | 2 +- qemu-img-cmds.hx| 4 ++-- qemu-img.c | 9 ++--- 3 files change

[PATCH 19/27] qemu-img: resize: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 38 +- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index da10fafffc..688c01722c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -

[PATCH 09/27] qemu-img: commit: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 44 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9157a6b45d..7a111bce72 100644 --- a/qemu-img.c +++ b/qemu-img.

[PATCH 06/27] qemu-img: factor out parse_output_format() and use it in the code

2024-09-26 Thread Michael Tokarev
Use common code and simplify error message Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 63 -- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7ed5e6d1a8..0853655

[PATCH 17/27] qemu-img: rebase: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Options added: --format, --cache - for the image in question --backing, --backing-format, --backing-cache, --backing-unsafe - for the new backing file (was eg CACHE vs SRC_CACHE, which is unclear). Probably should rename local variables. Signed-of

[PATCH 27/27] qemu-img: extend cvtnum() and use it in more places

2024-09-26 Thread Michael Tokarev
cvtnum() expects input string to specify some sort of size (optionally with KMG... suffix). However, there are a lot of other number conversions in there (using qemu_strtol &Co), also, not all conversions which use cvtnum, actually expects size, - like dd count=nn. Add bool issize argument to cvt

[PATCH 23/27] qemu-img: dd: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7c20a5772d..b3e521bc09 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PATCH 05/27] qemu-img: create: refresh options/--help

2024-09-26 Thread Michael Tokarev
Create helper function cmd_help() to display command-specific help text, and use it to print --help for 'create' subcommand. Add missing long options (eg --format) in img_create(). Remove usage of missing_argument()/unrecognized_option() in img_create(). Signed-off-by: Michael Tokarev --- qemu

[PATCH 24/27] qemu-img: measure: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Also add -s short option for --size (and remove OPTION_SIZE). Signed-off-by: Michael Tokarev --- qemu-img.c | 53 - 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/qemu-img.c b/qemu-i

[PATCH 26/27] qemu-img: inline list of supported commands, remove qemu-img-cmds.h include

2024-09-26 Thread Michael Tokarev
also add short description to each command and use it in --help Signed-off-by: Michael Tokarev Reviewed-by: Daniel P. Berrangé --- qemu-img.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 39dfaa5144..6

[PATCH 12/27] qemu-img: info: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Also add -b short option for --backing-chain, and remove now-unused OPTION_BACKING_CHAIN. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 +++- 1 file changed, 27

[PATCH 13/27] qemu-img: map: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. While at it, remove unused option_index variable. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 34c4cd86de..84e2e53f

[PATCH 07/27] qemu-img: check: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 08536553c7..1bd88fcf63 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -

[PATCH 03/27] qemu-img: global option processing and error printing

2024-09-26 Thread Michael Tokarev
In order to correctly print executable name in various error messages, pass argv[0] to error_exit() function. This way, error messages will refer to actual executable name, which may be different from 'qemu-img'. For subcommands, pass original command name from the qemu-img argv[0], plus the subco

[PATCH 16/27] qemu-img: snapshot: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 45 - 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 967f6343de..62f9ce4069 100644 --- a/qemu-img.c +++ b/qemu-img

[PATCH 20/27] qemu-img: amend: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 688c01722c..76000c485c 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -4559

[PATCH 10/27] qemu-img: compare: refresh options/--help

2024-09-26 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qemu-img.c | 45 + 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 7a111bce72..ea66bfa195 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1488,25 +1488,52 @@ static int img_com

[PATCH 11/27] qemu-img: convert: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. convert uses -B for --backing, - why not -b? Signed-off-by: Michael Tokarev --- qemu-img.c | 90 -- 1 file changed, 81 insertions(+), 9 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ea66bf

[PATCH 18/27] qemu-img: resize: do not always eat last argument

2024-09-26 Thread Michael Tokarev
'qemu-img resize --help' does not work, since it wants more arguments. Also -size is only recognized as a very last argument, but it is common for tools to handle other options after positional arguments too. Tell getopt_long() to return non-options together with options, and process filename and

[PATCH 22/27] qemu-img: bitmap: refresh options/--help

2024-09-26 Thread Michael Tokarev
Add missing long options and --help output. Signed-off-by: Michael Tokarev --- qemu-img.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index fff537df26..7c20a5772d 100644 --- a/qemu-img.c +++ b/qemu-img.c @@

[PATCH v3 1/1] hw/nvme: add atomic write support

2024-09-26 Thread Alan Adamson
Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic. New NVMe QEMU Parameters (See NVMe Specification for details): atomic.dn (def