From 4757cb857934a5e2dcafe1f41e95233f5c0a878d Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Fri, 28 Aug 2020 10:02:45 +0100 Subject: hw/net/allwinner-sun8i-emac: Use AddressSpace for DMA transfers Allow the device to execute the DMA transfers in a different AddressSpace. The H3 SoC keeps using the system_memory address space, but via the proper dma_memory_access() API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank Message-id: 20200814122907.27732-1-f4bug@amsat.org Signed-off-by: Peter Maydell --- include/hw/net/allwinner-sun8i-emac.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/hw') diff --git a/include/hw/net/allwinner-sun8i-emac.h b/include/hw/net/allwinner-sun8i-emac.h index eda034e96b..dd1d7b96cd 100644 --- a/include/hw/net/allwinner-sun8i-emac.h +++ b/include/hw/net/allwinner-sun8i-emac.h @@ -49,6 +49,12 @@ typedef struct AwSun8iEmacState { /** Interrupt output signal to notify CPU */ qemu_irq irq; + /** Memory region where DMA transfers are done */ + MemoryRegion *dma_mr; + + /** Address space used internally for DMA transfers */ + AddressSpace dma_as; + /** Generic Network Interface Controller (NIC) for networking API */ NICState *nic; -- cgit v1.2.3-55-g7522