On 10/25/2012 03:03 PM, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann <kra...@redhat.com> wrote: >> On 10/25/12 11:47, Peter Crosthwaite wrote: >>> Just put RAM regions in the unimplemented spaces in the MMIO region. These >>> regions have undefined behaviour, but this at least stops QEMU from >>> segfaulting >>> when the guest bangs on these registers (and sucessfully fakes reading and >>> writing the registers with no side effects). >> >> Should not be needed, memory api should deal with that properly. > > CC Avi, > > Whats going on here is there is a container of size 0x1000 created > with memory_region_init() and a handful of small subregions are > populated. the container is then mapped to a 0x1000 size region of the > system memory. What is supposed to happen when the guest access a > region in the container for which no subregion has been added?
It falls back to the parent container. If there isn't one, something system-specific happens. You can override that by initializing your container with memory_region_init_io(); the callbacks will then receive any accesses which are not caught by any subregion. -- error compiling committee.c: too many arguments to function