From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNML-0003kb-E8 for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRNMF-0006F7-BN for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:20:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRNMF-0006Ep-15 for qemu-devel@nongnu.org; Thu, 25 Oct 2012 09:20:23 -0400 Message-ID: <50893C8E.2010405@redhat.com> Date: Thu, 25 Oct 2012 15:20:14 +0200 From: Avi Kivity MIME-Version: 1.0 References: <50892E39.3070408@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 8/8] usb/ehci: Put RAM in undefined MMIO regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: vineshp@xilinx.com, peter.maydell@linaro.org, qemu-devel@nongnu.org, john.williams@xilinx.com, Gerd Hoffmann , edgar.iglesias@gmail.com On 10/25/2012 03:03 PM, Peter Crosthwaite wrote: > On Thu, Oct 25, 2012 at 10:19 PM, Gerd Hoffmann 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