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>
Showing
- hw/block/meson.build 1 addition, 1 deletionhw/block/meson.build
- hw/block/nvme-dif.c 508 additions, 0 deletionshw/block/nvme-dif.c
- hw/block/nvme-dif.h 51 additions, 0 deletionshw/block/nvme-dif.h
- hw/block/nvme-ns.c 12 additions, 1 deletionhw/block/nvme-ns.c
- hw/block/nvme-ns.h 4 additions, 0 deletionshw/block/nvme-ns.h
- hw/block/nvme.c 219 additions, 39 deletionshw/block/nvme.c
- hw/block/nvme.h 31 additions, 0 deletionshw/block/nvme.h
- hw/block/trace-events 11 additions, 0 deletionshw/block/trace-events
- include/block/nvme.h 20 additions, 6 deletionsinclude/block/nvme.h
Loading
Please register or sign in to comment