hw/block/nvme: fix prp mapping status codes
commit28fee5b5d02d59a2b039c71a0a72292b1bc7f75b
authorGollu Appalanaidu <anaidu.gollu@samsung.com>
Mon, 19 Oct 2020 07:11:31 +0000 (19 12:41 +0530)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 27 Oct 2020 10:29:25 +0000 (27 11:29 +0100)
tree5c905de76cc0640f0c76724d540347d835f1dc7b
parentb865cabf735be793789ad2c7eac97f47a1325966
hw/block/nvme: fix prp mapping status codes

Address 0 is not an invalid address. Remove those invalikd checks.

Unaligned PRP2 and PRP list entries should result in Invalid PRP Offset
status code and not Invalid Field. Fix that.

See NVMe Express v1.3d, Section 4.3 ("Physical Region Page Entry and
List").

Suggested-by: Keith Busch <kbusch@kernel.org>
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/nvme.c
hw/block/trace-events
include/block/nvme.h