[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/13] pcnet: use the DMA memory access interface
From: |
Eduard - Gabriel Munteanu |
Subject: |
[Qemu-devel] [PATCH 11/13] pcnet: use the DMA memory access interface |
Date: |
Sat, 29 Jan 2011 19:40:32 +0200 |
This allows the device to work properly with an emulated IOMMU.
Signed-off-by: Eduard - Gabriel Munteanu <address@hidden>
---
hw/pcnet-pci.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 339a401..3f55c42 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -230,13 +230,13 @@ static void pcnet_mmio_map(PCIDevice *pci_dev, int
region_num,
static void pci_physical_memory_write(void *dma_opaque, target_phys_addr_t
addr,
uint8_t *buf, int len, int do_bswap)
{
- cpu_physical_memory_write(addr, buf, len);
+ dma_memory_write(dma_opaque, addr, buf, len);
}
static void pci_physical_memory_read(void *dma_opaque, target_phys_addr_t addr,
uint8_t *buf, int len, int do_bswap)
{
- cpu_physical_memory_read(addr, buf, len);
+ dma_memory_read(dma_opaque, addr, buf, len);
}
static void pci_pcnet_cleanup(VLANClientState *nc)
@@ -306,6 +306,7 @@ static int pci_pcnet_init(PCIDevice *pci_dev)
s->irq = pci_dev->irq[0];
s->phys_mem_read = pci_physical_memory_read;
s->phys_mem_write = pci_physical_memory_write;
+ s->dma_opaque = &pci_dev->dma;
if (!pci_dev->qdev.hotplugged) {
static int loaded = 0;
--
1.7.3.4
- [Qemu-devel] [PATCH 02/13] pci: add IOMMU support via the generic DMA layer, (continued)
- [Qemu-devel] [PATCH 02/13] pci: add IOMMU support via the generic DMA layer, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 01/13] Generic DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 04/13] ide: use the DMA memory access interface for PCI IDE controllers, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 05/13] rtl8139: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 03/13] AMD IOMMU emulation, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 07/13] ac97: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 08/13] es1370: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 06/13] eepro100: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 09/13] e1000: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 10/13] lsi53c895a: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 11/13] pcnet: use the DMA memory access interface,
Eduard - Gabriel Munteanu <=
- [Qemu-devel] [PATCH 12/13] usb-uhci: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] [PATCH 13/13] usb-ohci: use the DMA memory access interface, Eduard - Gabriel Munteanu, 2011/01/29
- [Qemu-devel] Re: [PATCH 00/13] AMD IOMMU emulation patchset, malc, 2011/01/29