|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API |
Date: | Sun, 22 May 2011 18:52:29 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10 |
On 05/22/2011 06:46 PM, Anthony Liguori wrote:
MemoryRegion *is* the dispatch path. Only done declaratively so we can flatten it whenever it changes.We don't want dispatch to be 100% declarative. That's what will cause the API to get horrendously ugly.An example is PCI-bus level endianness conversion. I also believe the Sparc IOMMU has an xor engine.You could add a 'bool swap_endian' and an 'uint32_t xor_mask' in MemoryRegion but now you're adding a ton of platform specific knowledge to what should be an independent layer.
Currently containers do not use the read/write function pointers. We could make them (or perhaps others) act as transformations on the data as it passes. So it's still declarative (the entire flow is known at registration time) but it doesn't embed platform magic.
Byteswap is sufficiently generic to add as a region property, IMO.btw, wrt iommu emulation, the API finally allows us to determine the path between any two devices, so we can apply the right iommu transformations.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Prev in Thread] | Current Thread | [Next in Thread] |