Klaus Jensen a80b2ce682 hw/block/nvme: add mapping helpers
Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and
use them in nvme_map_prp.

This fixes a bug where in the case of a CMB transfer, the device would
map to the buffer with a wrong length.

Fixes: b2b2b67a00574 ("nvme: Add support for Read Data and Write Data in CMBs.")
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Andrzej Jakowski <andrzej.jakowski@linux.intel.com>
2020-09-02 08:48:50 +02:00
..
2020-09-01 16:51:37 +01:00
2020-09-02 08:48:50 +02:00
2020-09-01 08:38:00 +02:00
2020-09-01 08:38:00 +02:00
2020-08-28 15:14:40 +01:00
2020-09-01 15:19:33 +01:00