Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBCUU-0007lx-HF for qemu-devel@nongnu.org; Tue, 24 Jun 2008 13:39:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBCUT-0007ll-Kh for qemu-devel@nongnu.org; Tue, 24 Jun 2008 13:39:37 -0400 Received: from [199.232.76.173] (port=42875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBCUT-0007lf-Fa for qemu-devel@nongnu.org; Tue, 24 Jun 2008 13:39:37 -0400 Received: from nomad.cncware.com ([216.18.236.20]:50355) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KBCUS-0005rF-07 for qemu-devel@nongnu.org; Tue, 24 Jun 2008 13:39:36 -0400 Received: from blitzen.snipe444.org (c-98-203-166-24.hsd1.wa.comcast.net [98.203.166.24]) by nomad.cncware.com (8.13.8/8.13.1) with SMTP id m5OHORMP014621 for ; Tue, 24 Jun 2008 10:24:27 -0700 Date: Tue, 24 Jun 2008 10:39:21 -0700 From: Cliff Wright Message-Id: <20080624103921.6fbb7f2e.cliff@snipe444.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Tue__24_Jun_2008_10_39_21_-0700_yimmEd/cSh6V_iG/" Subject: [Qemu-devel] sparc mmu bug(and fix) seen with NetBSD Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --Multipart=_Tue__24_Jun_2008_10_39_21_-0700_yimmEd/cSh6V_iG/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit When using QEMU 0.9.1 for sparc emulation on i386 booting NetBSD 4.0 miniroot.fs a bug with the MMU is seen. A fault type is mis-aligned with the fault status register. This is seen by NetBSD with a copy on write that causes a write fault, with no fault type in the register, NetBSD just returns to the faulting instruction, causing an infinite loop. Below is a patch to the 0.9.1 source, however I see the same problem in the subversion source. -- Cliff Wright --Multipart=_Tue__24_Jun_2008_10_39_21_-0700_yimmEd/cSh6V_iG/ Content-Type: text/plain; name="qemu-patch1.txt" Content-Disposition: attachment; filename="qemu-patch1.txt" Content-Transfer-Encoding: 7bit --- helper.c.orig 2008-01-06 11:38:45.000000000 -0800 +++ helper.c 2008-06-24 10:23:00.000000000 -0700 @@ -197,7 +197,7 @@ } /* check access */ access_perms = (pde & PTE_ACCESS_MASK) >> PTE_ACCESS_SHIFT; - error_code = access_table[*access_index][access_perms]; + error_code = access_table[*access_index][access_perms] << 2; if (error_code && !((env->mmuregs[0] & MMU_NF) && is_user)) return error_code; --Multipart=_Tue__24_Jun_2008_10_39_21_-0700_yimmEd/cSh6V_iG/--