Re: [PATCH] tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

2021-01-19 Thread Philippe Mathieu-Daudé
On 1/19/21 2:47 PM, Thomas Huth wrote: > BusyBox' sed reports itself as "This is not GNU sed version 4.0" > when being run with the --version parameter. However, the iotests > really need GNU sed, they do not work with the BusyBox version. > So let's make sure that we really have GNU sed and

Re: [PATCH v3 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-19 Thread Minwoo Im
On 21-01-19 11:15:02, Klaus Jensen wrote: > From: Padmakar Kalghatgi > > Implement v1.4 logic for configuring the Controller Memory Buffer. This > is not backward compatible with v1.3, so drivers that only support v1.3 > will not be able to use the CMB anymore. Reviewed the legacy-cmb paramete,

[PATCH 0/2] hw/block/nvme: zoned fixes

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen Patch [1/2] fixes the zone append bug reported by Niklas. [2/2] refactors the zone write check function to return status codes in a different order if there are multiple zone write violations that apply. Klaus Jensen (2): hw/block/nvme: fix zone boundary check for append

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-19 Thread Jason Dillaman
On Tue, Jan 19, 2021 at 4:36 AM Peter Lieven wrote: > > Am 18.01.21 um 23:33 schrieb Jason Dillaman: > > On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: > >> Am 15.01.21 um 16:27 schrieb Jason Dillaman: > >>> On Thu, Jan 14, 2021 at 2:59 PM Peter Lieven wrote: > Am 14.01.21 um 20:19

Re: [PATCH] tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

2021-01-19 Thread Daniel P . Berrangé
On Tue, Jan 19, 2021 at 02:47:49PM +0100, Thomas Huth wrote: > BusyBox' sed reports itself as "This is not GNU sed version 4.0" > when being run with the --version parameter. However, the iotests > really need GNU sed, they do not work with the BusyBox version. > So let's make sure that we really

Re: [PATCH] tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

2021-01-19 Thread Kevin Wolf
Am 19.01.2021 um 14:47 hat Thomas Huth geschrieben: > BusyBox' sed reports itself as "This is not GNU sed version 4.0" > when being run with the --version parameter. However, the iotests > really need GNU sed, they do not work with the BusyBox version. > So let's make sure that we really have GNU

[PATCH 2/2] hw/block/nvme: refactor the logic for zone write checks

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen Refactor the zone write check logic such that the most "meaningful" error is returned first. That is, first, if the zone is not writable, return an appropriate status code for that. Then, make sure we are actually writing at the write pointer and finally check that we do not

Re: [PATCH v3 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-19 Thread Klaus Jensen
On Jan 19 21:44, Minwoo Im wrote: > On 21-01-19 11:15:02, Klaus Jensen wrote: > > From: Padmakar Kalghatgi > > > > Implement v1.4 logic for configuring the Controller Memory Buffer. This > > is not backward compatible with v1.3, so drivers that only support v1.3 > > will not be able to use the

Re: [PATCH v2] iotests: Add test for the regression fixed in c8bf9a9169

2021-01-19 Thread Max Reitz
On 12.01.21 18:05, Alberto Garcia wrote: Signed-off-by: Alberto Garcia Suggested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky --- v2: Rebase on top of the latest master tests/qemu-iotests/313 | 103 + tests/qemu-iotests/313.out | 29 +++

[PATCH 1/2] hw/block/nvme: fix zone boundary check for append

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen When a zone append is processed the controller checks that validity of the write before assigning the LBA to the append command. This causes the boundary check to be wrong. Fix this by checking the write *after* assigning the LBA. Remove the append special case from the

[PATCH] tests/check-block.sh: Refuse to run the iotests with BusyBox' sed

2021-01-19 Thread Thomas Huth
BusyBox' sed reports itself as "This is not GNU sed version 4.0" when being run with the --version parameter. However, the iotests really need GNU sed, they do not work with the BusyBox version. So let's make sure that we really have GNU sed and refuse to run the tests with BusyBox' sed.

Re: [PATCH 2/2] virtio-scsi-test: Test writing to scsi-cd device

2021-01-19 Thread Max Reitz
On 18.01.21 13:34, Kevin Wolf wrote: This tests that trying to write to a (read-only) scsi-cd device backed by a read-write image file doesn't crash and results in the correct error. This is a regression test for https://bugs.launchpad.net/bugs/1906693. Signed-off-by: Kevin Wolf ---

Re: [PATCH 1/2] block: Separate blk_is_writable() and blk_supports_write_perm()

2021-01-19 Thread Max Reitz
On 18.01.21 13:34, Kevin Wolf wrote: Currently, blk_is_read_only() tells whether a given BlockBackend can only be used in read-only mode because its root node is read-only. Some callers actually try to answer a slightly different question: Is the BlockBackend configured to be writable, by taking

Re: [PATCH 0/9] hw/block: m25p80: Fix the mess of dummy bytes needed for fast read commands

2021-01-19 Thread Francisco Iglesias
Hi Bin, On [2021 Jan 18] Mon 20:32:19, Bin Meng wrote: > Hi Francisco, > > On Mon, Jan 18, 2021 at 6:06 PM Francisco Iglesias > wrote: > > > > Hi Bin, > > > > On [2021 Jan 15] Fri 22:38:18, Bin Meng wrote: > > > Hi Francisco, > > > > > > On Fri, Jan 15, 2021 at 8:26 PM Francisco Iglesias > > >

Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux

2021-01-19 Thread Thomas Huth
On 18/01/2021 11.33, Daniel P. Berrangé wrote: On Mon, Jan 18, 2021 at 02:38:07PM +0800, Jiaxun Yang wrote: Alpine Linux[1] is a security-oriented, lightweight Linux distribution based on musl libc and busybox. It it popular among Docker guests and embedded applications. Adding it to test

Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux

2021-01-19 Thread Daniel P . Berrangé
On Tue, Jan 19, 2021 at 02:41:47PM +0100, Thomas Huth wrote: > On 18/01/2021 11.33, Daniel P. Berrangé wrote: > > On Mon, Jan 18, 2021 at 02:38:07PM +0800, Jiaxun Yang wrote: > > > Alpine Linux[1] is a security-oriented, lightweight Linux distribution > > > based on musl libc and busybox. > > > >

[PATCH] hw/ide/ahci: map cmd_fis as DMA_DIRECTION_TO_DEVICE

2021-01-19 Thread Alexander Bulekov
cmd_fis is mapped as DMA_DIRECTION_FROM_DEVICE, however, it is read from, and not written to anywhere. Fix the DMA_DIRECTION and mark cmd_fis as read-only in the code. Signed-off-by: Alexander Bulekov --- hw/ide/ahci.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

Re: [PATCH v2 06/36] block: BdrvChildClass: add .get_parent_aio_context handler

2021-01-19 Thread Kevin Wolf
Am 18.01.2021 um 18:36 hat Vladimir Sementsov-Ogievskiy geschrieben: > 18.01.2021 18:13, Kevin Wolf wrote: > > Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Add new handler to get aio context and implement it in all child > > > classes. Add corresponding public

[RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Minwoo Im
Hello, This patch series is third one to support multi-controller and namespace sharing in multi-path. This series introduced subsystem scheme to manage controller(s) and namespace(s) in the subsystem. This series has new patches from the V2: 'detached' parameter has been added to the nvme-ns

[RFC PATCH V3 7/8] hw/block/nvme: add 'detached' param not to attach namespace

2021-01-19 Thread Minwoo Im
Introduced 'detached' parameter to nvme-ns device. If given, the namespace will not be attached to controller(s) in the subsystem. If 'subsys' is not given with this option, it should be provided with 'bus' which is for private namespace. This patch also introduced 'ctrls_bitmap' in

Re: [PATCH v2 11/36] block: bdrv_refresh_perms: check parents compliance

2021-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2021 20:42, Kevin Wolf wrote: Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: Add additional check that node parents do not interfere with each other. This should not hurt existing callers and allows in further patch use bdrv_refresh_perms() to update a subtree of

Re: [PATCH v2 12/36] block: refactor bdrv_child* permission functions

2021-01-19 Thread Kevin Wolf
Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > Split out non-recursive parts, and refactor as block graph transaction > action. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c | 79 ++--- > 1 file

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Keith Busch
On Tue, Jan 19, 2021 at 07:18:16PM +0100, Klaus Jensen wrote: > On Jan 20 02:01, Minwoo Im wrote: > > Run with: > > -device nvme,serial=qux,id=nvme3 > > -device nvme-ns,id=ns3,drive=drv12,nsid=3,bus=nvme3 > > > > -device nvme-subsys,id=subsys0 > > -device

Re: [RFC PATCH 0/2] hw/usb/dev-uas: Fix Clang 11 -Wgnu-variable-sized-type-not-at-end error

2021-01-19 Thread Gerd Hoffmann
On Mon, Jan 18, 2021 at 06:03:06PM +0100, Philippe Mathieu-Daudé wrote: > Another attempt to fix the following Clang 11 warning: > > usb/dev-uas.c:157:31: error: field 'status' with variable sized type 'uas_i= > u' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-vari= >

[RFC PATCH V3 1/8] hw/block/nvme: introduce nvme-subsys device

2021-01-19 Thread Minwoo Im
To support multi-path in QEMU NVMe device model, We need to have NVMe subsystem hierarchy to map controllers and namespaces to a NVMe subsystem. This patch introduced a simple nvme-subsys device model. The subsystem will be prepared with subsystem NQN with provided in nvme-subsys device: ex)

[RFC PATCH V3 4/8] hw/block/nvme: support for multi-controller in subsystem

2021-01-19 Thread Minwoo Im
We have nvme-subsys and nvme devices mapped together. To support multi-controller scheme to this setup, controller identifier(id) has to be managed. Earlier, cntlid(controller id) used to be always 0 because we didn't have any subsystem scheme that controller id matters. This patch introduced

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2021 22:22, Vladimir Sementsov-Ogievskiy wrote: Hmmm, for me, 129 sometimes fails still, because it completes too quickly...  (The error then is that 'return[0]' does not exist in query-block-jobs’s result, because the job is already gone.) When I insert a print(result) after the

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-19 Thread Max Reitz
On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails for backup. And setting small max-chunk and even max-workers to 1 doesn't help! (setting speed like in v3 still helps). And I found, that the problem is that

[RFC PATCH V3 6/8] hw/block/nvme: support for shared namespace in subsystem

2021-01-19 Thread Minwoo Im
nvme-ns device is registered to a nvme controller device during the initialization in nvme_register_namespace() in case that 'bus' property is given which means it's mapped to a single controller. This patch introduced a new property 'subsys' just like the controller device instance did to map a

[RFC PATCH V3 8/8] hw/block/nvme: Add Identify Active Namespace ID List

2021-01-19 Thread Minwoo Im
Spec v1.4b 6.1.4 "Active and Inactive NSID Types" says: "Active NSIDs for a controller refer to namespaces that are attached to that controller. Allocated NSIDs that are inactive for a controller refer to namespaces that are not attached to that controller." This patch introduced for Identify

[RFC PATCH V3 2/8] hw/block/nvme: support to map controller to a subsystem

2021-01-19 Thread Minwoo Im
nvme controller(nvme) can be mapped to a NVMe subsystem(nvme-subsys). This patch maps a controller to a subsystem by adding a parameter 'subsys' to the nvme device. To map a controller to a subsystem, we need to put nvme-subsys first and then maps the subsystem to the controller: -device

Re: [PATCH v2 11/36] block: bdrv_refresh_perms: check parents compliance

2021-01-19 Thread Kevin Wolf
Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > Add additional check that node parents do not interfere with each > other. This should not hurt existing callers and allows in further > patch use bdrv_refresh_perms() to update a subtree of changed > BdrvChild (check that

Re: [RFC PATCH 0/2] hw/usb/dev-uas: Fix Clang 11 -Wgnu-variable-sized-type-not-at-end error

2021-01-19 Thread Philippe Mathieu-Daudé
On 1/19/21 5:41 PM, Gerd Hoffmann wrote: > On Mon, Jan 18, 2021 at 06:03:06PM +0100, Philippe Mathieu-Daudé wrote: >> Another attempt to fix the following Clang 11 warning: >> >> usb/dev-uas.c:157:31: error: field 'status' with variable sized type >> 'uas_i= >> u' not at the end of a struct or

Re: [PATCH v2 12/36] block: refactor bdrv_child* permission functions

2021-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2021 21:09, Kevin Wolf wrote: Am 27.11.2020 um 15:44 hat Vladimir Sementsov-Ogievskiy geschrieben: Split out non-recursive parts, and refactor as block graph transaction action. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 79

[PATCH 9/9] meson: Summarize block layer information altogether

2021-01-19 Thread Philippe Mathieu-Daudé
Display if block layer is built. Do not display the block specific information if not enabled. Signed-off-by: Philippe Mathieu-Daudé --- Cc: qemu-block@nongnu.org --- meson.build | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/meson.build

[RFC PATCH V3 5/8] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-19 Thread Minwoo Im
Added Namespace Multi-path I/O and Namespace Sharing Capabilities (NMIC) field to support shared namespace from controller(s). This field is in Identify Namespace data structure in [30]. Signed-off-by: Minwoo Im --- include/block/nvme.h | 4 1 file changed, 4 insertions(+) diff --git

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Klaus Jensen
On Jan 20 02:01, Minwoo Im wrote: > Hello, > > This patch series is third one to support multi-controller and namespace > sharing in multi-path. This series introduced subsystem scheme to > manage controller(s) and namespace(s) in the subsystem. > > This series has new patches from the V2:

Re: [PATCH v4 00/23] backup performance: block_status + async

2021-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2021 21:40, Max Reitz wrote: On 16.01.21 22:46, Vladimir Sementsov-Ogievskiy wrote: Hi Max! I applied my series onto yours 129-fixing and found, that 129 fails for backup. And setting small max-chunk and even max-workers to 1 doesn't help! (setting speed like in v3 still helps). And I

Re: [PATCH v3 02/25] qapi: backup: add perf.use-copy-range parameter

2021-01-19 Thread Eric Blake
On 10/26/20 12:17 PM, Vladimir Sementsov-Ogievskiy wrote: > Experiments show, that copy_range is not always making things faster. > So, to make experimentation simpler, let's add a parameter. Some more > perf parameters will be added soon, so here is a new struct. > > For now, add new backup qmp

Re: [RFC PATCH 2/2] hw/usb/dev-uas: Report command additional adb length as unsupported

2021-01-19 Thread Philippe Mathieu-Daudé
On 1/18/21 6:03 PM, Philippe Mathieu-Daudé wrote: > We are not ready to handle additional CDB data. > > If a guest send a packet with such additional data, > report the command parameter as not supported. > > We can then explicit there is nothing in this additional > buffer, by fixing its size

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Klaus Jensen
On Jan 20 09:44, Minwoo Im wrote: > On 21-01-19 19:18:16, Klaus Jensen wrote: > > On Jan 20 02:01, Minwoo Im wrote: > > > Hello, > > > > > > This patch series is third one to support multi-controller and namespace > > > sharing in multi-path. This series introduced subsystem scheme to > > >

Re: [PATCH v3 02/25] qapi: backup: add perf.use-copy-range parameter

2021-01-19 Thread Vladimir Sementsov-Ogievskiy
19.01.2021 23:21, Eric Blake wrote: On 10/26/20 12:17 PM, Vladimir Sementsov-Ogievskiy wrote: Experiments show, that copy_range is not always making things faster. So, to make experimentation simpler, let's add a parameter. Some more perf parameters will be added soon, so here is a new struct.

[RFC PATCH V3 3/8] hw/block/nvme: add CMIC enum value for Identify Controller

2021-01-19 Thread Minwoo Im
Added Controller Multi-path I/O and Namespace Sharing Capabilities (CMIC) field to support multi-controller in the following patches. This field is in Identify Controller data structure in [76]. Signed-off-by: Minwoo Im --- include/block/nvme.h | 4 1 file changed, 4 insertions(+) diff

Re: [RFC PATCH V3 7/8] hw/block/nvme: add 'detached' param not to attach namespace

2021-01-19 Thread Klaus Jensen
On Jan 20 02:01, Minwoo Im wrote: > Introduced 'detached' parameter to nvme-ns device. If given, the > namespace will not be attached to controller(s) in the subsystem. If > 'subsys' is not given with this option, it should be provided with 'bus' > which is for private namespace. > > This patch

Re: [PATCH v2 02/12] hw/block/nvme: fix 64 bit register hi/lo split writes

2021-01-19 Thread Keith Busch
On Mon, Jan 18, 2021 at 08:53:24PM +0100, Klaus Jensen wrote: > On Jan 18 21:59, Minwoo Im wrote: > > > The spec requires aligned 32 bit accesses (or the size of the register), > > > so maybe it's about time we actually ignore instead of falling through. > > > > Agreed. > > > > On the other

Re: [PATCH v3 00/12] hw/block/nvme: misc cmb/pmr patches and bump to v1.4

2021-01-19 Thread Keith Busch
On Tue, Jan 19, 2021 at 11:14:52AM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > This is a resend of "hw/block/nvme: allow cmb and pmr to coexist" with > some more PMR work added (PMR RDS/WDS support). > > This includes a resurrection of Andrzej's series[1] from back July. > > Andrzej's

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Minwoo Im
On 21-01-19 19:18:16, Klaus Jensen wrote: > On Jan 20 02:01, Minwoo Im wrote: > > Hello, > > > > This patch series is third one to support multi-controller and namespace > > sharing in multi-path. This series introduced subsystem scheme to > > manage controller(s) and namespace(s) in the

Re: [RFC PATCH V3 7/8] hw/block/nvme: add 'detached' param not to attach namespace

2021-01-19 Thread Minwoo Im
> Isn't the HBitmap slightly overkill? Can qemu/bitmap.h suffice? Definitely, yes, I think. Current patch series supoprt up to 32 controllers so I think qemu/bitmap.h is enough for us. Will update the bitmap operations in the next series.

Re: [RFC PATCH V3 0/8] hw/block/nvme: support multi-path for ctrl/ns

2021-01-19 Thread Minwoo Im
> Minwoo, try pulling the most current nvme-cli. There was a sysfs > scanning bug for non-mpath drives that should be fixed now. Thank you, Keith! I've posted list result based on the latest one :)

Re: NVMe ZNS zone append past zone size?

2021-01-19 Thread Klaus Jensen
On Jan 19 10:38, Niklas Cassel wrote: > Hello all, > > > When testing with the ZNS code that is in nvme-next, > I can zone append, targeting the first zone by specifying zslba 0, > and then just put that call it in a while loop, it will > manage to fill up not just zone0, but the whole drive. >

Re: [RFC PATCH 1/2] block: Allow changing bs->file on reopen

2021-01-19 Thread Alberto Garcia
On Mon 18 Jan 2021 11:15:17 AM CET, Vladimir Sementsov-Ogievskiy wrote: >> +static int bdrv_reopen_parse_file(BDRVReopenState *reopen_state, >> + GSList **tran, >> + Error **errp) >> +{ >> +BlockDriverState *bs =

Re: [PATCH v2 9/9] gitlab-ci: Add alpine to pipeline

2021-01-19 Thread Thomas Huth
On 18/01/2021 16.12, Thomas Huth wrote: On 18/01/2021 15.50, Daniel P. Berrangé wrote: On Mon, Jan 18, 2021 at 03:44:49PM +0100, Thomas Huth wrote: On 18/01/2021 14.37, Jiaxun Yang wrote: On Mon, Jan 18, 2021, at 6:11 PM, Daniel P. Berrangé wrote: On Mon, Jan 18, 2021 at 02:38:08PM +0800,

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-19 Thread Peter Lieven
Am 18.01.21 um 23:33 schrieb Jason Dillaman: > On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: >> Am 15.01.21 um 16:27 schrieb Jason Dillaman: >>> On Thu, Jan 14, 2021 at 2:59 PM Peter Lieven wrote: Am 14.01.21 um 20:19 schrieb Jason Dillaman: > On Sun, Dec 27, 2020 at 11:42 AM

Re: [RFC PATCH V2 02/11] hw/block/nvme: open code for volatile write cache

2021-01-19 Thread Minwoo Im
On 21-01-19 08:32:21, Klaus Jensen wrote: > On Jan 17 23:53, Minwoo Im wrote: > > Volatile Write Cache(VWC) feature is set in nvme_ns_setup() in the > > initial time. This feature is related to block device backed, but this > > feature is controlled in controller level via Set/Get Features

[PATCH v3 02/12] hw/block/nvme: fix 64 bit register hi/lo split writes

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen 64 bit registers like ASQ and ACQ should be writable by both a hi/lo 32 bit write combination as well as a plain 64 bit write. The spec does not define ordering on the hi/lo split, but the code currently assumes that the low order bits are written first. Additionally, the code

[PATCH v3 01/12] hw/block/nvme: add size to mmio read/write trace events

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen Add the size of the mmio read/write to the trace event. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im --- hw/block/nvme.c | 4 ++-- hw/block/trace-events | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[PATCH v3 00/12] hw/block/nvme: misc cmb/pmr patches and bump to v1.4

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen This is a resend of "hw/block/nvme: allow cmb and pmr to coexist" with some more PMR work added (PMR RDS/WDS support). This includes a resurrection of Andrzej's series[1] from back July. Andrzej's main patch basically moved the CMB from BAR 2 into an offset in BAR 4 (located

[PATCH v3 05/12] hw/block/nvme: allow cmb and pmr to coexist

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen With BAR 4 now free to use, allow PMR and CMB to be enabled simultaneously. Reviewed-by: Minwoo Im Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH v3 07/12] hw/block/nvme: remove redundant zeroing of PMR registers

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen The controller registers are initially zero. Remove the redundant zeroing. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index

[PATCH v3 08/12] hw/block/nvme: disable PMR at boot up

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen The PMR should not be enabled at boot up. Disable the PMR MemoryRegion initially and implement MMIO for PMRCTL, allowing the host to enable the PMR explicitly. Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 14 -- 1 file changed, 12 insertions(+), 2

[PATCH v3 03/12] hw/block/nvme: indicate CMB support through controller capabilities register

2021-01-19 Thread Klaus Jensen
From: Andrzej Jakowski This patch sets CMBS bit in controller capabilities register when user configures NVMe driver with CMB support, so capabilites are correctly reported to guest OS. Signed-off-by: Andrzej Jakowski Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im Signed-off-by: Klaus

[PATCH v3 09/12] hw/block/nvme: add PMR RDS/WDS support

2021-01-19 Thread Klaus Jensen
From: Naveen Nagar Add support for the PMRMSCL and PMRMSCU MMIO registers. This allows adding RDS/WDS support for PMR as well. Signed-off-by: Naveen Nagar Signed-off-by: Klaus Jensen --- hw/block/nvme.h | 6 ++- include/block/nvme.h | 1 + hw/block/nvme.c | 122

[PATCH v3 06/12] hw/block/nvme: rename PMR/CMB shift/mask fields

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen Use the correct field names. Reviewed-by: Minwoo Im Signed-off-by: Klaus Jensen --- include/block/nvme.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/block/nvme.h b/include/block/nvme.h index 86d7fc2f905c..f3cbe17d0971 100644

[PATCH v3 11/12] hw/block/nvme: bump to v1.4

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen With the new CMB logic in place, bump the implemented specification version to v1.4 by default. This requires adding the setting the CNTRLTYPE field and modifying the VWC field since 0x00 is no longer a valid value for bits 2:1. Signed-off-by: Klaus Jensen ---

[PATCH v3 04/12] hw/block/nvme: move msix table and pba to BAR 0

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen In the interest of supporting both CMB and PMR to be enabled on the same device, move the MSI-X table and pending bit array out of BAR 4 and into BAR 0. This is a simplified version of the patch contributed by Andrzej Jakowski (see [1]). Leaving the CMB at offset 0 removes

[PATCH v3 10/12] hw/block/nvme: move cmb logic to v1.4

2021-01-19 Thread Klaus Jensen
From: Padmakar Kalghatgi Implement v1.4 logic for configuring the Controller Memory Buffer. This is not backward compatible with v1.3, so drivers that only support v1.3 will not be able to use the CMB anymore. Signed-off-by: Padmakar Kalghatgi Signed-off-by: Klaus Jensen --- hw/block/nvme.h

[PATCH v3 12/12] hw/block/nvme: lift cmb restrictions

2021-01-19 Thread Klaus Jensen
From: Klaus Jensen The controller now implements v1.4 and we can lift the restrictions on CMB Data Pointer and Command Independent Locations Support (CDPCILS) and CMB Data Pointer Mixed Locations Support (CDPMLS) since the device really does not care about mixed host/cmb pointers in those cases.

NVMe ZNS zone append past zone size?

2021-01-19 Thread Niklas Cassel
Hello all, When testing with the ZNS code that is in nvme-next, I can zone append, targeting the first zone by specifying zslba 0, and then just put that call it in a while loop, it will manage to fill up not just zone0, but the whole drive. Since zslba is defined as: "Zone Start Logical Block