Skip to content
Snippets Groups Projects
Commit 81d07f4f authored by Klaus Jensen's avatar Klaus Jensen
Browse files

hw/block/nvme: refactor nvme_dma


The nvme_dma function doesn't just do DMA (QEMUSGList-based) memory transfers;
it also handles QEMUIOVector copies.

Introduce the NvmeTxDirection enum and rename to nvme_tx. Remove mapping
of PRPs/SGLs from nvme_tx and instead assert that they have been mapped
previously. This allows more fine-grained use in subsequent patches.

Add new (better named) helpers, nvme_{c2h,h2c}, that does both PRP/SGL
mapping and transfer.

Signed-off-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
parent 073d12d9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment