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

2024-08-29 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 v10 04/10] scsi/util: add helper functions for persistent reservation types conversion

2024-08-29 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 v10 00/10] Support persistent reservation operations

2024-08-29 Thread Changqi Lu
Hi, Patch v10 has been modified, thanks to Klaus for the code review. v9->v10: - When the driver does not support the pr operation, the error code returned by nvme changes to Invalid Command Opcode. v8->v9: - Fix double-free and remove persistent reservation operations at nvme_is_write(). v7

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

2024-08-29 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

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

2024-08-29 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 v10 07/10] hw/nvme: add helper functions for converting reservation types

2024-08-29 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 v10 08/10] hw/nvme: enable ONCS and rescap function

2024-08-29 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 v10 09/10] hw/nvme: add reservation protocal command

2024-08-29 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 v10 10/10] block/iscsi: add persistent reservation in/out driver

2024-08-29 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 v10 03/10] scsi/constant: add persistent reservation in/out protocol constants

2024-08-29 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 v10 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-08-29 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] iotests: fix expected output from gnutls in NBD test

2024-08-29 Thread Daniel P . Berrangé
Error reporting from gnutls was improved by: commit 57941c9c86357a6a642f9ee3279d881df4043b6d Author: Daniel P. Berrangé Date: Fri Mar 15 14:07:58 2024 + crypto: push error reporting into TLS session I/O APIs This has the effect of changing the output from one of the NBD tests.

Re: [PULL 10/11] crypto: push error reporting into TLS session I/O APIs

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 28, 2024 at 10:32:15AM +0200, Thomas Huth wrote: > On 27/08/2024 09.05, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Mon, Aug 12, 2024 at 05:38:41PM +0200, Thomas Huth wrote: > > > > On 24/07/2024 11.47, Daniel P. Berrangé wrote: > > > > > The current TLS sessi

Re: [PATCH] iotests: fix expected output from gnutls in NBD test

2024-08-29 Thread Thomas Huth
On 29/08/2024 13.02, Daniel P. Berrangé wrote: Error reporting from gnutls was improved by: commit 57941c9c86357a6a642f9ee3279d881df4043b6d Author: Daniel P. Berrangé Date: Fri Mar 15 14:07:58 2024 + crypto: push error reporting into TLS session I/O APIs This has the effec

[PATCH 1/1] m25p80: Add SFDP table for mt35xu01gbba flash device

2024-08-29 Thread Shiva sagar Myana
The SFDP table size is 0x100 bytes long. The basic features are available at byte 0x30. Signed-off-by: Shiva sagar Myana --- hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 37 + hw/block/m25p80_sfdp.h | 1 + 3 files changed, 40 insertions(+), 1 del

[PATCH v2 1/1] m25p80: Add SFDP table for mt35xu01g flash

2024-08-29 Thread Shiva sagar Myana
Add the SFDP table for the Micron Xccela mt35xu01g flash. Signed-off-by: Shiva sagar Myana --- V1->V2: Change subject and commit message hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 37 + hw/block/m25p80_sfdp.h | 1 + 3 files changed, 40 inserti

[PATCH] raw-format: Fix error message for invalid offset/size

2024-08-29 Thread Kevin Wolf
s->offset and s->size are only set at the end of the function and still contain the old values when formatting the error message. Print the parameters with the new values that we actually checked instead. Fixes: 500e2434207d ('raw-format: Split raw_read_options()') Signed-off-by: Kevin Wolf ---

Re: [PATCH v4 6/7] memory: Do not create circular reference with subregion

2024-08-29 Thread Peter Xu
On Thu, Aug 29, 2024 at 01:39:36PM +0900, Akihiko Odaki wrote: > > > I am calling the fact that embedded memory regions are accessible in > > > instance_finalize() "live". A device can perform operations on its memory > > > regions during instance_finalize() and we should be aware of that. > > > >

Re: [PATCH] raw-format: Fix error message for invalid offset/size

2024-08-29 Thread Daniel P . Berrangé
On Thu, Aug 29, 2024 at 08:55:27PM +0200, Kevin Wolf wrote: > s->offset and s->size are only set at the end of the function and still > contain the old values when formatting the error message. Print the > parameters with the new values that we actually checked instead. > > Fixes: 500e2434207d ('r

Re: [PATCH v4 6/7] memory: Do not create circular reference with subregion

2024-08-29 Thread Akihiko Odaki
On 2024/08/30 4:48, Peter Xu wrote: On Thu, Aug 29, 2024 at 01:39:36PM +0900, Akihiko Odaki wrote: I am calling the fact that embedded memory regions are accessible in instance_finalize() "live". A device can perform operations on its memory regions during instance_finalize() and we should be aw