OSDN Git Service

hw/block/nvme: end-to-end data protection
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 4 Feb 2021 08:55:48 +0000 (09:55 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 18 Mar 2021 11:34:51 +0000 (12:34 +0100)
commit146f720c55637410062041f68dc908645cd18aaa
treecee4032d0543f13643b2cec0dd47687902c0fb60
parentbc3a65e99254cfe001bd16a569a5aa7d20f930e8
hw/block/nvme: end-to-end data protection

Add support for namespaces formatted with protection information. The
type of end-to-end data protection (i.e. Type 1, Type 2 or Type 3) is
selected with the `pi` nvme-ns device parameter. If the number of
metadata bytes is larger than 8, the `pil` nvme-ns device parameter may
be used to control the location of the 8-byte DIF tuple. The default
`pil` value of '0', causes the DIF tuple to be transferred as the last
8 bytes of the metadata. Set to 1 to store this in the first eight bytes
instead.

Co-authored-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
hw/block/meson.build
hw/block/nvme-dif.c [new file with mode: 0644]
hw/block/nvme-dif.h [new file with mode: 0644]
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