diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-15 22:18:19 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-31 01:05:23 +0100 |
commit | e2d784b67dc724a9b0854b49255ba0ee8ca46543 (patch) | |
tree | 6271b6862784be702db97a9d90754fd97235af73 /include/hw/pci | |
parent | 5e468a36dcdd8fd5eb04282842b72967a29875e4 (diff) | |
download | qemu-e2d784b67dc724a9b0854b49255ba0ee8ca46543.zip qemu-e2d784b67dc724a9b0854b49255ba0ee8ca46543.tar.gz qemu-e2d784b67dc724a9b0854b49255ba0ee8ca46543.tar.bz2 |
pci: Let pci_dma_rw() take MemTxAttrs argument
Let devices specify transaction attributes when calling pci_dma_rw().
Keep the default MEMTXATTRS_UNSPECIFIED in the few callers.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211223115554.3155328-10-philmd@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r-- | include/hw/pci/pci.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 1acefc2..a751ab5 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -806,10 +806,10 @@ static inline AddressSpace *pci_get_address_space(PCIDevice *dev) */ static inline MemTxResult pci_dma_rw(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len, - DMADirection dir) + DMADirection dir, MemTxAttrs attrs) { return dma_memory_rw(pci_get_address_space(dev), addr, buf, len, - dir, MEMTXATTRS_UNSPECIFIED); + dir, attrs); } /** @@ -827,7 +827,8 @@ static inline MemTxResult pci_dma_rw(PCIDevice *dev, dma_addr_t addr, static inline MemTxResult pci_dma_read(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len) { - return pci_dma_rw(dev, addr, buf, len, DMA_DIRECTION_TO_DEVICE); + return pci_dma_rw(dev, addr, buf, len, + DMA_DIRECTION_TO_DEVICE, MEMTXATTRS_UNSPECIFIED); } /** @@ -845,7 +846,8 @@ static inline MemTxResult pci_dma_read(PCIDevice *dev, dma_addr_t addr, static inline MemTxResult pci_dma_write(PCIDevice *dev, dma_addr_t addr, const void *buf, dma_addr_t len) { - return pci_dma_rw(dev, addr, (void *) buf, len, DMA_DIRECTION_FROM_DEVICE); + return pci_dma_rw(dev, addr, (void *) buf, len, + DMA_DIRECTION_FROM_DEVICE, MEMTXATTRS_UNSPECIFIED); } #define PCI_DMA_DEFINE_LDST(_l, _s, _bits) \ |