diff options
author | Klaus Jensen | 2020-02-23 14:21:52 +0100 |
---|---|---|
committer | Klaus Jensen | 2020-09-02 08:48:50 +0200 |
commit | a80b2ce68251cf5b11c450173128f29223045b9c (patch) | |
tree | b21544852019b8fe1f8f099dc03f2411cc84fdc8 /hw/block/trace-events | |
parent | hw/block/nvme: memset preallocated requests structures (diff) | |
download | qemu-a80b2ce68251cf5b11c450173128f29223045b9c.tar.gz qemu-a80b2ce68251cf5b11c450173128f29223045b9c.tar.xz qemu-a80b2ce68251cf5b11c450173128f29223045b9c.zip |
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>
Diffstat (limited to 'hw/block/trace-events')
-rw-r--r-- | hw/block/trace-events | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/block/trace-events b/hw/block/trace-events index 7b7303cab1..f3b2d004e0 100644 --- a/hw/block/trace-events +++ b/hw/block/trace-events @@ -33,6 +33,8 @@ pci_nvme_irq_msix(uint32_t vector) "raising MSI-X IRQ vector %u" pci_nvme_irq_pin(void) "pulsing IRQ pin" pci_nvme_irq_masked(void) "IRQ is masked" pci_nvme_dma_read(uint64_t prp1, uint64_t prp2) "DMA read, prp1=0x%"PRIx64" prp2=0x%"PRIx64"" +pci_nvme_map_addr(uint64_t addr, uint64_t len) "addr 0x%"PRIx64" len %"PRIu64"" +pci_nvme_map_addr_cmb(uint64_t addr, uint64_t len) "addr 0x%"PRIx64" len %"PRIu64"" pci_nvme_io_cmd(uint16_t cid, uint32_t nsid, uint16_t sqid, uint8_t opcode) "cid %"PRIu16" nsid %"PRIu32" sqid %"PRIu16" opc 0x%"PRIx8"" pci_nvme_admin_cmd(uint16_t cid, uint16_t sqid, uint8_t opcode) "cid %"PRIu16" sqid %"PRIu16" opc 0x%"PRIx8"" pci_nvme_rw(const char *verb, uint32_t blk_count, uint64_t byte_count, uint64_t lba) "%s %"PRIu32" blocks (%"PRIu64" bytes) from LBA %"PRIu64"" |