[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/3] hw/pci: Introduce pci_dma_memory_region() helper
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 1/3] hw/pci: Introduce pci_dma_memory_region() helper |
Date: |
Thu, 26 Aug 2021 22:07:18 +0200 |
pci_get_address_space() returns an AddressSpace. In some
cases we want a MemoryRegion. Add the pci_dma_memory_region()
equivalent helper.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
include/hw/pci/pci.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index d0f4266e372..5860f42e400 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -786,6 +786,11 @@ static inline AddressSpace
*pci_get_address_space(PCIDevice *dev)
return &dev->bus_master_as;
}
+static inline MemoryRegion *pci_dma_memory_region(PCIDevice *dev)
+{
+ return &dev->bus_master_container_region;
+}
+
/**
* pci_dma_rw: Read from or write to an address space from PCI device.
*
--
2.31.1
- [PATCH v3 0/3] hw/usb: Always expect 'dma' link property to be set to simplify, Philippe Mathieu-Daudé, 2021/08/26
- [PATCH v3 1/3] hw/pci: Introduce pci_dma_memory_region() helper,
Philippe Mathieu-Daudé <=
- [PATCH v3 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Philippe Mathieu-Daudé, 2021/08/26
- [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Philippe Mathieu-Daudé, 2021/08/26
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Mark Cave-Ayland, 2021/08/26
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Peter Maydell, 2021/08/27
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Mark Cave-Ayland, 2021/08/27
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Peter Maydell, 2021/08/27
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Mark Cave-Ayland, 2021/08/27
- Re: [PATCH v3 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Philippe Mathieu-Daudé, 2021/08/27