From: Minwoo Im <minwoo.im.dev@gmail.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Keith Busch <kbusch@kernel.org>, Klaus Jensen <its@irrelevant.dk>,
Minwoo Im <minwoo.im.dev@gmail.com>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: [PATCH V4 0/6] hw/block/nvme: support multi-path for ctrl/ns
Date: Fri, 22 Jan 2021 07:09:02 +0900 [thread overview]
Message-ID: <20210121220908.14247-1-minwoo.im.dev@gmail.com> (raw)
Hello,
This series is fourth series for the support of NVMe subsystem scheme
with multi-controller and namespace sharing in a subsystem.
This time, I've removed 'detached' scheme introduced in the previous
series out of this series to focus on subsystem scheme in ths series.
The attach/detach scheme will be introduced in the next series with
ns-mgmt functionality.
Here's an example of how-to:
# Specify a subsystem
-device nvme-subsys,id=subsys0 \
-device nvme,serial=foo,id=nvme0,subsys=subsys0 \
-device nvme,serial=bar,id=nvme1,subsys=subsys0 \
-device nvme,serial=baz,id=nvme2,subsys=subsys0 \
-device nvme-ns,id=ns1,drive=drv10,nsid=1,subsys=subsys0 \
-device nvme-ns,id=ns2,drive=drv11,nsid=2,bus=nvme2 \
\
# Not specify a subsystem
-device nvme,serial=qux,id=nvme3 \
-device nvme-ns,id=ns3,drive=drv12,nsid=3,bus=nvme3 \
# nvme list -v
NVM Express Subsystems
Subsystem Subsystem-NQN Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys1 nqn.2019-08.org.qemu:subsys0 nvme0, nvme1, nvme2
nvme-subsys3 nqn.2019-08.org.qemu:qux nvme3
NVM Express Controllers
Device SN MN FR TxPort Address Subsystem Namespaces
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme0 foo QEMU NVMe Ctrl 1.0 pcie 0000:00:06.0 nvme-subsys1 nvme1c0n1
nvme1 bar QEMU NVMe Ctrl 1.0 pcie 0000:00:07.0 nvme-subsys1 nvme1c1n1
nvme2 baz QEMU NVMe Ctrl 1.0 pcie 0000:00:08.0 nvme-subsys1 nvme1c2n1, nvme1c2n2
nvme3 qux QEMU NVMe Ctrl 1.0 pcie 0000:00:09.0 nvme-subsys3 nvme3c3n1
NVM Express Namespaces
Device NSID Usage Format Controllers
------------ -------- -------------------------- ---------------- ----------------
nvme1n1 1 134.22 MB / 134.22 MB 512 B + 0 B nvme0, nvme1, nvme2
nvme1n2 2 268.44 MB / 268.44 MB 512 B + 0 B nvme2
nvme3n1 3 268.44 MB / 268.44 MB 512 B + 0 B nvme3
Thanks,
Since RFC V3:
- Exclude 'deatched' scheme from this series. This will be covered in
the next series by covering all the ns-related admin commands
including ZNS and ns-mgmt. (Niklas)
- Rebased on nvme-next.
- Remove RFC tag from this V4.
Since RFC V2:
- Rebased on nvme-next branch with trivial patches from the previous
version(V2) applied. (Klaus)
- Fix enumeration type name convention with NvmeIdNs prefix. (Klaus)
- Put 'cntlid' to NvmeCtrl instance in nvme_init_ctrl() which was
missed in V2.
- Added 'detached' parameter to nvme-ns device to decide whether to
attach 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/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 value for Identify Namespace
hw/block/nvme: support for shared namespace in subsystem
hw/block/meson.build | 2 +-
hw/block/nvme-ns.c | 23 +++++++--
hw/block/nvme-ns.h | 7 +++
hw/block/nvme-subsys.c | 109 +++++++++++++++++++++++++++++++++++++++++
hw/block/nvme-subsys.h | 32 ++++++++++++
hw/block/nvme.c | 77 ++++++++++++++++++++++++++---
hw/block/nvme.h | 4 ++
include/block/nvme.h | 8 +++
8 files changed, 249 insertions(+), 13 deletions(-)
create mode 100644 hw/block/nvme-subsys.c
create mode 100644 hw/block/nvme-subsys.h
--
2.17.1
next reply other threads:[~2021-01-21 22:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 22:09 Minwoo Im [this message]
2021-01-21 22:09 ` [PATCH V4 1/6] hw/block/nvme: introduce nvme-subsys device Minwoo Im
2021-01-21 22:52 ` Keith Busch
2021-01-21 23:40 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 2/6] hw/block/nvme: support to map controller to a subsystem Minwoo Im
2021-01-21 23:03 ` Keith Busch
2021-01-21 23:41 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 3/6] hw/block/nvme: add CMIC enum value for Identify Controller Minwoo Im
2021-01-21 22:09 ` [PATCH V4 4/6] hw/block/nvme: support for multi-controller in subsystem Minwoo Im
2021-01-21 23:17 ` Keith Busch
2021-01-21 23:41 ` Minwoo Im
2021-01-21 22:09 ` [PATCH V4 5/6] hw/block/nvme: add NMIC enum value for Identify Namespace Minwoo Im
2021-01-21 22:09 ` [PATCH V4 6/6] hw/block/nvme: support for shared namespace in subsystem Minwoo Im
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210121220908.14247-1-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.com \
--cc=its@irrelevant.dk \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).