From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMyY9-0007xS-SS for qemu-devel@nongnu.org; Thu, 19 May 2011 04:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMyY8-0005jU-Lj for qemu-devel@nongnu.org; Thu, 19 May 2011 04:25:41 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:50430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMyY8-0005jJ-9k for qemu-devel@nongnu.org; Thu, 19 May 2011 04:25:40 -0400 Message-ID: <4DD4D402.5000606@web.de> Date: Thu, 19 May 2011 10:25:38 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4DD3C5B9.1080908@redhat.com> <4DD420A5.2020606@web.de> <4DD4CF76.2080904@redhat.com> <4DD4CFF5.6040805@web.de> <4DD4D137.3030605@redhat.com> In-Reply-To: <4DD4D137.3030605@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF67F50F8199C88C95E6D7450" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [RFC] Memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF67F50F8199C88C95E6D7450 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-05-19 10:13, Avi Kivity wrote: > On 05/19/2011 11:08 AM, Jan Kiszka wrote: >> On 2011-05-19 10:06, Avi Kivity wrote: >> > On 05/18/2011 10:40 PM, Jan Kiszka wrote: >> >> On 2011-05-18 15:12, Avi Kivity wrote: >> >> > void cpu_register_memory_region(MemoryRegion *mr, >> >> target_phys_addr_t addr); >> >> >> >> OK, let's allow overlapping, but make it explicit: >> >> >> >> void cpu_register_memory_region_overlap(MemoryRegion *mr, >> >> target_phys_addr_t addr, >> >> int priority); >> >> >> >> We need that ordering, so we need an interface. Regions registered= >> via >> >> cpu_register_memory_region must not overlap with existing one or >> we will >> >> throw an hwerror. And they shall get a low default priority. >> >> >> > >> > PCI BARs can overlap with anything. So any region can overlap with= >> any >> > other region. >> >> I know, but that result is unspecified anyway. The user (guest OS) can= 't >> expect any reasonable result. We rather need priorities for useful >> overlapping. >=20 > Unspecified doesn't mean abort. It means we need to specify something > (which translates to: we get to pick the priorities). Of course, PCI bars would have to be registered via cpu_register_memory_region_overlap, just specifying the default priority. Here we know that overlapping can happen and is not a bug in the board emulation. I want to avoid that such use cases make overlapping generally legal, papering over real bugs. Jan --------------enigF67F50F8199C88C95E6D7450 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk3U1AIACgkQitSsb3rl5xTe7ACg1Wdy6QTF1C5PQxJqLTkp9wqB JDYAnRUWcVlAGzp1bmUjKuMN1vPia+d/ =3O0y -----END PGP SIGNATURE----- --------------enigF67F50F8199C88C95E6D7450--