qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH,RFC]: Generic memory callback regions


From: Joe Batt
Subject: Re: [Qemu-devel] [PATCH,RFC]: Generic memory callback regions
Date: Tue, 01 Jun 2004 06:13:41 -0500

I haven't read your patch, but I recently wrote a SH2 emulator.  We
found that a lot of time was spent finding the right callbacks, so for
the device memory, we used a sorted array.  After each access, we
bubbled that memory region closed to the beginning of the array.  This
turned out to be faster than the tree that we were using.  The main
differences are we have 100+ regions and implemented it in Java.

Joe

On Mon, 2004-05-31 at 21:53, Gianni Tedesco wrote:
> Hi,
> 
> This patch adds an API for CONFIG_SOFTMMU mode that hardware drivers can
> use to add memory regions backed by callback functions. It simply adds a
> layer for storing opaque data above the basic cpu_register_io_memory /
> cpu_register_physical memory functions. I used a linked list to store
> the data structures, i think O(ln/2) avg. lookup time will be fine as I
> don't envisage many of these regions existing.
> 
> I've tested it as far as I currently can for the pciproxy code and it
> seems to do the correct thing. I could work around this manually within
> the pciproxy code itself, but I figured a generic interface would be
> something useful for other drivers (such as any PCI card with MMIO
> resources).
> 
> Ideas / thoughts / bugs?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]