From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkAug-0002kF-CI for qemu-devel@nongnu.org; Mon, 09 Jan 2012 03:49:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkAue-0007BA-RI for qemu-devel@nongnu.org; Mon, 09 Jan 2012 03:49:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkAue-0007B1-J5 for qemu-devel@nongnu.org; Mon, 09 Jan 2012 03:49:04 -0500 Message-ID: <4F0AA9FD.5080005@redhat.com> Date: Mon, 09 Jan 2012 10:49:01 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1326045444-3253-1-git-send-email-avi@redhat.com> <4F09E789.1030108@suse.de> In-Reply-To: <4F09E789.1030108@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/2] Remove memory_region_set_offset() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: qemu-devel@nongnu.org On 01/08/2012 08:59 PM, Andreas F=E4rber wrote: > Am 08.01.2012 18:57, schrieb Avi Kivity: > > memory_region_set_offset() is used in only one place, and is deprecat= ed. > > Remove the single use and the function itself. > > Does the removal of the offset mean that memory_region_find() can be > simplified to just return a MemoryRegion* now? :) No. In particular, aliases allow almost the same offsetting capabilities (the difference is that aliases cannot offset beyond ->size (or before 0) while set_offset() can. Consider a vga window at 0xa0000 pointing at the framebuffer at 0xe0000000, with alias_offset 0x10000. A memory_region_find() that finds it will return (mr, .offset_within_region =3D 0x10000), .size =3D 0x8000, there is no way thi= s can be expressed by returning just a memory region (well you could return the alias, but that complicates things for the caller). --=20 error compiling committee.c: too many arguments to function