From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLwov-0000B8-2h for qemu-devel@nongnu.org; Sat, 19 Dec 2009 05:45:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLwoq-00008o-7t for qemu-devel@nongnu.org; Sat, 19 Dec 2009 05:45:56 -0500 Received: from [199.232.76.173] (port=35434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLwop-00008S-Nb for qemu-devel@nongnu.org; Sat, 19 Dec 2009 05:45:51 -0500 Received: from mail-yx0-f188.google.com ([209.85.210.188]:35133) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLwop-0006Ir-JT for qemu-devel@nongnu.org; Sat, 19 Dec 2009 05:45:51 -0500 Received: by yxe26 with SMTP id 26so3750470yxe.4 for ; Sat, 19 Dec 2009 02:45:51 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Sat, 19 Dec 2009 10:45:27 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [sparc32] do_unassigned_access vs. cpu_sparc_handle_mmu_fault List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel On Wed, Dec 16, 2009 at 7:11 PM, Artyom Tarasenko wrote: > The function do_unassigned_access in op_helper.c looks very similar > =C2=A0to the function cpu_sparc_handle_mmu_fault in helper.c and it is > called after the later one. > > Why do we need to set env->mmuregs[3] and env->mmuregs[4] =C2=A0twice? > Setting the SFSR and SFAR in do_unassigned_access looks redundant to > me and actually the second setting env->mmuregs[3] will also set the > overflow flag and therefore produce a wrong result. > > Also > > env->mmuregs[4] =3D addr; > > looks wrong because addr is definied as target_phys_addr_t, so there > is a cast to the smaller uint_32 type. > > If I remove the suspicious code from do_unassigned_access I can boot > Solaris 2.6. > Shall I produce a patch for 0.12? Please do, though as 0.12.0 has been tagged, it may be 0.12.1 material or just for HEAD.