[Qemu-devel] [Qemu-block][PATCH] qemu-block: add support HMB with feature commands.

2017-10-21 Thread Minwoo Im
Add support HMB(Host Memory Block) with feature commands(Get Feature, Set Feature). nvme-4.14 tree supports HMB features. This patch will make nvme controller to return 32MiB preferred size of HMB to host via identify command. Set Feature, Get Feature implemented for HMB. Signed-off-by: Minwoo

Re: [Qemu-devel] [Qemu-block][PATCH] qemu-block: add support HMB with feature commands.

2017-10-28 Thread Minwoo Im
I'll send a patch only when there is a clear real use case. Thanks for your reply. On Mon, Oct 23, 2017 at 11:30 PM, Keith Busch <keith.bu...@intel.com> wrote: > On Sat, Oct 21, 2017 at 03:54:16PM +0900, Minwoo Im wrote: >> Add support HMB(Host Memory Block) with feature commands(G

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-block: add support HMB with feature commands.

2017-10-28 Thread Minwoo Im
On Tue, Oct 24, 2017 at 1:18 AM, Stefan Hajnoczi <stefa...@gmail.com> wrote: > On Sat, Oct 21, 2017 at 03:54:16PM +0900, Minwoo Im wrote: >> Add support HMB(Host Memory Block) with feature commands(Get Feature, Set >> Feature). >> nvme-4.14 tree supports HMB features. &

[PATCH] nvme: Print 'cqid' for nvme_del_cq

2020-03-24 Thread Minwoo Im
The given argument for this trace should be cqid, not sqid. Signed-off-by: Minwoo Im --- hw/block/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/trace-events b/hw/block/trace-events index f78939fa9da1..bf6d11b58b85 100644 --- a/hw/block/trace-events

Re: [PATCH 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-29 Thread Minwoo Im
> -Original Message- > From: Qemu-devel On > Behalf Of Klaus Jensen > Sent: Thursday, July 30, 2020 3:29 AM > To: Minwoo Im > Cc: Kevin Wolf ; qemu-bl...@nongnu.org; Klaus Jensen > ; qemu-devel@nongnu.org; Max Reitz ; > Keith Busch > Subject: Re: [PATCH 0

Re: [PATCH v2 16/16] hw/block/nvme: remove explicit qsg/iov parameters

2020-07-30 Thread Minwoo Im
On 20-07-30 00:06:38, Klaus Jensen wrote: > From: Klaus Jensen > > Since nvme_map_prp always operate on the request-scoped qsg/iovs, just > pass a single pointer to the NvmeRequest instead of two for each of the > qsg and iov. > > Suggested-by: Minwoo Im > Sig

Re: [PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-30 Thread Minwoo Im
On 20-07-30 00:06:36, Klaus Jensen wrote: > From: Klaus Jensen > > Always destroy the request qsg/iov at the end of request use. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 52 - > 1 file changed, 21 insertions(+), 31 deletions(-)

Re: [PATCH v2 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-30 Thread Minwoo Im
lear to understand myself here. Reviewed-by: Minwoo Im

Re: [PATCH v2 07/16] hw/block/nvme: add tracing to nvme_map_prp

2020-07-30 Thread Minwoo Im
s) + 1; > uint16_t status; > > +trace_pci_nvme_map_prp(trans_len, len, prp1, prp2, num_prps); Hmm.. Okay with this. But once QEMUSGList and QEMUIOVector instances are coming into the NvmeRequest, we just can pass the NvmeRequest instance here and print the cid as well l

Re: [PATCH v2 01/16] hw/block/nvme: memset preallocated requests structures

2020-07-30 Thread Minwoo Im
Klaus Jensen > Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im

Re: [PATCH v2 15/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp

2020-07-30 Thread Minwoo Im
iewed-by: Maxim Levitsky Reviewed-by: Minwoo Im

Re: [PATCH v2 08/16] hw/block/nvme: add request mapping helper

2020-07-30 Thread Minwoo Im
rp2); > + > +return nvme_map_prp(>qsg, >iov, prp1, prp2, len, n); > +} Let's do something for MPTR laster also when we are right in front of that. Looks good to me. Reviewed-by: Minwoo Im > + > static void nvme_post_cqes(void *opaque) > { > NvmeCQu

Re: [PATCH v2 05/16] hw/block/nvme: destroy request iov before reuse

2020-07-30 Thread Minwoo Im
On Thu, Jul 30, 2020 at 7:06 AM Klaus Jensen wrote: > > From: Klaus Jensen > > Make sure the request iov is destroyed before reuse; fixing a memory > leak. > > Signed-off-by: Klaus Jensen Looks good to me and Thanks for splitting this up. Reviewed-by: Minwoo Im

Re: [PATCH v2 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-30 Thread Minwoo Im
On Thu, Jul 30, 2020 at 7:06 AM Klaus Jensen wrote: > > From: Klaus Jensen > > Remove the has_sg member from NvmeRequest since it's redundant. > > Signed-off-by: Klaus Jensen Looks better than the previous one to me. Reviewed-by: Minwoo Im

Re: [PATCH 10/16] hw/block/nvme: add check for mdts

2020-07-29 Thread Minwoo Im
gt; index 6d0cd588c786..5d7d4679650b 100644 > --- a/hw/block/trace-events > +++ b/hw/block/trace-events > @@ -85,6 +85,7 @@ pci_nvme_mmio_shutdown_set(void) "shutdown bit set" > pci_nvme_mmio_shutdown_cleared(void) "shutdown bit cleared" > > # nvme traces for error conditions > +pci_nvme_err_mdts(uint16_t cid, size_t len) "cid %"PRIu16" len %"PRIu64"" > pci_nvme_err_invalid_dma(void) "PRP/SGL is too small for transfer size" > pci_nvme_err_invalid_prplist_ent(uint64_t prplist) "PRP list entry is null > or not page aligned: 0x%"PRIx64"" > pci_nvme_err_invalid_prp2_align(uint64_t prp2) "PRP2 is not page aligned: > 0x%"PRIx64"" > -- > 2.27.0 > > Reviewed-by: Minwoo Im Thanks,

Re: [PATCH 12/16] hw/block/nvme: refactor NvmeRequest clearing

2020-07-29 Thread Minwoo Im
On 20-07-20 13:37:44, Klaus Jensen wrote: > From: Klaus Jensen > > Move clearing of the structure from "clear before use" to "clear > after use". Yah, agree on this. Reviewed-by: Minwoo Im

Re: [PATCH 11/16] hw/block/nvme: be consistent about zeros vs zeroes

2020-07-29 Thread Minwoo Im
Reviewed-by: Minwoo Im Thanks,

Re: [PATCH 13/16] hw/block/nvme: add a namespace reference in NvmeRequest

2020-07-29 Thread Minwoo Im
On 20-07-20 13:37:45, Klaus Jensen wrote: > From: Klaus Jensen > > Instead of passing around the NvmeNamespace, add it as a member in the > NvmeRequest structure. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH 14/16] hw/block/nvme: consolidate qsg/iov clearing

2020-07-29 Thread Minwoo Im
series. And I also agree on starting to make focus on nvme_req_clear() for wrap-up. Looks good to me. Reviewed-by: Minwoo Im

Re: [PATCH 15/16] hw/block/nvme: remove NvmeCmd parameter

2020-07-29 Thread Minwoo Im
On 20-07-20 13:37:47, Klaus Jensen wrote: > From: Klaus Jensen > > Keep a copy of the raw nvme command in the NvmeRequest and remove the > now redundant NvmeCmd parameter. > > Signed-off-by: Klaus Jensen I would really have suggested this change from 13th patch! Revi

Re: [PATCH 16/16] hw/block/nvme: use preallocated qsg/iov in nvme_dma_prp

2020-07-29 Thread Minwoo Im
On 20-07-20 13:37:48, Klaus Jensen wrote: > From: Klaus Jensen > > Since clean up of the request qsg/iov is now always done post-use, there > is no need to use a stack-allocated qsg/iov in nvme_dma_prp. > > Signed-off-by: Klaus Jensen > Acked-by: Keith Busch > Reviewed-by: Maxim Levitsky >

Re: [PATCH 02/16] hw/block/nvme: add mapping helpers

2020-07-29 Thread Minwoo Im
nt64_t prp1, > } else { > if (unlikely(prp2 & (n->page_size - 1))) { > trace_pci_nvme_err_invalid_prp2_align(prp2); > +status = NVME_INVALID_FIELD | NVME_DNR; > goto unmap; > } > - if (qsg->nsg) { > -qemu_sglist_add(qsg, prp2, len); > -} else { > -qemu_iovec_add(iov, (void *)>cmbuf[prp2 - > n->ctrl_mem.addr], trans_len); > +status = nvme_map_addr(n, qsg, iov, prp2, len); > +if (status) { > +goto unmap; I like these parts which is much better to read the codes. Reviewed-by: Minwoo Im Thanks,

Re: [PATCH 03/16] hw/block/nvme: replace dma_acct with blk_acct equivalent

2020-07-29 Thread Minwoo Im
), >acct, > req->iov.size, > + acct); > req->aiocb = is_write ? > blk_aio_pwritev(n->conf.blk, data_offset, >iov, 0, > nvme_rw_cb, > req) : Reviewed-by: Minwoo Im Thanks,

Re: [PATCH 06/16] hw/block/nvme: pass request along for tracing

2020-07-29 Thread Minwoo Im
Klaus, On 20-07-20 13:37:38, Klaus Jensen wrote: > From: Klaus Jensen > > Pass along the NvmeRequest in various functions since it is very useful > for tracing. One doubt here. This patch has put NvmeRequest argument to the nvme_map_prp() to trace the request's command id. But can we just

Re: [PATCH 07/16] hw/block/nvme: add request mapping helper

2020-07-29 Thread Minwoo Im
Klaus, On 20-07-20 13:37:39, Klaus Jensen wrote: > From: Klaus Jensen > > Introduce the nvme_map helper to remove some noise in the main nvme_rw > function. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- > hw/block/nvme.c | 13 ++--- > 1 file changed, 10

Re: [PATCH 09/16] hw/block/nvme: refactor request bounds checking

2020-07-29 Thread Minwoo Im
On 20-07-20 13:37:41, Klaus Jensen wrote: > From: Klaus Jensen > > Hoist bounds checking into its own function and check for wrap-around. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im

Re: [PATCH 08/16] hw/block/nvme: verify validity of prp lists in the cmb

2020-07-29 Thread Minwoo Im
; If some of the PRPs in a PRP list are in the CMB, then ALL entries must > be there. This patch makes sure that requirement is verified as well as > properly announcing support for PRP lists in the CMB. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im

Re: [PATCH 04/16] hw/block/nvme: remove redundant has_sg member

2020-07-29 Thread Minwoo Im
Klaus, On 20-07-20 13:37:36, Klaus Jensen wrote: > From: Klaus Jensen > > Remove the has_sg member from NvmeRequest since it's redundant. > > Also, make sure the request iov is destroyed at completion time. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky > --- >

Re: [PATCH 05/16] hw/block/nvme: refactor dma read/write

2020-07-29 Thread Minwoo Im
Klaus, On 20-07-20 13:37:37, Klaus Jensen wrote: > From: Klaus Jensen > > Refactor the nvme_dma_{read,write}_prp functions into a common function > taking a DMADirection parameter. > > Signed-off-by: Klaus Jensen > Reviewed-by: Maxim Levitsky Reviewed-by: Minwoo Im Thanks,

Re: [PATCH 1/2] nvme: updated shared header for copy command

2020-11-25 Thread Minwoo Im
< 5, > NVME_ONCS_TIMESTAMP = 1 << 6, > +NVME_ONCS_COPY = 1 << 8, > +}; > + > +enum NvmeIdCtrlOcfs { > +NVME_OCFS_COPY_FORMAT_0 = 1 << NVME_COPY_FORMAT_0, I'd prefer (1 << 0) to (1 << enum) which is more obvious and same style with enum NvmeIdCtrlOncs. But I'm fine with both cases. Please add: Reviewed-by: Minwoo Im

Re: [PATCH] hw/block/nvme: add compare command

2020-11-25 Thread Minwoo Im
Hello, On 20-11-24 08:37:14, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add the Compare command. > > This implementation uses a bounce buffer to read in the data from > storage and then compare with the host supplied buffer. > > Signed-off-by: Gollu Appalanaidu > [k.jensen: rebased] >

Re: [PATCH] hw/block/nvme: fix bad clearing of CAP

2020-12-09 Thread Minwoo Im
Hello, Reviewed-by: Minwoo Im

Re: [PATCH v2] hw/block/nvme: add compare command

2020-11-26 Thread Minwoo Im
lu Appalanaidu > [k.jensen: rebased] > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH v8 1/5] hw/block/nvme: remove superfluous NvmeCtrl parameter

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > nvme_check_bounds has no use of the NvmeCtrl parameter; remove it. > > Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > Add a new function, nvme_aio_err, to handle errors resulting from AIOs > and use this from the callbacks. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 61 + > 1 file

Re: [PATCH v8 3/5] hw/block/nvme: add dulbe support

2020-11-16 Thread Minwoo Im
On 11/12 20:59, Klaus Jensen wrote: > From: Klaus Jensen > > Add support for reporting the Deallocated or Unwritten Logical Block > Error (DULBE). > > Rely on the block status flags reported by the block layer and consider > any block with the BDRV_BLOCK_ZERO flag to be deallocated. > >

Re: [PATCH v8 4/5] nvme: add namespace I/O optimization fields to shared header

2020-11-16 Thread Minwoo Im
Stefan Hajnoczi Reviewed-by: Minwoo Im

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

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

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 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 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

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

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 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

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

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

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

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

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

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

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

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

  1   2   3   >