From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9Dlq-0006Rl-Pa for qemu-devel@nongnu.org; Tue, 13 Aug 2013 08:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9Dlk-0000Qb-LX for qemu-devel@nongnu.org; Tue, 13 Aug 2013 08:32:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48302 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9Dlk-0000QU-CI for qemu-devel@nongnu.org; Tue, 13 Aug 2013 08:32:12 -0400 Message-ID: <520A2747.9000804@suse.de> Date: Tue, 13 Aug 2013 14:32:07 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1376336660-11927-1-git-send-email-aurelien@aurel32.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.6] mips_malta: do not raise exceptions when accessing invalid memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: James Hogan , Aurelien Jarno Cc: Stefan Weil , =?ISO-8859-1?Q?Herv=E9_Poussineau?= , qemu-devel@nongnu.org, Peter Jovanovic Am 13.08.2013 12:05, schrieb James Hogan: > On 12 August 2013 20:44, Aurelien Jarno wrote: >> Since commit c658b94f6e8c206c59d02aa6fbac285b86b53d2c, MIPS raises >> exceptions when accessing invalid memory. This is not the correct >> behaviour for MIPS Malta Core LV, as the GT-64120A system controller >> just ignore undecoded access. This feature is used by the Linux kernel >> to probe for some devices. >> >> Emulate the correct behaviour in QEMU by adding an empty slot covering >> the entire memory space decoded by the GT-64120A. >> >> Signed-off-by: Aurelien Jarno >> --- >=20 > >=20 >> @@ -908,6 +909,11 @@ void mips_malta_init(QEMUMachineInitArgs *args) >> DeviceState *dev =3D qdev_create(NULL, TYPE_MIPS_MALTA); >> MaltaState *s =3D MIPS_MALTA(dev); >> >> + /* The whole address space decoded by the GT-64120A doesn't gener= ate >> + exception when accessing invalid memory. Create an empty slot = to >> + emulate this feature. */ >> + empty_slot_init(0, 0x1fffffff); >=20 > Out of interest, any particular reason not to put this in > hw/mips/gt64xxx_pci.c? As far as I can tell from your description it's > specific to the GT-64* system controller rather than the malta board? I was assuming that we didn't properly model that device when putting it on the board directly, but if there is one then putting it into such a device will avoid having to copy it into multiple boards. Perhaps in that case we can even have a proper MemoryRegion in the SysBus device instead of a separate empty slot pseudo-device? FWIW gt64xxx_pci.c could certainly use some more love to eliminate gt64120_register() and to create PCIDevice and PCIBus in the bridge itself for instance... Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg