[PATCH v2 09/15] hw/block/nvme: Define Zoned NS Command Set trace events

2020-09-12 Thread Dmitry Fomichev
The Zoned Namespace Command Set / Namespace Types implementation that is being introduced in this series adds a good number of trace events. Combine all tracepoint definitions into a separate patch to make reviewing more convenient. Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 26

[PATCH v2 14/15] hw/block/nvme: Use zone metadata file for persistence

2020-09-12 Thread Dmitry Fomichev
ptor extensions also persist across controller shutdowns. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 370 +--- hw/block/nvme.h | 37 + 2 files changed, 386 insertions(+), 21 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvm

[PATCH v2 06/15] hw/block/nvme: Add support for Namespace Types

2020-09-12 Thread Dmitry Fomichev
las Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 208 +++- 1 file changed, 188 insertions(+), 20 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 4bd88f4046..004f1c9578 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c

[PATCH v2 12/15] hw/block/nvme: Support Zone Descriptor Extensions

2020-09-12 Thread Dmitry Fomichev
n-zero, it becomes possible to assign extensions of that size to any Empty zones. The default value for this property is 0, therefore setting extensions is disabled by default. Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev Reviewed-by: Klaus Jensen --- hw/block/n

[PATCH v2 08/15] hw/block/nvme: Make Zoned NS Command Set definitions

2020-09-12 Thread Dmitry Fomichev
more fields that are internal to this implementation. Signed-off-by: Niklas Cassel Signed-off-by: Hans Holmberg Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Alexey Bogoslavsky Signed-off-by: Dmitry Fomichev --- hw/bl

[PATCH v2 00/15] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-12 Thread Dmitry Fomichev
l *** BLURB HERE *** Ajay Joshi (1): hw/block/nvme: Define 64 bit cqe.result Dmitry Fomichev (11): hw/block/nvme: Report actual LBA data shift in LBAF hw/block/nvme: Add Commands Supported and Effects log hw/block/nvme: Define trace events related to NS Types hw/block/nvme: Make Zon

[PATCH v2 13/15] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-09-12 Thread Dmitry Fomichev
re expected to be much smaller than the total number of zones on a drive. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 46 ++ hw/block/nvme.h | 2 ++ 2 files changed, 48 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index ec7fade6

[PATCH v2 04/15] hw/block/nvme: Introduce the Namespace Types definitions

2020-09-12 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- hw/block/nvme.h | 3 ++ include/block/nvme.h | 74

[PATCH v2 05/15] hw/block/nvme: Define trace events related to NS Types

2020-09-12 Thread Dmitry Fomichev
A few trace events are defined that are relevant to implementing Namespace Types (NVMe TP 4056). Signed-off-by: Dmitry Fomichev Reviewed-by: Klaus Jensen --- hw/block/trace-events | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events

[PATCH v2 02/15] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-12 Thread Dmitry Fomichev
LBA formats in the future. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 4 +++- hw/block/nvme.h | 11 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 3a90d80694..1cfc136042 100644 --- a/hw/block/nvme.c +++ b/hw/block

[PATCH v2 15/15] hw/block/nvme: Document zoned parameters in usage text

2020-09-12 Thread Dmitry Fomichev
Added brief descriptions of the new device properties that are now available to users to configure features of Zoned Namespace Command Set in the emulator. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 43

[PATCH v2 03/15] hw/block/nvme: Add Commands Supported and Effects log

2020-09-12 Thread Dmitry Fomichev
-by: Dmitry Fomichev --- hw/block/nvme.c | 44 ++- hw/block/trace-events | 2 ++ include/block/nvme.h | 19 +++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1cfc136042

[PATCH v2 11/15] hw/block/nvme: Introduce max active and open zone limits

2020-09-12 Thread Dmitry Fomichev
if they are exceeded. Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 179 +++- hw/block/nvme.h | 4 ++ 2 files changed, 181 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 1b0e06002

[PATCH v2 07/15] hw/block/nvme: Add support for active/inactive namespaces

2020-09-12 Thread Dmitry Fomichev
added functionality will also simplify the implementation of namespace management in the future, since namespace management can also attach and detach namespaces. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 54

[PATCH v2 01/15] hw/block/nvme: Define 64 bit cqe.result

2020-09-12 Thread Dmitry Fomichev
changed from 32 to 64 bit, consuming the reserved 32 bit field that follows the result in CQE struct. Since the existing commands are expected to return a 32 bit LE value, two separate variables, result32 and result64, are now kept in a union. Signed-off-by: Ajay Joshi Signed-off-by: Dmitry Fomichev

RE: [PATCH v4 2/2] file-posix: add sg_get_max_segments that actually works with sg

2020-09-06 Thread Dmitry Fomichev
> -Original Message- > From: Qemu-block bounces+dmitry.fomichev=wdc@nongnu.org> On Behalf Of Maxim > Levitsky > Sent: Sunday, September 6, 2020 1:06 PM > To: Tom Yan ; ebl...@redhat.com; > pbonz...@redhat.com; f...@euphon.net; anie...@linux.vnet.ibm.com; > kw...@redhat.com; mre...@re

[PATCH 1/2] file-posix: Correctly read max_segments of SG nodes

2020-08-11 Thread Dmitry Fomichev
: 9103f1ceb46614b150bcbc3c9a4fbc72b47fedcc Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 55 +++--- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 094e3b0212..f9e2424e8f 100644 --- a/block/file

[PATCH 0/2] block;scsi-generic: Fix max transfer size calculation

2020-08-11 Thread Dmitry Fomichev
correctly handle SG nodes. The following two patches fix these problems. Based-on: <20200424084338.26803-16-arm...@redhat.com> Dmitry Fomichev (2): file-posix: Correctly read max_segments of SG nodes scsi-generic: Fix HM-zoned device scan block/file-po

[PATCH 2/2] scsi-generic: Fix HM-zoned device scan

2020-08-11 Thread Dmitry Fomichev
. Several scan steps that were previously done only for TYPE_DISK devices, are now performed for the SCSI devices having TYPE_ZBC too. Reported-by: Johannes Thumshirn Signed-off-by: Dmitry Fomichev --- hw/scsi/scsi-generic.c | 10 ++ include/scsi/constants.h | 1 + 2 files changed, 7

Re: [PATCH v3 4/4] hw/block/nvme: Align I/O BAR to 4 KiB

2020-07-12 Thread Dmitry Fomichev
ize = pow2ceil(sizeof(NvmeBar) + > 2 * (n->params.max_ioqpairs + 1) * NVME_DB_SIZE); > n->namespaces = g_new0(NvmeNamespace, n->num_namespaces); > n->sq = g_new0(NvmeSQueue *, n->params.max_ioqpairs + 1); > -- > 2.21.3 > > Reviewed-by: Dmitry Fomichev

Re: [PATCH v3 3/4] hw/block/nvme: Fix pmrmsc register size

2020-07-12 Thread Dmitry Fomichev
gt; uint32_tpmrswtp; > -uint32_tpmrmsc; > +uint64_t pmrmsc; > } NvmeBar; > > enum NvmeCapShift { > -- > 2.21.3 > > Reviewed-by: Dmitry Fomichev

Re: [PATCH v3 2/4] hw/block/nvme: Use QEMU_PACKED on hardware/packet structures

2020-07-12 Thread Dmitry Fomichev
> +typedef struct QEMU_PACKED NvmeRangeType { > uint8_t type; > uint8_t attributes; > uint8_t rsvd2[14]; > @@ -817,13 +817,13 @@ typedef struct NvmeRangeType { > uint8_t rsvd48[16]; > } NvmeRangeType; > > -typedef struct NvmeLBAF { > +typedef struct QEMU_PACKED NvmeLBAF { > uint16_tms; > uint8_t ds; > uint8_t rp; > } NvmeLBAF; > > -typedef struct NvmeIdNs { > +typedef struct QEMU_PACKED NvmeIdNs { > uint64_tnsze; > uint64_tncap; > uint64_tnuse; > -- > 2.21.3 > > Reviewed-by: Dmitry Fomichev

Re: [PATCH v3 1/4] hw/block/nvme: Update specification URL

2020-07-08 Thread Dmitry Fomichev
> * > - * http://www.nvmexpress.org/resources/ > + * https://nvmexpress.org/developers/nvme-specification/ > */ > > /** > -- > 2.21.3 > > Reviewed-by: Dmitry Fomichev

RE: [PATCH v3 01/18] hw/block/nvme: bump spec data structures to v1.3

2020-07-08 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Wednesday, July 8, 2020 5:24 PM > To: Dmitry Fomichev > Cc: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; f...@euphon.net; > javier.g...@samsung.com; kw...@redhat.com; mre...@redhat.com; > mlevi...@redhat.com; p

Re: [PATCH v3 15/18] hw/block/nvme: reject invalid nsid values in active namespace id list

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-07-06 at 08:13 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Reject the nsid broadcast value (0x) and 0xfffe in the > Active Namespace ID list. > > Signed-off-by: Klaus Jensen > --- &g

Re: [PATCH v3 17/18] hw/block/nvme: provide the mandatory subnqn field

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-07-06 at 08:13 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The SUBNQN field is mandatory in NVM Express 1.3. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 5 + > 1 file changed, 5 inserti

Re: [PATCH v3 12/18] hw/block/nvme: support the get/set features select and save fields

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since the device does not have any persistent state storage, no > features are "saveable" and setting the Save (SV) field in any Set > Features

Re: [PATCH v3 05/18] hw/block/nvme: add temperature threshold feature

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > It might seem weird to implement this feature for an emulated device, > but it is mandatory to support and the feature is useful for testing > asynchronou

Re: [PATCH v3 07/18] hw/block/nvme: add support for the get log page command

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Get Log Page command and basic implementations of > the mandatory Error Information, SMART / Health Information and Firmware > Slot

Re: [PATCH v3 03/18] hw/block/nvme: additional tracing

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add various additional tracing and streamline nvme_identify_ns and > nvme_identify_nslist (they do not need to repeat the command, it is > already

Re: [PATCH v3 02/18] hw/block/nvme: fix missing endian conversion

2020-07-08 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Fix a missing cpu_to conversion by moving conversion to just before > returning instead. > > Signed-off-by: Klaus Jensen > Suggested-by

Re: [PATCH v3 01/18] hw/block/nvme: bump spec data structures to v1.3

2020-07-08 Thread Dmitry Fomichev
Looks good with a small nit (see below), Reviewed-by: Dmitry Fomichev > On Mon, 2020-07-06 at 08:12 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add missing fields in the Identify Controller and Identify Namespace > data structures to bring them in line with NVMe v1.3.

Re: [PATCH 16/17] hw/block/nvme: provide the mandatory subnqn field

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The SUBNQN field is mandatory in NVM Express 1.3. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 3

Re: [PATCH 15/17] hw/block/nvme: enforce valid queue creation sequence

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Support returning Command Sequence Error if Set Features on Number of > Queues is called after queues have been created. > > Signed-off-by: Klaus Jen

Re: [PATCH 13/17] hw/block/nvme: make sure ncqr and nsqr is valid

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > 0x is not an allowed value for NCQR and NSQR in Set Features on > Number of Queues. > > Signed-off-by: Klaus Jensen > Acked-by: Keith Busch

Re: [PATCH 12/17] hw/block/nvme: support the get/set features select and save fields

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since the device does not have any persistance state storage, no > features are "saveable" and setting the Save (SV) field in any Set > Features command will result in a Feature Identifier Not Saveable status > code.

Re: [PATCH 17/17] hw/block/nvme: bump supported version to v1.3

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Bump the supported NVM Express version to v1.3. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 4 +

Re: [PATCH 14/17] hw/block/nvme: support identify namespace descriptor list

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Since we are not providing the NGUID or EUI64 fields, we must support > the Namespace UUID. We do not have any way of storing a persistent > unique identif

Re: [PATCH 09/17] hw/block/nvme: flush write cache when disabled

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > If the write cache is disabled with a Set Features command, flush it if > currently enabled. > > Signed-off-by: Klaus Jensen > --- > hw/block/n

Re: [PATCH 07/17] hw/block/nvme: add support for the asynchronous event request command

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Asynchronous Event Request command. Required for > compliance with NVMe revision 1.3d. See NVM Express 1.3d, Section 5.2 > ("Asynch

Re: [PATCH 06/17] hw/block/nvme: add support for the get log page command

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for the Get Log Page command and basic implementations of > the mandatory Error Information, SMART / Health Information and Firmware > Slot Information log pages. > > In violation of the specification, th

Re: [PATCH 11/17] hw/block/nvme: add remaining mandatory controller parameters

2020-07-02 Thread Dmitry Fomichev
LGTM with one small nit (see below)... Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for any remaining mandatory controller operating parameters > (features). > > Signed-off-by: Klaus Jensen > -

Re: [PATCH 08/17] hw/block/nvme: move NvmeFeatureVal into hw/block/nvme.h

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The NvmeFeatureVal does not belong with the spec-related data structures > in include/block/nvme.h that is shared between the block-level nvme > driver a

Re: [PATCH 04/17] hw/block/nvme: add temperature threshold feature

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > It might seem weird to implement this feature for an emulated device, > but it is mandatory to support and the feature is useful for testing > asynchronous event request support, which will be added in a later > patch

Re: [PATCH 02/17] hw/block/nvme: additional tracing

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add various additional tracing and streamline nvme_identify_ns and > nvme_identify_nslist (they do not need to repeat the command, it is > already in

Re: [PATCH 10/17] hw/block/nvme: fix missing endian conversion

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Fix a missing cpu_to conversion. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH 05/17] hw/block/nvme: mark fw slot 1 as read-only

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Mark firmware slot 1 as read-only and only support that slot. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 3 ++- > include/bl

Re: [PATCH 01/17] hw/block/nvme: bump spec data structures to v1.3

2020-07-02 Thread Dmitry Fomichev
On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Add missing fields in the Identify Controller and Identify Namespace > data structures to bring them in line with NVMe v1.3. > > This also adds data structures and defines for SGL support which > requires a couple of

Re: [PATCH 03/17] hw/block/nvme: add support for the abort command

2020-07-02 Thread Dmitry Fomichev
Looks good, Reviewed-by: Dmitry Fomichev On Mon, 2020-06-29 at 20:26 +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Required for compliance with NVMe revision 1.3d. See NVM Express 1.3d, > Section 5.1 ("Abort command"). > > The Abort command is a best effort

RE: [PATCH 00/10] hw/block/nvme: namespace types and zoned namespaces

2020-06-30 Thread Dmitry Fomichev
> -Original Message- > From: Klaus Jensen > Sent: Tuesday, June 30, 2020 4:30 PM > To: Niklas Cassel > Cc: qemu-bl...@nongnu.org; Klaus Jensen ; > qemu-devel@nongnu.org; Keith Busch ; Max Reitz > ; Kevin Wolf ; Javier Gonzalez > ; Maxim Levitsky ; > Phil

RE: [PATCH v2 00/18] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-06-29 Thread Dmitry Fomichev
Bump... Any feedback on this series? > -Original Message- > From: Dmitry Fomichev > Sent: Wednesday, June 17, 2020 5:34 PM > To: Kevin Wolf ; Keith Busch ; > Philippe Mathieu-Daudé ; Maxim Levitsky > > Cc: qemu-bl...@nongnu.org; qemu-devel@nongnu.org; Matias Bjorli

[PATCH v2 11/18] hw/block/nvme: Introduce max active and open zone limits

2020-06-17 Thread Dmitry Fomichev
if they are exceeded. Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 183 +++- hw/block/nvme.h | 4 ++ 2 files changed, 185 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2e

[PATCH v2 04/18] hw/block/nvme: Add Commands Supported and Effects log

2020-06-17 Thread Dmitry Fomichev
-by: Dmitry Fomichev --- hw/block/nvme.c | 62 +++ hw/block/trace-events | 4 +++ include/block/nvme.h | 18 + 3 files changed, 84 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index a1bbc9acde..03b8deee85 100644 --- a/hw

[PATCH v2 00/18] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-06-17 Thread Dmitry Fomichev
com> Ajay Joshi (1): hw/block/nvme: Define 64 bit cqe.result Dmitry Fomichev (15): hw/block/nvme: Move NvmeRequest has_sg field to a bit flag hw/block/nvme: Clean up unused AER definitions hw/block/nvme: Add Commands Supported and Effects log hw/block/nvme: Define trace events related to NS

[PATCH v2 18/18] hw/block/nvme: Document zoned parameters in usage text

2020-06-17 Thread Dmitry Fomichev
Added brief descriptions of the new driver properties now available to users to configure features of Zoned Namespace Command Set in the driver. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 62

[PATCH v2 16/18] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-06-17 Thread Dmitry Fomichev
re expected to be much smaller than the total number of drive zones. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 46 ++ hw/block/nvme.h | 2 ++ 2 files changed, 48 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index eb41081627..14

[PATCH v2 10/18] hw/block/nvme: Support Zoned Namespace Command Set

2020-06-17 Thread Dmitry Fomichev
: Hans Holmberg Signed-off-by: Ajay Joshi Signed-off-by: Chaitanya Kulkarni Signed-off-by: Matias Bjorling Signed-off-by: Aravind Ramesh Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Adam Manzanares Signed-off-by: Dmitry Fomichev --- h

[PATCH v2 17/18] hw/block/nvme: Use zone metadata file for persistence

2020-06-17 Thread Dmitry Fomichev
ptor extensions also persist across controller shutdowns. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 371 +--- hw/block/nvme.h | 38 + 2 files changed, 388 insertions(+), 21 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 14

[PATCH v2 14/18] hw/block/nvme: Generate zone AENs

2020-06-17 Thread Dmitry Fomichev
s to read the newly added Changed Zones Log. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 300 ++- hw/block/nvme.h | 13 +- include/block/nvme.h | 23 +++- 3 files changed, 328 insertions(+), 8 deletions(-) diff --git a/hw/block/nvme.

[PATCH v2 09/18] hw/block/nvme: Define Zoned NS Command Set trace events

2020-06-17 Thread Dmitry Fomichev
The Zoned Namespace Command Set / Namespace Types implementation that is being introduced in this series adds a good number of trace events. Combine all tracepoint definitions into a separate patch to make reviewing more convenient. Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 41

[PATCH v2 12/18] hw/block/nvme: Simulate Zone Active excursions

2020-06-17 Thread Dmitry Fomichev
Added a Boolean flag to turn on simulation of Zone Active Excursions. If the flag, "active_excursions", is set to true, the driver will try to finish one of the currently open zone if max active zones limit is going to get exceeded. Signed-off-by: Dmitry Fomichev --- hw/block/n

[PATCH v2 08/18] hw/block/nvme: Make Zoned NS Command Set definitions

2020-06-17 Thread Dmitry Fomichev
more fields that are internal to this implementation. Signed-off-by: Niklas Cassel Signed-off-by: Hans Holmberg Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjorling Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Alexey Bogoslavsky Signed-off-by: Dmitry Fomichev --- hw/bl

[PATCH v2 15/18] hw/block/nvme: Support Zone Descriptor Extensions

2020-06-17 Thread Dmitry Fomichev
s non-zero, it becomes possible to assign extensions of that size to any Empty zones. The default value for this property is 0, therefore setting extensions is disabled by default. Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev --- hw/block/n

[PATCH v2 03/18] hw/block/nvme: Clean up unused AER definitions

2020-06-17 Thread Dmitry Fomichev
in some of these enums. No functional change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.h | 1 - include/block/nvme.h | 43 ++- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/hw/block/nvme.h b/hw/block/nvme.h index 0460cc0e62

[PATCH v2 13/18] hw/block/nvme: Set Finish/Reset Zone Recommended attributes

2020-06-17 Thread Dmitry Fomichev
between setting FZR or RZR attribute and resetting it simulating the internal controller action on that zone. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 99 + hw/block/nvme.h | 13 ++- 2 files changed, 111 insertions(+), 1 deletion

[PATCH v2 07/18] hw/block/nvme: Add support for Namespace Types

2020-06-17 Thread Dmitry Fomichev
ned-off-by: Dmitry Fomichev --- hw/block/nvme.c | 210 ++-- hw/block/nvme.h | 11 +++ 2 files changed, 216 insertions(+), 5 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 03b8deee85..453f4747a5 100644 --- a/hw/block/nvme.c +++ b/hw/bl

[PATCH v2 05/18] hw/block/nvme: Introduce the Namespace Types definitions

2020-06-17 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.h | 3 ++ include/block/nvme.h | 75 +--- 2 files changed, 73

[PATCH v2 06/18] hw/block/nvme: Define trace events related to NS Types

2020-06-17 Thread Dmitry Fomichev
A few trace events are defined that are relevant to implementing Namespace Types (NVMe TP 4056). Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events index 423d491e27..3f3323fe38

[PATCH v2 02/18] hw/block/nvme: Define 64 bit cqe.result

2020-06-17 Thread Dmitry Fomichev
changed from 32 to 64 bit, consuming the reserved 32 bit field that follows the result in CQE struct. Since the existing commands are expected to return a 32 bit LE value, two separate variables, result32 and result64, are now kept in a union. Signed-off-by: Ajay Joshi Signed-off-by: Dmitry Fomichev

[PATCH v2 01/18] hw/block/nvme: Move NvmeRequest has_sg field to a bit flag

2020-06-17 Thread Dmitry Fomichev
In addition to the existing has_sg flag, a few more Boolean NvmeRequest flags are going to be introduced in subsequent patches. Convert "has_sg" variable to "flags" and define NvmeRequestFlags enum for individual flag values. Signed-off-by: Dmitry Fomichev --- hw/block/nvm

[Qemu-devel] [PATCH v7 2/4] raw: Recognize zoned backing devices

2019-09-07 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 75 ++ block/io.c | 5 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/block/file-posix.c

[Qemu-devel] [PATCH v7 1/4] block: Add zoned device model property

2019-09-07 Thread Dmitry Fomichev
host managed zoned block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi --- block.c

[Qemu-devel] [PATCH v7 0/4] virtio/block: handle zoned backing devices

2019-09-07 Thread Dmitry Fomichev
rent code v4 -> v5: - avoid checkpatch warning v5 -> v6: - address review comments from Stefan Hajnoczi v6 -> v7: - address review comment from Stefano Garzarella * fix BLK_PERM_ALL mask * add BLK_PERM_SUPPORT_HM_ZONED permission to QAPI schema * add a text name for BLK_PERM_SUPPORT

[Qemu-devel] [PATCH v7 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_HM_ZONED

2019-09-07 Thread Dmitry Fomichev
this permission to allow or deny opening a zone device by a particular block driver. Signed-off-by: Dmitry Fomichev Acked-by: Paul Durrant Reviewed-by: Stefan Hajnoczi --- hw/block/block.c | 6 +- hw/block/fdc.c | 5 +++-- hw/block/nvme.c | 2 +- hw/block/virtio

[Qemu-devel] [PATCH v7 4/4] raw: Don't open ZBDs if backend can't handle them

2019-09-07 Thread Dmitry Fomichev
Abort opening a zoned device as a raw file in case the chosen block backend driver lacks proper support for this type of storage. Signed-off-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/file

Re: [Qemu-devel] [PATCH v6 1/4] block: Add zoned device model property

2019-09-06 Thread Dmitry Fomichev
On Fri, 2019-09-06 at 23:10 +0200, Stefano Garzarella wrote: > On Fri, Sep 06, 2019 at 04:17:12PM +0000, Dmitry Fomichev wrote: > > On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote: > > > On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote: > > &g

Re: [Qemu-devel] [PATCH v6 1/4] block: Add zoned device model property

2019-09-06 Thread Dmitry Fomichev
On Fri, 2019-09-06 at 10:11 +0200, Stefano Garzarella wrote: > On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote: > > This commit adds Zoned Device Model (as defined in T10 ZBC and > > T13 ZAC standards) as a block driver property, along with some > > us

[Qemu-devel] [PATCH v6 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_HM_ZONED

2019-09-04 Thread Dmitry Fomichev
this permission to allow or deny opening a zone device by a particular block driver. Signed-off-by: Dmitry Fomichev Acked-by: Paul Durrant Reviewed-by: Stefan Hajnoczi --- hw/block/block.c | 8 ++-- hw/block/fdc.c | 5 +++-- hw/block/nvme.c | 2 +- hw/block/virtio

[Qemu-devel] [PATCH v6 2/4] raw: Recognize zoned backing devices

2019-09-04 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 75 ++ block/io.c | 5 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index fb

[Qemu-devel] [PATCH v6 4/4] raw: Don't open ZBDs if backend can't handle them

2019-09-04 Thread Dmitry Fomichev
Abort opening a zoned device as a raw file in case the chosen block backend driver lacks proper support for this type of storage. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c

Re: [Qemu-devel] [Qemu-block] [PATCH v5 0/4] virtio/block: handle zoned backing devices

2019-09-04 Thread Dmitry Fomichev
On Wed, 2019-08-28 at 10:41 +0100, Stefan Hajnoczi wrote: > On Fri, Aug 23, 2019 at 03:49:23PM -0400, Dmitry Fomichev wrote: > > Dmitry Fomichev (4): > > block: Add zoned device model property > > raw: Recognize zoned backing devices > > block/ide/scsi: Set BLK_P

[Qemu-devel] [PATCH v6 0/4] virtio/block: handle zoned backing devices

2019-09-04 Thread Dmitry Fomichev
rent code v4 -> v5: - avoid checkpatch warning v5 -> v6: - address review comments from Stefan Hajnoczi Dmitry Fomichev (4): block: Add zoned device model property raw: Recognize zoned backing devices block/ide/scsi: Set BLK_PERM_SUPPORT_HM_ZONED raw: Don't open ZBDs if backe

[Qemu-devel] [PATCH v6 1/4] block: Add zoned device model property

2019-09-04 Thread Dmitry Fomichev
host managed zoned block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev --- block.c | 15 +++ include/block/block.h

[Qemu-devel] [PATCH v5 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED

2019-08-23 Thread Dmitry Fomichev
permission to allow or deny opening a zone device by a particular block driver. Signed-off-by: Dmitry Fomichev Acked-by: Paul Durrant --- hw/block/block.c | 8 ++-- hw/block/fdc.c | 5 +++-- hw/block/nvme.c | 2 +- hw/block/virtio-blk.c| 2 +- hw/block/xen-block.c

[Qemu-devel] [PATCH v5 2/4] raw: Recognize zoned backing devices

2019-08-23 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 74 ++ block/raw-format.c | 8 + 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index fb

[Qemu-devel] [PATCH v5 0/4] virtio/block: handle zoned backing devices

2019-08-23 Thread Dmitry Fomichev
ents aka RCAP output snoop v2 -> v3: - drop the patch for RCAP output snoop - merged separately v3 -> v4: - rebase to the current code v4 -> v5: - avoid checkpatch warning Dmitry Fomichev (4): block: Add zoned device model property raw: Recognize zoned backing devices

[Qemu-devel] [PATCH v5 1/4] block: Add zoned device model property

2019-08-23 Thread Dmitry Fomichev
block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev --- block.c | 19 +++ include/block/block.h | 21 - in

[Qemu-devel] [PATCH v5 4/4] raw: Don't open ZBDs if backend can't handle them

2019-08-23 Thread Dmitry Fomichev
Abort opening a zoned device as a raw file in case the chosen block backend driver lacks proper support for this type of storage. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 14 ++ hw/block/fdc.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH v4 1/4] block: Add zoned device model property

2019-08-23 Thread Dmitry Fomichev
block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev --- block.c | 19 +++ include/block/block.h | 21 - in

[Qemu-devel] [PATCH v4 0/4] virtio/block: handle zoned backing devices

2019-08-23 Thread Dmitry Fomichev
ents aka RCAP output snoop v2 -> v3: - drop the patch for RCAP output snoop - merged separately v3 -> v4: - rebase to the current code Dmitry Fomichev (4): block: Add zoned device model property raw: Recognize zoned backing devices block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED raw:

[Qemu-devel] [PATCH v4 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED

2019-08-23 Thread Dmitry Fomichev
permission to allow or deny opening a zone device by a particular block driver. Signed-off-by: Dmitry Fomichev Acked-by: Paul Durrant --- hw/block/block.c | 8 ++-- hw/block/fdc.c | 5 +++-- hw/block/nvme.c | 2 +- hw/block/virtio-blk.c| 2 +- hw/block/xen-block.c

[Qemu-devel] [PATCH v4 2/4] raw: Recognize zoned backing devices

2019-08-23 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 74 ++ block/raw-format.c | 8 + 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index fb

[Qemu-devel] [PATCH v4 4/4] raw: Don't open ZBDs if backend can't handle them

2019-08-23 Thread Dmitry Fomichev
Abort opening a zoned device as a raw file in case the chosen block backend driver lacks proper support for this type of storage. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c

[Qemu-devel] [PATCH v4 2/4] raw: Recognize zoned backing devices

2019-08-23 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 74 ++ block/raw-format.c | 8 + 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index fb

[Qemu-devel] [PATCH v4 1/4] block: Add zoned device model property

2019-08-23 Thread Dmitry Fomichev
block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev --- block.c | 19 +++ include/block/block.h | 21 - in

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/4] virtio/block: handle zoned backing devices

2019-07-26 Thread Dmitry Fomichev
John, please see inline... Regards, Dmitry On Thu, 2019-07-25 at 13:58 -0400, John Snow wrote: > > On 7/23/19 6:19 PM, Dmitry Fomichev wrote: > > Currently, attaching zoned block devices (i.e., storage devices > > compliant to ZAC/ZBC standards) using several virtio method

[Qemu-devel] [PATCH v3 3/4] block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED

2019-07-23 Thread Dmitry Fomichev
permission to allow or deny opening a zone device by a particular block driver. Signed-off-by: Dmitry Fomichev Acked-by: Paul Durrant --- hw/block/block.c | 8 ++-- hw/block/fdc.c | 4 ++-- hw/block/nvme.c | 2 +- hw/block/virtio-blk.c| 2 +- hw/block/xen-block.c

[Qemu-devel] [PATCH v3 0/4] virtio/block: handle zoned backing devices

2019-07-23 Thread Dmitry Fomichev
output snoop v2 -> v3: - drop the patch for RCAP output snoop - merged separately Dmitry Fomichev (4): block: Add zoned device model property raw: Recognize zoned backing devices block/ide/scsi: Set BLK_PERM_SUPPORT_ZONED raw: Don't open ZBDs if backend can&#x

[Qemu-devel] [PATCH v3 1/4] block: Add zoned device model property

2019-07-23 Thread Dmitry Fomichev
block devices. No code is added yet to initialize or check the value of this new property, therefore this commit doesn't change any functionality. Signed-off-by: Dmitry Fomichev --- block.c | 19 +++ include/block/block.h | 21 - in

[Qemu-devel] [PATCH v3 2/4] raw: Recognize zoned backing devices

2019-07-23 Thread Dmitry Fomichev
ned" value both share the same helper code. Signed-off-by: Dmitry Fomichev --- block/file-posix.c | 74 ++ block/raw-format.c | 8 + 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 44

<    1   2   3   4   >