hw/block/nvme: Add support for Namespace Types
commit141354d55ba92768ea8fad54d441d3ba90d2b59e
authorNiklas Cassel <niklas.cassel@wdc.com>
Tue, 8 Dec 2020 20:04:03 +0000 (9 05:04 +0900)
committerKlaus Jensen <k.jensen@samsung.com>
Mon, 8 Feb 2021 19:58:34 +0000 (8 20:58 +0100)
tree111037ea589ec772df564e6c32f3a50503602c02
parent62e8faa468109ae66b55a038cbd268ad6e40472b
hw/block/nvme: Add support for Namespace Types

Define the structures and constants required to implement
Namespace Types support.

Namespace Types introduce a new command set, "I/O Command Sets",
that allows the host to retrieve the command sets associated with
a namespace. Introduce support for the command set and enable
detection for the NVM Command Set.

The new workflows for identify commands rely heavily on zero-filled
identify structs. E.g., certain CNS commands are defined to return
a zero-filled identify struct when an inactive namespace NSID
is supplied.

Add a helper function in order to avoid code duplication when
reporting zero-filled identify structures.

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-ns.c
hw/block/nvme-ns.h
hw/block/nvme.c
hw/block/trace-events
include/block/nvme.h