[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 06/14] hw/block/nvme: Add support for active/inactive name
From: |
Klaus Jensen |
Subject: |
Re: [PATCH v4 06/14] hw/block/nvme: Add support for active/inactive namespaces |
Date: |
Thu, 24 Sep 2020 14:12:03 +0200 |
On Sep 24 03:20, Dmitry Fomichev wrote:
> From: Niklas Cassel <niklas.cassel@wdc.com>
>
> In NVMe, a namespace is active if it exists and is attached to the
> controller.
>
> CAP.CSS (together with the I/O Command Set data structure) defines what
> command sets are supported by the controller.
>
> CC.CSS (together with Set Profile) can be set to enable a subset of the
> available command sets. The namespaces belonging to a disabled command set
> will not be able to attach to the controller, and will thus be inactive.
>
> E.g., if the user sets CC.CSS to Admin Only, NVM namespaces should be
> marked as inactive.
>
Hmm. I'm not convinced that this is correct. Can you reference the spec?
On the specific case you mention the spec is actually pretty clear:
"When only the Admin Command Set is supported, any command submitted
on an I/O Submission Queue and any I/O Command Set Specific Admin
command submitted on the Admin Submission Queue is completed with
status Invalid Command Opcode."
My /interpretation/ (because the spec is vague on this point) is that
with TP 4056, if the host writes 0x0 to CC.CSS, you will (should) just
see Invalid Command Opcode for namespaces not supporting the NVM command
set since we are operating in a backward compatible way.
Now, if the host sets CC.CSS to 0x6, then it is obviously aware of
namespaces and other rules apply. For instance, it may set the I/O
Command Set Combination Index through a Set Features command, but TP
4056 is clear that the host will not be allowed to choose a combination
that leaves an attached namespace unsupported.
For this device, that does not implement namespace management and thus
has no notion of attaching/detaching namespaces, the controller should
by default choose an I/O Command Set Combination that indicates support
for all I/O command sets that are required to support the namespaces
configured.
signature.asc
Description: PGP signature
- [PATCH v4 00/14] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set, Dmitry Fomichev, 2020/09/23
- [PATCH v4 02/14] hw/block/nvme: Add Commands Supported and Effects log, Dmitry Fomichev, 2020/09/23
- [PATCH v4 01/14] hw/block/nvme: Report actual LBA data shift in LBAF, Dmitry Fomichev, 2020/09/23
- [PATCH v4 03/14] hw/block/nvme: Introduce the Namespace Types definitions, Dmitry Fomichev, 2020/09/23
- [PATCH v4 04/14] hw/block/nvme: Define trace events related to NS Types, Dmitry Fomichev, 2020/09/23
- [PATCH v4 06/14] hw/block/nvme: Add support for active/inactive namespaces, Dmitry Fomichev, 2020/09/23
- Re: [PATCH v4 06/14] hw/block/nvme: Add support for active/inactive namespaces,
Klaus Jensen <=
[PATCH v4 07/14] hw/block/nvme: Make Zoned NS Command Set definitions, Dmitry Fomichev, 2020/09/23
[PATCH v4 05/14] hw/block/nvme: Add support for Namespace Types, Dmitry Fomichev, 2020/09/23
[PATCH v4 08/14] hw/block/nvme: Define Zoned NS Command Set trace events, Dmitry Fomichev, 2020/09/23
[PATCH v4 10/14] hw/block/nvme: Introduce max active and open zone limits, Dmitry Fomichev, 2020/09/23
[PATCH v4 12/14] hw/block/nvme: Add injection of Offline/Read-Only zones, Dmitry Fomichev, 2020/09/23
[PATCH v4 09/14] hw/block/nvme: Support Zoned Namespace Command Set, Dmitry Fomichev, 2020/09/23