From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6HFe-00088y-6I for qemu-devel@nongnu.org; Mon, 05 Aug 2013 05:39:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6HFW-0003m2-Qc for qemu-devel@nongnu.org; Mon, 05 Aug 2013 05:38:54 -0400 Received: from mout.web.de ([212.227.17.12]:65237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6HFW-0003lE-GW for qemu-devel@nongnu.org; Mon, 05 Aug 2013 05:38:46 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LclHj-1UMSdH13hv-00k4bE for ; Mon, 05 Aug 2013 11:38:44 +0200 Message-ID: <51FF729E.3070806@web.de> Date: Mon, 05 Aug 2013 11:38:38 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <51FCBFCD.5020608@web.de> <51FF71BD.5040400@suse.de> In-Reply-To: <51FF71BD.5040400@suse.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dKrPxMgHpTFUgDP8eDW6nQ3VCD5M5JrnD" Subject: Re: [Qemu-devel] [PATCH 1/2] memory: Provide separate handling of unassigned io ports accesses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: Paolo Bonzini , qemu-devel , Aurelien Jarno , Peter Maydell This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dKrPxMgHpTFUgDP8eDW6nQ3VCD5M5JrnD Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-08-05 11:34, Andreas F=E4rber wrote: > Am 03.08.2013 10:31, schrieb Jan Kiszka: >> From: Jan Kiszka >> >> Accesses to unassigned io ports shall return -1 on read and be ignored= >> on write. Ensure these properties via dedicated ops, decoupling us fro= m >> the memory core's handling of unassigned accesses. >> >> Signed-off-by: Jan Kiszka >> --- >> exec.c | 3 ++- >> include/exec/ioport.h | 2 ++ >> ioport.c | 16 ++++++++++++++++ >> 3 files changed, 20 insertions(+), 1 deletions(-) >> >> diff --git a/exec.c b/exec.c >> index 3ca9381..9ed598f 100644 >> --- a/exec.c >> +++ b/exec.c >> @@ -1820,7 +1820,8 @@ static void memory_map_init(void) >> address_space_init(&address_space_memory, system_memory, "memory"= ); >> =20 >> system_io =3D g_malloc(sizeof(*system_io)); >> - memory_region_init(system_io, NULL, "io", 65536); >> + memory_region_init_io(system_io, NULL, &unassigned_io_ops, NULL, = "io", >> + 65536); >=20 > It was reported that there may be some machines/PHBs that have > overlapping PIO/MMIO. Unless we use priorities, this ..._io MemoryRegio= n > will shadow or conflict with any ..._io MemoryRegion added to the memor= y > address space, wouldn't it? I cannot follow yet. This is the base mem-region for the PIO space. If some region from the MMIO space forwards request here and there is no backing device, this base region will handle it. So, even on arch with MMIO-based PIO, both address space should remain separate. Or am I missing something? Jan --dKrPxMgHpTFUgDP8eDW6nQ3VCD5M5JrnD 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 Thunderbird - http://www.enigmail.net/ iEUEARECAAYFAlH/cqIACgkQitSsb3rl5xSY2ACfR5kLLw/dnE2dQ5lIEeYYLcGz Z3cAmNbfD7CKYt3O+UmaDv/Y5gzsXmc= =EAys -----END PGP SIGNATURE----- --dKrPxMgHpTFUgDP8eDW6nQ3VCD5M5JrnD--