Re: [PATCH v2 35/44] error: Eliminate error_propagate() with Coccinelle, part 2

2020-07-02 Thread Eric Blake
On 7/2/20 10:49 AM, Markus Armbruster wrote: When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous commit did that with a Coccinelle script I consider fairly trustworthy. This commit uses the

Re: [PATCH 2/6] migration: introduce savevm, loadvm, delvm QMP commands

2020-07-02 Thread Eric Blake
On 7/2/20 12:57 PM, Daniel P. Berrangé wrote: savevm, loadvm and delvm are some of the few commands that have never been converted to use QMP. The primary reason for this lack of conversion is that they block execution of the thread for as long as they run. Despite this downside, however, libvir

Re: [PATCH 6/6] migration: support picking vmstate disk in QMP snapshot commands

2020-07-02 Thread Eric Blake
On 7/2/20 12:57 PM, Daniel P. Berrangé wrote: This wires up support for a new "vmstate" parameter to the QMP commands for snapshots (savevm, loadvm). This parameter accepts block driver state node name. One use case for this would be a VM using OVMF firmware where the variables store is the firs

Re: [PATCH v2 36/44] error: Eliminate error_propagate() manually

2020-07-02 Thread Eric Blake
On 7/2/20 10:49 AM, Markus Armbruster wrote: When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous two commits did that for sufficiently simple cases with Coccinelle. Do it for several more m

Re: [PATCH 2/6] migration: introduce savevm, loadvm, delvm QMP commands

2020-07-02 Thread Daniel P . Berrangé
On Thu, Jul 02, 2020 at 01:12:52PM -0500, Eric Blake wrote: > On 7/2/20 12:57 PM, Daniel P. Berrangé wrote: > > savevm, loadvm and delvm are some of the few commands that have never > > been converted to use QMP. The primary reason for this lack of > > conversion is that they block execution of the

Re: [PATCH v2 37/44] error: Reduce unnecessary error propagation

2020-07-02 Thread Eric Blake
On 7/2/20 10:49 AM, Markus Armbruster wrote: When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away, even when we need to keep error_propagate() for other error paths. Signed-off-by: Markus Armbruster ---

Re: [PATCH 1/6] migration: improve error reporting of block driver state name

2020-07-02 Thread Eric Blake
On 7/2/20 12:57 PM, Daniel P. Berrangé wrote: With blockdev, a BlockDriverState may not have an device name, s/an/a/ so using a node name is required as an alternative. Signed-off-by: Daniel P. Berrangé --- migration/savevm.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletion

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200702175754.2211821-1-berra...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH v2 03/44] qdev: Use returned bool to check for qdev_realize() etc. failure

2020-07-02 Thread Vladimir Sementsov-Ogievskiy
02.07.2020 18:49, Markus Armbruster wrote: Convert foo(..., &err); if (err) { ... } to if (!foo(..., &err)) { ... } for qdev_realize(), qdev_realize_and_unref(), qbus_realize() and their wrappers isa_realize_and_unref(), pci_realize_and_unref(), sysb

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200702175754.2211821-1-berra...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH 1/6] migration: improve error reporting of block driver state name

2020-07-02 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 7/2/20 12:57 PM, Daniel P. Berrangé wrote: > > With blockdev, a BlockDriverState may not have an device name, > > s/an/a/ > > > so using a node name is required as an alternative. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > migration/sa

Re: [PATCH v2 11/44] qemu-option: Replace opt_set() by cleaner opt_validate()

2020-07-02 Thread Vladimir Sementsov-Ogievskiy
02.07.2020 18:49, Markus Armbruster wrote: opt_set() frees its argument @value on failure. Slightly unclean; functions ideally do nothing on failure. To tidy this up, move opt_create() from opt_set() into its callers, along with the cleanup. Rename opt_set() to opt_validate(), noting its simil

Re: nvme emulation merge process

2020-07-02 Thread Andrzej Jakowski
On 7/1/20 6:57 AM, Philippe Mathieu-Daudé wrote: > On 7/1/20 3:18 PM, Klaus Jensen wrote: >> On Jul 1 12:34, Kevin Wolf wrote: >>> Am 30.06.2020 um 22:36 hat Klaus Jensen geschrieben: On Jun 30 08:42, Keith Busch wrote: > On Tue, Jun 30, 2020 at 04:09:46PM +0200, Philippe Mathieu-Daudé w

Re: nvme emulation merge process

2020-07-02 Thread Keith Busch
On Thu, Jul 02, 2020 at 01:29:26PM -0700, Andrzej Jakowski wrote: > > Thx! Of course I am interested in helping and I think it is actually great > idea to have couple of designated maintainers/reviewers as it would be easier > for folks to receive feedback vs requesting it in polling manner :) >

Re: [PATCH v9 14/34] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 11:57:46 AM CEST, Max Reitz wrote: >> The reason why we would want to check it is, of course, because that >> bit does have a meaning in regular L2 entries. >> >> But that bit is ignored in images with subclusters so the only reason >> why we would check it is to report corrupti

Re: [PATCH v9 21/34] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 02:46:27 PM CEST, Max Reitz wrote: >> -/* must be allocated */ >> -assert(first_cluster_type == QCOW2_CLUSTER_NORMAL || >> - first_cluster_type == QCOW2_CLUSTER_ZERO_ALLOC); >> +assert(*l2_index + nb_clusters <= s->l2_size); > > Not l2_slice_size? Oh, indee

Re: [PATCH v9 28/34] qcow2: Add subcluster support to qcow2_co_pwrite_zeroes()

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 04:28:57 PM CEST, Max Reitz wrote: >> +/* For full clusters use zero_in_l2_slice() instead */ >> +assert(nb_subclusters > 0 && nb_subclusters < >> s->subclusters_per_cluster); >> +assert(sc + nb_subclusters <= s->subclusters_per_cluster); > > Maybe we should also ass

Re: [PATCH v9 30/34] qcow2: Add prealloc field to QCowL2Meta

2020-07-02 Thread Alberto Garcia
On Thu 02 Jul 2020 05:09:47 PM CEST, Max Reitz wrote: >> Without a backing file, there is no read required - writing to an >> unallocated subcluster within a preallocated cluster merely has to >> provide zeros to the rest of the write.  And depending on whether we >> can intelligently guarantee tha

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Andrzej Jakowski
On 7/2/20 10:51 AM, Klaus Jensen wrote: > On Jul 2 08:07, Andrzej Jakowski wrote: >> On 7/2/20 3:31 AM, Klaus Jensen wrote: >>> Aight, an update here. This only happens when QEMU is run with a virtual >>> IOMMU. Otherwise, the kernel is happy. >>> >>> With the vIOMMU, qemu also craps out a bit: >>

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 command; for now, the device

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 the trace name). > > S

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 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 and the emulated nvme

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 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/block/nvme.h | 4 > 2 f

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 > ("Asynchronous Event Request c

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 > --- > hw/block/nvme.c

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/nvme.c | 4 > 1 file ch

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 Jensen > Reviewed-by: Max

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 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 +++ > 1 file changed, 3 inse

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 identifier, so conjure up

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(-) > > diff --git a/hw/bloc

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 +++- > 1 file changed, 3 inser

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 > Reviewed-by: Maxim Levit

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:44, Dmitry Fomichev wrote: > 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 an

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:44, Dmitry Fomichev wrote: > 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 req

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:45, Dmitry Fomichev wrote: > 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 l

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:46, Dmitry Fomichev wrote: > 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). >

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

2020-07-02 Thread Klaus Jensen
On Jul 3 00:46, Dmitry Fomichev wrote: > 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

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

2020-07-02 Thread Klaus Jensen
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 trivial changes to the nvme block driver as well. Signed-off-by: Kl

[PATCH v2 00/18] hw/block/nvme: bump to v1.3

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen This adds mandatory features of NVM Express v1.3 to the emulated NVMe device. v2: * hw/block/nvme: bump spec data structures to v1.3 - Shorten some constants. (Dmitry) * hw/block/nvme: add temperature threshold feature - Remove unused temp_thresh member. (Dmitry)

[PATCH v2 02/18] hw/block/nvme: additional tracing

2020-07-02 Thread Klaus Jensen
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 the trace name). Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 19 +++ hw

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

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Mark firmware slot 1 as read-only and only support that slot. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 3 ++- include/block/nvme.h | 4 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/n

[PATCH v2 16/18] hw/block/nvme: enforce valid queue creation sequence

2020-07-02 Thread Klaus Jensen
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 Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 12 hw/block/nvme.h | 1 + 2 file

[PATCH v2 03/18] hw/block/nvme: add support for the abort command

2020-07-02 Thread Klaus Jensen
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 command; for now, the device always fails to abort the given command. Signed-off-by: Klaus Jensen Signed-off-by: Klaus Jensen Acked-by: K

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

2020-07-02 Thread Klaus Jensen
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, the SMART / Health Information log page does not persist information ov

[PATCH v2 18/18] hw/block/nvme: bump supported version to v1.3

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Bump the supported NVM Express version to v1.3. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5bbb6aa0e

[PATCH v2 04/18] hw/block/nvme: add temperature threshold feature

2020-07-02 Thread Klaus Jensen
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. Signed-off-by: Klaus Jensen Acked-by: Keith Busch Reviewed-by:

[PATCH v2 14/18] hw/block/nvme: support identify namespace descriptor list

2020-07-02 Thread Klaus Jensen
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 identifier, so conjure up a UUID that is just the namespace id. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/bl

[PATCH v2 09/18] hw/block/nvme: flush write cache when disabled

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen If the write cache is disabled with a Set Features command, flush it if currently enabled. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 3eac1e231b

[PATCH v2 08/18] hw/block/nvme: move NvmeFeatureVal into hw/block/nvme.h

2020-07-02 Thread Klaus Jensen
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 and the emulated nvme device. Move it into the nvme device specific header file as it is the only user of the structure. Also, re

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

2020-07-02 Thread Klaus Jensen
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 ("Asynchronous Event Request command"). Mostly imported from Keith's qemu-nvme tree. Modified with a max number of queued events (controll

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

2020-07-02 Thread Klaus Jensen
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 Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 8 1 file changed, 8 insertions(+) diff --git a

[PATCH v2 10/18] hw/block/nvme: fix missing endian conversion

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Fix a missing cpu_to conversion. Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index f3a5b857bc92..ba523f6768bf 100644 --- a/hw/block/nvme.c

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

2020-07-02 Thread Klaus Jensen
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 command will result in a Feature Identifier Not Saveable status code. Similarly, if the Select (SEL) field is set to request saved values

[PATCH v2 11/18] hw/block/nvme: add remaining mandatory controller parameters

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Add support for any remaining mandatory controller operating parameters (features). Signed-off-by: Klaus Jensen Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 39 +-- hw/block/nvme.h | 18 ++ hw/block/trace

Re: [PATCH v2 14/44] block: Avoid error accumulation in bdrv_img_create()

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> When creating an image fails because the format doesn't support option >> "backing_file" or "backing_fmt", bdrv_img_create() first has >> qemu_opt_set() put a generic error into @local_err, then puts the real >> error into @errp

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

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen The SUBNQN field is mandatory in NVM Express 1.3. Signed-off-by: Klaus Jensen Reviewed-by: Maxim Levitsky Reviewed-by: Dmitry Fomichev --- hw/block/nvme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 8138baa6fbd8..5bbb6aa0e

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

2020-07-02 Thread Klaus Jensen
From: Klaus Jensen Reject the nsid broadcast value (0x) and 0xfffe in the Active Namespace ID list. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 65c2fa3ac1f4..0dac7a41ddae 100644 ---

Re: [PATCH v2 33/44] error: Avoid unnecessary error_propagate() after error_setg()

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> Replace >> >> error_setg(&err, ...); >> error_propagate(errp, err); >> >> by >> >> error_setg(errp, ...); >> > >> >> Candidates for conversion tracked down with this Coccinelle script: >> >> @@ >> identi

Re: [PATCH v2 34/44] error: Eliminate error_propagate() with Coccinelle, part 1

2020-07-02 Thread Markus Armbruster
Eric Blake writes: > On 7/2/20 10:49 AM, Markus Armbruster wrote: >> When all we do with an Error we receive into a local variable is >> propagating to somewhere else, we can just as well receive it there >> right away. Convert >> >> if (!foo(..., &err)) { >> ... >> error_

<    1   2