[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/8] rc4030: create custom DMA address space
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/8] rc4030: create custom DMA address space |
Date: |
Thu, 26 Mar 2015 15:15:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 25/03/2015 20:10, Hervé Poussineau wrote:
> Le 25/03/2015 15:45, Paolo Bonzini a écrit :
>>
>>
>> On 05/03/2015 23:13, Hervé Poussineau wrote:
>>> Add a new memory region in system address space where DMA address space
>>> definition (the 'translation table') belongs, so we can update on the
>>> fly
>>> the DMA address space.
>>>
>>> Signed-off-by: Hervé Poussineau <address@hidden>
>>
>> Would it make sense to just use an IOMMU region for the DMA address
>> space?
>
> I don't really know. Currently, the first user is the dp8393x network
> card (a sysbus device), which is connected through the DMA address space.
> It means that *every* read or write access needs to be translated, even
> those accessing 1 or 2 bytes. dp8393x has no direct connection to the
> system memory.
> On some other machines, like the m68k Quadra 800, the dp8393x is only
> connected to the system memory.
>
> A second user is the ESP SCSI card in DMA mode, using the DMA address
> space with the help of the DMA controller.
>
> As DMA address space mapping doesn't change much (except initialization
> phases), and that it is used for small (1 or 2 bytes) and big transfers
> (network packets and disk accesses), I thought that an address space was
> better.
Both are okay. The IOMMU makes address space changes faster; your
scheme is basically a form of caching, it trades update performance for
improved translation performance.
The trick you're using with shadowing the RAM is nifty, but it leaks a
memory region. I'll reply to the main patch.
Paolo
- [Qemu-devel] [PATCH 0/8] net/dp8393x improvements, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 2/8] rc4030: use AddressSpace and address_space_rw in users, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 3/8] net/dp8393x: always calculate proper checksums, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 5/8] net/dp8393x: use dp8393x_ prefix for all functions, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 4/8] net/dp8393x: do not use old_mmio accesses, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 7/8] net/dp8393x: add PROM to store MAC address, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 6/8] net/dp8393x: QOM'ify, Hervé Poussineau, 2015/03/05
- [Qemu-devel] [PATCH 8/8] net/dp8393x: add load/save support, Hervé Poussineau, 2015/03/05
- Re: [Qemu-devel] [PATCH 0/8] net/dp8393x improvements, Leon Alrae, 2015/03/25