[RFC PATCH 0/3] support command retry

2021-02-10 Thread Minwoo Im
. Then host # will retry based on the delay. Thanks, Minwoo Im (3): hw/block/nvme: set NVME_DNR in a single place hw/block/nvme: support command retry delay hw/block/nvme: add nvme_inject_state HMP command hmp-commands.hx | 13 ++ hw/block/nvme.c | 304

[PATCH V2 6/7] hw/block/nvme: support namespace attachment command

2021-02-10 Thread Minwoo Im
namespace in the NVMe subsystem. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 10 +++ hw/block/nvme.c| 59 ++ hw/block/nvme.h| 5 hw/block/trace-events | 2 ++ include/block/nvme.h | 5 5 files changed, 81 insertions

[PATCH V2 3/7] hw/block/nvme: fix allocated namespace list to 256

2021-02-10 Thread Minwoo Im
spaces = NVME_MAX_NAMESPACES; The above line will set the NN field by id->nn so that the subsystem should also prepare at least this number of namespace list entries. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 2 +- hw/block/nvme.h| 6 ++ 2 files changed, 7 insertions(+), 1

[PATCH V2 5/7] hw/block/nvme: refactor nvme_select_ns_iocs

2021-02-10 Thread Minwoo Im
This patch has no functional changes. This patch just refactored nvme_select_ns_iocs() to iterate the attached namespaces of the controlller and make it invoke __nvme_select_ns_iocs(). Signed-off-by: Minwoo Im --- hw/block/nvme.c | 36 +--- 1 file changed, 21

[PATCH V2 2/7] hw/block/nvme: fix namespaces array to 1-based

2021-02-10 Thread Minwoo Im
subsys->namespaces array used to be sized to NVME_SUBSYS_MAX_NAMESPACES. But subsys->namespaces are being accessed with 1-based namespace id which means the very first array entry will always be empty(NULL). Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 2 +- 1 file changed, 1 ins

[PATCH V2 7/7] hw/block/nvme: support Identify NS Attached Controller List

2021-02-10 Thread Minwoo Im
) indicating the number of the controller id entries. So, the data can hold up to 2047 entries for the controller ids. Signed-off-by: Minwoo Im --- hw/block/nvme.c | 42 ++ hw/block/trace-events | 1 + include/block/nvme.h | 1 + 3 files changed

[PATCH V2 4/7] hw/block/nvme: support allocated namespace type

2021-02-10 Thread Minwoo Im
e subsystem. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 13 + hw/block/nvme.c| 63 +++--- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/hw/block/nvme-subsys.h b/hw/block/nvme-subsys.h index 8a0732b22316..14627f9ccb41 10

[PATCH V2 1/7] hw/block/nvme: support namespace detach

2021-02-10 Thread Minwoo Im
,id=ns1,drive=blknvme0,nsid=1,bus=nvme0,detached=true Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 1 + hw/block/nvme-ns.h | 1 + hw/block/nvme-subsys.h | 1 + hw/block/nvme.c| 41 +++-- hw/block/nvme.h| 22

[PATCH V2 0/6] hw/block/nvme: support namespace attachment

2021-02-10 Thread Minwoo Im
8.44 MB512 B + 0 B 1.0 Minwoo Im (7): hw/block/nvme: support namespace detach hw/block/nvme: fix namespaces array to 1-based hw/block/nvme: fix allocated namespace list to 256 hw/block/nvme: support allocated namespace type hw/block/nvme: refactor nvme_select_ns_iocs

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Minwoo Im
> > It might be nitpick, 'nlb' would easily represent the value which is > > defined itself in the spec which is zero-based. Can we have this like: > > > > uint32_t nlb = le16_to_cpu(rw->nlb); > > > > bitmap_clear(ns->uncorrectable, slba, nlb + 1); > > > > > I do not disagree, but

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Minwoo Im
t;cmd; > + uint64_t slba = le64_to_cpu(rw->slba); > +uint32_t nlb = le16_to_cpu(rw->nlb) + 1; > + > +bitmap_clear(ns->uncorrectable, slba, nlb); It might be nitpick, 'nlb' would easily represent the value which is defined itself in the spec which is zero-based. Can we have this like: uint32_t nlb = le16_to_cpu(rw->nlb); bitmap_clear(ns->uncorrectable, slba, nlb + 1); Otherwise, it looks good to me. Reviewed-by: Minwoo Im

Re: [PATCH 1/2] hw/block/nvme: add oncs device parameter

2021-02-10 Thread Minwoo Im
CS. > > Signed-off-by: Gollu Appalanaidu > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Minwoo Im
On 21-02-10 18:23:17, Bin Meng wrote: > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

Re: [PATCH RFC v2 3/8] hw/block/nvme: fix strerror printing

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:35, Klaus Jensen wrote: > From: Klaus Jensen > > Fix missing sign inversion. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH RFC v2 2/8] hw/block/nvme: remove block accounting for write zeroes

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:34, Klaus Jensen wrote: > From: Klaus Jensen > > A Write Zeroes commands should not be counted in either the 'Data Units > Written' or in 'Host Write Commands' SMART/Health Information Log page. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH RFC v2 1/8] hw/block/nvme: remove redundant len member in compare context

2021-02-08 Thread Minwoo Im
On 21-02-07 22:49:33, Klaus Jensen wrote: > From: Klaus Jensen > > The 'len' member of the nvme_compare_ctx struct is redundant since the > same information is available in the 'iov' member. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

[PATCH 6/6] hw/block/nvme: support namespace attachment command

2021-02-05 Thread Minwoo Im
namespace in the NVMe subsystem. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 10 +++ hw/block/nvme.c| 59 ++ hw/block/nvme.h| 5 hw/block/trace-events | 2 ++ include/block/nvme.h | 5 5 files changed, 81 insertions

[PATCH 5/6] hw/block/nvme: refactor nvme_select_ns_iocs

2021-02-05 Thread Minwoo Im
This patch has no functional changes. This patch just refactored nvme_select_ns_iocs() to iterate the attached namespaces of the controlller and make it invoke __nvme_select_ns_iocs(). Signed-off-by: Minwoo Im --- hw/block/nvme.c | 36 +--- 1 file changed, 21

[PATCH 4/6] hw/block/nvme: support allocated namespace type

2021-02-05 Thread Minwoo Im
e subsystem. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 13 + hw/block/nvme.c| 63 +++--- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/hw/block/nvme-subsys.h b/hw/block/nvme-subsys.h index 8a0732b22316..14627f9ccb41 10

[PATCH 3/6] hw/block/nvme: fix allocated namespace list to 256

2021-02-05 Thread Minwoo Im
spaces = NVME_MAX_NAMESPACES; The above line will set the NN field by id->nn so that the subsystem should also prepare at least this number of namespace list entries. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 2 +- hw/block/nvme.h| 6 ++ 2 files changed, 7 insertions(+), 1

[PATCH 1/6] hw/block/nvme: support namespace detach

2021-02-05 Thread Minwoo Im
,id=ns1,drive=blknvme0,nsid=1,bus=nvme0,detached=true Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 1 + hw/block/nvme-ns.h | 1 + hw/block/nvme-subsys.h | 1 + hw/block/nvme.c| 41 +++-- hw/block/nvme.h| 22

[PATCH 2/6] hw/block/nvme: fix namespaces array to 1-based

2021-02-05 Thread Minwoo Im
subsys->namespaces array used to be sized to NVME_SUBSYS_MAX_NAMESPACES. But subsys->namespaces are being accessed with 1-based namespace id which means the very first array entry will always be empty(NULL). Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 2 +- 1 file changed, 1 ins

[PATCH 0/6] hw/block/nvme: support namespace attachment

2021-02-05 Thread Minwoo Im
vme0n1 foo QEMU NVMe Ctrl 1 268.44 MB / 268.44 MB512 B + 0 B 1.0 /dev/nvme0n2 foo QEMU NVMe Ctrl 2 268.44 MB / 268.44 MB512 B + 0 B 1.0 Thanks, Minwoo

Re: [PATCH V6 0/6] hw/block/nvme: support multi-path for ctrl/ns

2021-01-26 Thread Minwoo Im
On 21-01-27 05:39:29, Keith Busch wrote: > This came out looking cleaner than I had initially expected. Thanks for > seeing this feature through! > > Reviewed-by: Keith Busch Thanks Keith for the review!

Re: [PATCH V6 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-26 Thread Minwoo Im
On 21-01-26 09:57:23, Keith Busch wrote: > On Tue, Jan 26, 2021 at 09:52:48AM +0900, Minwoo Im wrote: > > On 21-01-25 10:11:43, Keith Busch wrote: > > > On Mon, Jan 25, 2021 at 07:03:32PM +0100, Klaus Jensen wrote: > > > > On Jan 24 11:54, Minwoo Im wrote: > >

Re: [PATCH V6 0/6] hw/block/nvme: support multi-path for ctrl/ns

2021-01-25 Thread Minwoo Im
On 21-01-25 21:29:58, Klaus Jensen wrote: > On Jan 24 11:54, Minwoo Im wrote: > > Hello, > > > > This is sixth patch series for the support of NVMe subsystem scheme with > > multi-controller and namespace sharing in a subsystem. > > > > This version has

Re: [PATCH V6 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-25 Thread Minwoo Im
On 21-01-25 10:11:43, Keith Busch wrote: > On Mon, Jan 25, 2021 at 07:03:32PM +0100, Klaus Jensen wrote: > > On Jan 24 11:54, Minwoo Im wrote: > > > We have nvme-subsys and nvme devices mapped together. To support > > > multi-controller scheme to this setup, co

[PATCH] hw/block/nvme: fix wrong parameter name 'cross_read'

2021-01-25 Thread Minwoo Im
The actual parameter name is 'cross_read' rather than 'cross_zone_read'. Signed-off-by: Minwoo Im --- 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 21aec90637fa..bf9134f73d81 100644 --- a/hw/block/nvme.c +++ b/hw

[PATCH V6 6/6] hw/block/nvme: support for shared namespace in subsystem

2021-01-23 Thread Minwoo Im
controllers in the subsystem to the namespace by default. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 23 ++- hw/block/nvme-ns.h | 7 +++ hw/block/nvme-subsys.c | 25 + hw/block/nvme-subsys.h | 3 +++ hw/block/nvme.c| 10

[PATCH V6 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-23 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

[PATCH V6 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-23 Thread Minwoo Im
to the subsystem with a limit(32). This patch didn't take list for the controllers to make it seamless with nvme-ns device. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.c | 21 + hw/block/nvme-subsys.h | 4 hw/block/nvme.c| 29

[PATCH V6 3/6] hw/block/nvme: add CMIC enum value for Identify Controller

2021-01-23 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

[PATCH V6 1/6] hw/block/nvme: introduce nvme-subsys device

2021-01-23 Thread Minwoo Im
) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0 Signed-off-by: Minwoo Im --- hw/block/meson.build | 2 +- hw/block/nvme-subsys.c | 60 ++ hw/block/nvme-subsys.h | 25 ++ hw/block/nvme.c| 3 +++ 4 files changed, 89

[PATCH V6 0/6] hw/block/nvme: support multi-path for ctrl/ns

2021-01-23 Thread Minwoo Im
List by removing fall-thru statement. Since RFC V1: - Updated namespace sharing scheme to be based on nvme-subsys hierarchy. Minwoo Im (6): hw/block/nvme: introduce nvme-subsys device hw/block/nvme: support to map controller to a subsystem hw/block/nvme: add CMIC enum value for Identify

[PATCH V6 2/6] hw/block/nvme: support to map controller to a subsystem

2021-01-23 Thread Minwoo Im
-by: Minwoo Im --- hw/block/nvme.c | 30 +- hw/block/nvme.h | 3 +++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index aabccdf36f4b..b525fca14103 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -22,7 +22,8

Re: [PATCH V5 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-22 Thread Minwoo Im
On 21-01-22 10:42:36, Keith Busch wrote: > On Fri, Jan 22, 2021 at 09:07:34PM +0900, Minwoo Im wrote: > > index b525fca14103..3dedefb8ebba 100644 > > --- a/hw/block/nvme.c > > +++ b/hw/block/nvme.c > > @@ -4435,6 +4435,9 @@ static void nvme_init_ctrl(NvmeCtrl

[PATCH V5 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-22 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

[PATCH V5 2/6] hw/block/nvme: support to map controller to a subsystem

2021-01-22 Thread Minwoo Im
-by: Minwoo Im --- hw/block/nvme.c | 30 +- hw/block/nvme.h | 3 +++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index aabccdf36f4b..b525fca14103 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -22,7 +22,8

[PATCH V5 6/6] hw/block/nvme: support for shared namespace in subsystem

2021-01-22 Thread Minwoo Im
controllers in the subsystem to the namespace by default. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 23 ++- hw/block/nvme-ns.h | 7 +++ hw/block/nvme-subsys.c | 25 + hw/block/nvme-subsys.h | 3 +++ hw/block/nvme.c| 10

[PATCH V5 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-22 Thread Minwoo Im
to the subsystem with a limit(32). This patch didn't take list for the controllers to make it seamless with nvme-ns device. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.c | 21 + hw/block/nvme-subsys.h | 4 hw/block/nvme.c| 29

[PATCH V5 3/6] hw/block/nvme: add CMIC enum value for Identify Controller

2021-01-22 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

[PATCH V5 1/6] hw/block/nvme: introduce nvme-subsys device

2021-01-22 Thread Minwoo Im
) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0 Signed-off-by: Minwoo Im --- hw/block/meson.build | 2 +- hw/block/nvme-subsys.c | 60 ++ hw/block/nvme-subsys.h | 25 ++ hw/block/nvme.c| 3 +++ 4 files changed, 89

[PATCH V5 0/6] hw/block/nvme: support multi-path for ctrl/ns

2021-01-22 Thread Minwoo Im
on nvme-subsys hierarchy. Minwoo Im (6): hw/block/nvme: introduce nvme-subsys device hw/block/nvme: support to map controller to a subsystem hw/block/nvme: add CMIC enum value for Identify Controller hw/block/nvme: support for multi-controller in subsystem hw/block/nvme: add NMIC enum

Re: [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-21 Thread Minwoo Im
On 21-01-21 15:17:16, Keith Busch wrote: > On Fri, Jan 22, 2021 at 07:09:06AM +0900, Minwoo Im wrote: > > -static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) > > +static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev, uint16_t > > cntlid) > > { > &g

Re: [PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem

2021-01-21 Thread Minwoo Im
On 21-01-21 15:03:38, Keith Busch wrote: > On Fri, Jan 22, 2021 at 07:09:04AM +0900, Minwoo Im wrote: > > --- a/hw/block/nvme.c > > +++ b/hw/block/nvme.c > > @@ -23,6 +23,7 @@ > > * max_ioqpairs=, \ > > * aerl=, aer_max_que

Re: [PATCH V4 1/6] hw/block/nvme: introduce nvme-subsys device

2021-01-21 Thread Minwoo Im
On 21-01-21 14:52:02, Keith Busch wrote: > On Fri, Jan 22, 2021 at 07:09:03AM +0900, Minwoo Im wrote: > > +static void nvme_subsys_setup(NvmeSubsystem *subsys) > > +{ > > +char *subnqn; > > + > > +subnqn = g_strdup_printf("nqn.2019-08.or

[PATCH V4 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-21 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

[PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem

2021-01-21 Thread Minwoo Im
to the subsystem with a limit(32). This patch didn't take list for the controllers to make it seamless with nvme-ns device. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.c | 21 + hw/block/nvme-subsys.h | 4 hw/block/nvme.c| 34

[PATCH V4 3/6] hw/block/nvme: add CMIC enum value for Identify Controller

2021-01-21 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

[PATCH V4 6/6] hw/block/nvme: support for shared namespace in subsystem

2021-01-21 Thread Minwoo Im
controllers in the subsystem to the namespace by default. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 23 ++- hw/block/nvme-ns.h | 7 +++ hw/block/nvme-subsys.c | 25 + hw/block/nvme-subsys.h | 3 +++ hw/block/nvme.c| 10

[PATCH V4 0/6] hw/block/nvme: support multi-path for ctrl/ns

2021-01-21 Thread Minwoo Im
or not to controller(s) in the subsystem. (Klaus) - Implemented Identify Active Namespace ID List aprt from Identify Allocated Namespace ID List by removing fall-thru statement. Since RFC V1: - Updated namespace sharing scheme to be based on nvme-subsys hierarchy. Minwoo Im (6): hw

[PATCH V4 1/6] hw/block/nvme: introduce nvme-subsys device

2021-01-21 Thread Minwoo Im
) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0 Signed-off-by: Minwoo Im --- hw/block/meson.build | 2 +- hw/block/nvme-subsys.c | 63 ++ hw/block/nvme-subsys.h | 25 + hw/block/nvme.c| 3 ++ 4 files changed, 92

[PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem

2021-01-21 Thread Minwoo Im
-by: Minwoo Im --- hw/block/nvme.c | 30 ++ hw/block/nvme.h | 3 +++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index aabccdf36f4b..ab0531492ddd 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -23,6 +23,7

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

2021-01-20 Thread Minwoo Im
Nice for codes much more clean. Reviewed-by: Minwoo Im

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

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

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

2021-01-20 Thread Minwoo Im
Reviewed-by: Minwoo Im

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

2021-01-20 Thread Minwoo Im
> Hello Minwoo, > > By introducing a detached parameter, > you are also implicitly making the following > NVMe commands no longer be spec compliant: > > NVME_ID_CNS_NS, NVME_ID_CNS_CS_NS, > NVME_ID_CNS_NS_ACTIVE_LIST, NVME_ID_CNS_CS_NS_ACTIVE_LIST > > When these commands are called on a

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

2021-01-20 Thread Minwoo Im
On 21-01-20 08:52:14, Klaus Jensen wrote: > 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-

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: [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 > > man

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

2021-01-19 Thread Minwoo Im
will introduce a handler for later on. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 9 + hw/block/nvme-ns.h | 6 ++ hw/block/nvme-subsys.c | 2 ++ hw/block/nvme.c| 31 ++- hw/block/nvme.h| 15 +++ 5 files changed, 62

[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

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

2021-01-19 Thread Minwoo Im
) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0 Signed-off-by: Minwoo Im --- hw/block/meson.build | 2 +- hw/block/nvme-subsys.c | 63 ++ hw/block/nvme-subsys.h | 25 + hw/block/nvme.c| 3 ++ 4 files changed, 92

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

2021-01-19 Thread Minwoo Im
roduced for Identify Active Namespace ID List (CNS 02h). Signed-off-by: Minwoo Im --- hw/block/nvme.c | 39 ++- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2b2c07b36c2b..7247167b0ee6 100644 --- a/hw/b

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

2021-01-19 Thread Minwoo Im
List by removing fall-thru statement. Since RFC V1: - Updated namespace sharing scheme to be based on nvme-subsys hierarchy. Minwoo Im (8): hw/block/nvme: introduce nvme-subsys device hw/block/nvme: support to map controller to a subsystem hw/block/nvme: add CMIC enum value

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

2021-01-19 Thread Minwoo Im
controllers in the subsystem to the namespace by default. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 23 ++- hw/block/nvme-ns.h | 7 +++ hw/block/nvme-subsys.c | 25 + hw/block/nvme-subsys.h | 3 +++ hw/block/nvme.c| 10

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

2021-01-19 Thread Minwoo Im
to the subsystem with a limit(32). This patch didn't take list for the controllers to make it seamless with nvme-ns device. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.c | 21 + hw/block/nvme-subsys.h | 4 hw/block/nvme.c| 34

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

2021-01-19 Thread Minwoo Im
-by: Minwoo Im --- hw/block/nvme.c | 30 ++ hw/block/nvme.h | 3 +++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 4644937a5c50..3e3b5451ea3d 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -23,6 +23,7

[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: [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,

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

Re: [RFC PATCH V2 00/11] hw/block/nvme: support multi-path for ctrl/ns

2021-01-18 Thread Minwoo Im
On 21-01-19 07:04:04, Klaus Jensen wrote: > On Jan 19 12:21, Minwoo Im wrote: > > On 21-01-18 22:14:45, Klaus Jensen wrote: > > > On Jan 17 23:53, Minwoo Im wrote: > > > > Hello, > > > > > > > > This patch series introduces NVMe subsystem d

Re: [RFC PATCH V2 00/11] hw/block/nvme: support multi-path for ctrl/ns

2021-01-18 Thread Minwoo Im
On 21-01-18 22:14:45, Klaus Jensen wrote: > On Jan 17 23:53, Minwoo Im wrote: > > Hello, > > > > This patch series introduces NVMe subsystem device to support multi-path > > I/O in NVMe device model. Two use-cases are supported along with this > > patch: Mu

Re: [RFC PATCH V2 10/11] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-18 Thread Minwoo Im
> Let's keep convention (or should be convention...) of using NvmeIdNs > prefix for identify data structure fields on the enum. Okay!

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

2021-01-18 Thread Minwoo Im
On 21-01-18 20:23:30, Klaus Jensen wrote: > On Jan 18 14:22, Klaus Jensen wrote: > > On Jan 18 22:12, Minwoo Im wrote: > > > On 21-01-18 14:10:50, Klaus Jensen wrote: > > > > On Jan 18 22:09, Minwoo Im wrote: > > > > > > > Yes, CMB

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

2021-01-18 Thread Minwoo Im
On 21-01-18 20:53:24, 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. > >

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

2021-01-18 Thread Minwoo Im
On 21-01-18 14:10:50, Klaus Jensen wrote: > On Jan 18 22:09, Minwoo Im wrote: > > > > Yes, CMB in v1.4 is not backward-compatible, but is it okay to move onto > > > > the CMB v1.4 from v1.3 without supporting the v1.3 usage on this device > > > > model? &

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

2021-01-18 Thread Minwoo Im
> > Yes, CMB in v1.4 is not backward-compatible, but is it okay to move onto > > the CMB v1.4 from v1.3 without supporting the v1.3 usage on this device > > model? > > Next patch moves to v1.4. I wanted to split it because the "bump" patch > also adds a couple of other v1.4 requires fields. But I

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

2021-01-18 Thread Minwoo Im
Hello, On 21-01-18 10:47:03, 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. > > Signed-off-by:

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

2021-01-18 Thread Minwoo Im
> 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.

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

2021-01-18 Thread Minwoo Im
On 21-01-18 10:47:00, Klaus Jensen wrote: > From: Klaus Jensen > > The controller registers are initially zero. Remove the redundant > zeroing. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 35 --- > 1 file changed, 35 deletions(-) > > diff --git

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

2021-01-18 Thread Minwoo Im
cap, val) (cap |= (uint64_t)(val & > CAP_CMBS_MASK) \ > + << CAP_CMBS_SHIFT) Oh, it would have been better folded into [3/12] patch, though. Changes are looking good to me to represent "Supported". Reviewed-by: Minwoo Im > > enum NvmeCapCss { > NVME_CAP_CSS_NVM= 1 << 0, > -- > 2.30.0 > >

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

2021-01-18 Thread Minwoo Im
Reviewed-by: Minwoo Im

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

2021-01-18 Thread Minwoo Im
On 21-01-18 10:46:57, Klaus Jensen wrote: > 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. Nice! Reviewed-by: Minwoo Im Tested-by: Minwoo Im Thanks,

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

2021-01-18 Thread Minwoo Im
Reviewed-by: Minwoo Im

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

2021-01-18 Thread Minwoo Im
On 21-01-18 10:46:55, Klaus Jensen wrote: > 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

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

2021-01-18 Thread Minwoo Im
Reviewed-by: Minwoo Im

[RFC PATCH V2 11/11] hw/block/nvme: support for shared namespace in subsystem

2021-01-17 Thread Minwoo Im
=,nsid=2,bus=nvme2 # Non-shared In the above example, 'ns1' will be shared to 'nvme0' and 'nvme1' in the same subsystem. On the other hand, 'ns2' will be attached to the 'nvme2' only as a private namespace in that subsystem. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 23

[RFC PATCH V2 10/11] hw/block/nvme: add NMIC enum value for Identify Namespace

2021-01-17 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

[RFC PATCH V2 09/11] hw/block/nvme: support for multi-controller in subsystem

2021-01-17 Thread Minwoo Im
to the subsystem with a limit(32). This patch didn't take list for the controllers to make it seamless with nvme-ns device. Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.c | 21 + hw/block/nvme-subsys.h | 4 hw/block/nvme.c| 32

[RFC PATCH V2 08/11] hw/block/nvme: add CMIC enum value for Identify Controller

2021-01-17 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

[RFC PATCH V2 07/11] hw/block/nvme: support to map controller to a subsystem

2021-01-17 Thread Minwoo Im
-by: Minwoo Im --- hw/block/nvme.c | 30 ++ hw/block/nvme.h | 3 +++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index dde83aafc33d..af5b2162e2b5 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -23,6 +23,7

[RFC PATCH V2 03/11] hw/block/nvme: remove unused argument in nvme_ns_init_blk

2021-01-17 Thread Minwoo Im
Removed no longer used aregument NvmeCtrl object in nvme_ns_init_blk(). Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index c403cd36b6bd..fc42ae184e01 100644 --- a/hw/block/nvme

[RFC PATCH V2 06/11] hw/block/nvme: introduce nvme-subsys device

2021-01-17 Thread Minwoo Im
) -device nvme-subsys,id=subsys0: nqn.2019-08.org.qemu:subsys0 Signed-off-by: Minwoo Im --- hw/block/meson.build | 2 +- hw/block/nvme-subsys.c | 63 ++ hw/block/nvme-subsys.h | 25 + hw/block/nvme.c| 3 ++ 4 files changed, 92

[RFC PATCH V2 04/11] hw/block/nvme: split setup and register for namespace

2021-01-17 Thread Minwoo Im
especially for multi-path. In that case, it should be split into two to make namespace independent from a controller. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index fc42ae184e01

[RFC PATCH V2 05/11] hw/block/nvme: remove unused argument in nvme_ns_setup

2021-01-17 Thread Minwoo Im
nvme_ns_setup() finally does not have nothing to do with NvmeCtrl instance. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 4 ++-- hw/block/nvme-ns.h | 2 +- hw/block/nvme.c| 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c

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

2021-01-17 Thread Minwoo Im
. Also, it open coded the Get Features for VWC to check all namespaces attached to the controller, and if false detected, return directly false. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 4 hw/block/nvme.c| 15 --- hw/block/nvme.h| 1 - 3 files changed, 12

[RFC PATCH V2 01/11] hw/block/nvme: remove unused argument in nvme_ns_init_zoned

2021-01-17 Thread Minwoo Im
nvme_ns_init_zoned() has no use for given NvmeCtrl object. Signed-off-by: Minwoo Im --- hw/block/nvme-ns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c index 274eaf61b721..32662230130b 100644 --- a/hw/block/nvme-ns.c +++ b/hw

[RFC PATCH V2 00/11] hw/block/nvme: support multi-path for ctrl/ns

2021-01-17 Thread Minwoo Im
sharing scheme to be based on nvme-subsys hierarchy. Thanks, [1] https://lists.gnu.org/archive/html/qemu-block/2021-01/msg00425.html Minwoo Im (11): hw/block/nvme: remove unused argument in nvme_ns_init_zoned hw/block/nvme: open code for volatile write cache hw/block/nvme: remove unused

<    1   2   3   >