hw/nvme: 64-bit pi support
authorNaveen Nagar <naveen.n1@samsung.com>
Tue, 16 Nov 2021 13:26:52 +0000 (18:56 +0530)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 3 Mar 2022 08:30:21 +0000 (09:30 +0100)
commit44219b6029fc52d5e967a963be91a9cf33f9f185
treecbe9fe03c7cad144ed411a2a529d45b3921a4f21
parentac0b34c58d0de09ce692af0a6c9a00a4eed0f3cd
hw/nvme: 64-bit pi support

This adds support for one possible new protection information format
introduced in TP4068 (and integrated in NVMe 2.0): the 64-bit CRC guard
and 48-bit reference tag. This version does not support storage tags.

Like the CRC16 support already present, this uses a software
implementation of CRC64 (so it is naturally pretty slow). But its good
enough for verification purposes.

This may go nicely hand-in-hand with the support that Keith submitted
for the Linux kernel[1].

  [1]: https://lore.kernel.org/linux-nvme/20220126165214.GA1782352@dhcp-10-100-145-180.wdc.com/T/

Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Naveen Nagar <naveen.n1@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
hw/nvme/dif.c
hw/nvme/dif.h
hw/nvme/ns.c
hw/nvme/nvme.h
hw/nvme/trace-events
include/block/nvme.h