From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Mfo-0006wA-Rb for qemu-devel@nongnu.org; Sun, 18 Sep 2011 15:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5Mfn-0001rJ-1E for qemu-devel@nongnu.org; Sun, 18 Sep 2011 15:05:04 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:49868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Mfm-0001qG-Hf for qemu-devel@nongnu.org; Sun, 18 Sep 2011 15:05:02 -0400 Message-ID: <4E7640C8.8040600@web.de> Date: Sun, 18 Sep 2011 21:04:40 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E75EA08.4090809@web.de> <4E7614CC.4000206@redhat.com> <4E761C66.9010208@web.de> <4E762064.6010108@redhat.com> In-Reply-To: <4E762064.6010108@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig07CAE7D91D9C0C40E4E687C1" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] isa: Avoid using obsolete memory_region_set_offset for old portio List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel , Richard Henderson This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig07CAE7D91D9C0C40E4E687C1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-09-18 18:46, Avi Kivity wrote: > On 09/18/2011 07:29 PM, Jan Kiszka wrote: >> On 2011-09-18 17:57, Avi Kivity wrote: >> > On 09/18/2011 03:54 PM, Jan Kiszka wrote: >> >> From: Jan Kiszka >> >> >> >> We can express the offset of old portio completely via >> >> MemoryRegionPortio::offset by splitting up regions of different >> offsets >> >> and adjusting those offsets appropriately. >> > >> > Please split into two patches - core and isa. >> >> They depend on each other. >=20 > How can memory.c depend on isa.c? >=20 > If you make the core patch add both mr->offset and mrp->offset, then > change isa to drop memory_region_set_offset(), instead adding the delta= > to mrp->offset, does that not work out? Nope. The old API accepted arbitrary portio lists per memory region, the new requires one region with a consistent offset per range. I should have documented it... >=20 >> > And I >> > don't want to remove memory_region_set_offset() until everything (t= hat >> > can potentially use it, at least) has been converted. >> >> IMO it's easier to fix those potential users before converting them. Y= ou >> need to review them anyway to decide if an offset might be needed, and= >> which one precisely. >> >> Are you aware of any candidates? For PIO, there should be none now. >=20 > For pio, none, but mmio has some: >=20 > hw/sh7750.c: cpu_register_physical_memory_offset(0x1f000000, 0x1000,= > hw/sh7750.c: cpu_register_physical_memory_offset(0xff000000, 0x1000,= > hw/sh7750.c: cpu_register_physical_memory_offset(0x1f800000, 0x1000,= > hw/sh7750.c: cpu_register_physical_memory_offset(0xff800000, 0x1000,= > hw/sh7750.c: cpu_register_physical_memory_offset(0x1fc00000, 0x1000,= > hw/sh7750.c: cpu_register_physical_memory_offset(0xffc00000, 0x1000,= > hw/sh_intc.c: =20 > cpu_register_physical_memory_offset(P4ADDR(address), 4, > hw/sh_intc.c: =20 > cpu_register_physical_memory_offset(A7ADDR(address), 4, Cool, that's all. Trivial to fix, just push the offset math into those few handler. Then we can drop cpu_register_physical_memory_offset as well= =2E Jan --------------enig07CAE7D91D9C0C40E4E687C1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk52QMwACgkQitSsb3rl5xR0HwCgvzNQdWuGCAxtCCWfKtB+VMdR j38An1h9rk82qsqFNaYPmDmrVTDoGNQN =2UaW -----END PGP SIGNATURE----- --------------enig07CAE7D91D9C0C40E4E687C1--