hw/block/nvme: support multiple lba formats
commit6a674bc295527c9acb1404b85be8d225b5bbac9d
authorMinwoo Im <minwoo.im@samsung.com>
Fri, 12 Feb 2021 11:25:08 +0000 (12 12:25 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Thu, 18 Mar 2021 11:34:52 +0000 (18 12:34 +0100)
tree4e8755b0ee7385993ae00f7c0c0e0714a6f9e9df
parentf7dcd31885cbe801cac95536a279bbc7e55af4f6
hw/block/nvme: support multiple lba formats

This patch introduces multiple LBA formats supported with the typical
logical block sizes of 512 bytes and 4096 bytes as well as metadata
sizes of 0, 8, 16 and 64 bytes. The format will be chosed based on the
lbads and ms parameters of the nvme-ns device.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
[k.jensen: resurrected and rebased]
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
hw/block/nvme-ns.c