From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXBzd-00039f-1G for qemu-devel@nongnu.org; Sun, 04 Dec 2011 08:20:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXBzb-0005KR-Sn for qemu-devel@nongnu.org; Sun, 04 Dec 2011 08:20:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXBzb-0005KG-LF for qemu-devel@nongnu.org; Sun, 04 Dec 2011 08:20:31 -0500 Message-ID: <4EDB739A.8080201@redhat.com> Date: Sun, 04 Dec 2011 15:20:26 +0200 From: Avi Kivity MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC][PATCH 10/16] memory: Introduce memory_region_init_reservation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , kvm@vger.kernel.org, "Michael S. Tsirkin" , Marcelo Tosatti , qemu-devel , Blue Swirl On 12/03/2011 01:17 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Introduce a memory region type that can reserve I/O space. Such regions > are useful for modeling I/O that is only handled outside of QEMU, i.e. > in the context of an accelerator like KVM. Any access to such a region > from QEMU is a bug and will be reported as such. This is guest triggerable (DMA into the region), so abort() is too drastic. > +void memory_region_init_reservation(MemoryRegion *mr, > + const char *name, > + uint64_t size) > +{ > + memory_region_init(mr, name, size); > + mr->ops = &reservation_ops; > + mr->opaque = mr; > + mr->terminates = true; > + mr->backend_registered = false; > +} Just calling memory_region_init_io() is simpler, no? -- error compiling committee.c: too many arguments to function