OSDN Git Service

hw/block/nvme: Support allocated CNS command variants
authorNiklas Cassel <niklas.cassel@wdc.com>
Tue, 8 Dec 2020 20:04:04 +0000 (05:04 +0900)
committerKlaus Jensen <k.jensen@samsung.com>
Mon, 8 Feb 2021 19:58:34 +0000 (20:58 +0100)
commit922e6f4ebd09c69c354b7b008552f0002521f5c8
treeef325ce2fda416d8a71c72a1bb7d2854576f997d
parent141354d55ba92768ea8fad54d441d3ba90d2b59e
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>
hw/block/nvme.c
include/block/nvme.h