On 2011-05-18 21:10, Anthony Liguori wrote:
On 05/18/2011 10:30 AM, Jan Kiszka wrote:
static void i440fx_io_intercept(void *opaque, uint64_t addr, uint32_t
value, int size, MemRegion *next)
{
I440FX *s = opaque;
if (range_overlaps(addr, size, PAM_REGION)) {
...
} else {
dispatch_io(next, addr, value, size);
}
}
There's no need for an explicit intercept mechanism if you make multiple
levels have their own dispatch tables and register progressively larger
regions. In fact....
Actually, things are a bit more complicated: This layer has to properly
adopt the coalescing properties of underlying regions or we cause
performance regressions to VGA emulation. That means it has to register
dispatching slots of the corresponding size and set the coalescing flag
accordingly. And it likely need to adjust them as the regions below change.