hw/block/nvme: add simple copy command
commite4e430b3d6baa1c908ba71ca37aad87edac98804
authorKlaus Jensen <k.jensen@samsung.com>
Fri, 6 Nov 2020 09:46:01 +0000 (6 10:46 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 9 Mar 2021 10:00:57 +0000 (9 11:00 +0100)
tree726602000b64b5c5511a45955e71b9892e7d78fe
parent3862efff316c1d02b41d1362f97dfba812050e53
hw/block/nvme: add simple copy command

Add support for TP 4065a ("Simple Copy Command"), v2020.05.04
("Ratified").

The implementation uses a bounce buffer to first read in the source
logical blocks, then issue a write of that bounce buffer. The default
maximum number of source logical blocks is 128, translating to 512 KiB
for 4k logical blocks which aligns with the default value of MDTS.

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