diff options
author | Niklas Cassel <niklas.cassel@wdc.com> | 2020-12-09 05:04:04 +0900 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-02-08 20:58:34 +0100 |
commit | 922e6f4ebd09c69c354b7b008552f0002521f5c8 (patch) | |
tree | ef325ce2fda416d8a71c72a1bb7d2854576f997d /include/block | |
parent | 141354d55ba92768ea8fad54d441d3ba90d2b59e (diff) | |
download | qemu-922e6f4ebd09c69c354b7b008552f0002521f5c8.zip qemu-922e6f4ebd09c69c354b7b008552f0002521f5c8.tar.gz qemu-922e6f4ebd09c69c354b7b008552f0002521f5c8.tar.bz2 |
hw/block/nvme: Support allocated CNS command variants
Many CNS commands have "allocated" command variants. These include
a namespace as long as it is allocated, that is a namespace is
included regardless if it is active (attached) or not.
While these commands are optional (they are mandatory for controllers
supporting the namespace attachment command), our QEMU implementation
is more complete by actually providing support for these CNS values.
However, since our QEMU model currently does not support the namespace
attachment command, these new allocated CNS commands will return the
same result as the active CNS command variants.
The reason for not hooking up this command completely is because the
NVMe specification requires the namespace management command to be
supported if the namespace attachment command is supported.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/nvme.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/block/nvme.h b/include/block/nvme.h index 19347cf..adb5806 100644 --- a/include/block/nvme.h +++ b/include/block/nvme.h @@ -813,14 +813,18 @@ typedef struct QEMU_PACKED NvmePSD { #define NVME_IDENTIFY_DATA_SIZE 4096 enum NvmeIdCns { - NVME_ID_CNS_NS = 0x00, - NVME_ID_CNS_CTRL = 0x01, - NVME_ID_CNS_NS_ACTIVE_LIST = 0x02, - NVME_ID_CNS_NS_DESCR_LIST = 0x03, - NVME_ID_CNS_CS_NS = 0x05, - NVME_ID_CNS_CS_CTRL = 0x06, - NVME_ID_CNS_CS_NS_ACTIVE_LIST = 0x07, - NVME_ID_CNS_IO_COMMAND_SET = 0x1c, + NVME_ID_CNS_NS = 0x00, + NVME_ID_CNS_CTRL = 0x01, + NVME_ID_CNS_NS_ACTIVE_LIST = 0x02, + NVME_ID_CNS_NS_DESCR_LIST = 0x03, + NVME_ID_CNS_CS_NS = 0x05, + NVME_ID_CNS_CS_CTRL = 0x06, + NVME_ID_CNS_CS_NS_ACTIVE_LIST = 0x07, + NVME_ID_CNS_NS_PRESENT_LIST = 0x10, + NVME_ID_CNS_NS_PRESENT = 0x11, + NVME_ID_CNS_CS_NS_PRESENT_LIST = 0x1a, + NVME_ID_CNS_CS_NS_PRESENT = 0x1b, + NVME_ID_CNS_IO_COMMAND_SET = 0x1c, }; typedef struct QEMU_PACKED NvmeIdCtrl { |