From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKzIF-0007tf-RF for qemu-devel@nongnu.org; Wed, 16 Dec 2009 14:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKzIB-0007s0-6n for qemu-devel@nongnu.org; Wed, 16 Dec 2009 14:12:15 -0500 Received: from [199.232.76.173] (port=52887 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKzIB-0007rv-4P for qemu-devel@nongnu.org; Wed, 16 Dec 2009 14:12:11 -0500 Received: from mail-yw0-f171.google.com ([209.85.211.171]:60612) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKzIA-0007Mu-To for qemu-devel@nongnu.org; Wed, 16 Dec 2009 14:12:11 -0500 Received: by ywh1 with SMTP id 1so1241400ywh.18 for ; Wed, 16 Dec 2009 11:12:09 -0800 (PST) MIME-Version: 1.0 From: Artyom Tarasenko Date: Wed, 16 Dec 2009 20:11:48 +0100 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] [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: qemu-devel , Blue Swirl The function do_unassigned_access in op_helper.c looks very similar to 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] twice? 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] = 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? -- Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/