hw/block/nvme: add support for the format nvm command
commitdc04d25e2f3f7e26f7f97b860992076b5f04afdb
authorMinwoo Im <minwoo.im@samsung.com>
Fri, 12 Feb 2021 12:11:39 +0000 (12 13:11 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 18 Mar 2021 11:41:43 +0000 (18 12:41 +0100)
tree27067390d00c1e37f03805485bbf7e55bb9f3369
parent516990f4df4f7bf9f86d38af71ead7175df15c19
hw/block/nvme: add support for the format nvm command

Format NVM admin command can make a namespace or namespaces to be
with different LBA size and metadata size with protection information
types.

This patch introduces Format NVM command with LBA format, Metadata, and
Protection Information for the device. The secure erase operation things
and support for formatting zoned namespaces are yet to be added.

The parameter checks inside of this patch has been referred from
Keith's old branch.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
[anaidu.gollu: rebased on e2e]
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
[k.jensen: rebased for reworked aio tracking]
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
hw/block/nvme-ns.c
hw/block/nvme-ns.h
hw/block/nvme.c
hw/block/nvme.h
hw/block/trace-events
include/block/nvme.h