From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhOUR-0001NM-DH for qemu-devel@nongnu.org; Sun, 21 Sep 2008 08:56:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhOUQ-0001N2-Kb for qemu-devel@nongnu.org; Sun, 21 Sep 2008 08:56:39 -0400 Received: from [199.232.76.173] (port=42281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhOUQ-0001Mz-GL for qemu-devel@nongnu.org; Sun, 21 Sep 2008 08:56:38 -0400 Received: from smtp1-g19.free.fr ([212.27.42.27]:45370) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhOUQ-00054X-34 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 08:56:38 -0400 Received: from smtp1-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp1-g19.free.fr (Postfix) with ESMTP id 604161AB335 for ; Sun, 21 Sep 2008 14:56:36 +0200 (CEST) Received: from [192.168.0.32] (rob92-10-88-171-126-33.fbx.proxad.net [88.171.126.33]) by smtp1-g19.free.fr (Postfix) with ESMTP id 33D9A1AB317 for ; Sun, 21 Sep 2008 14:56:36 +0200 (CEST) Message-ID: <48D64484.3080505@reactos.org> Date: Sun, 21 Sep 2008 14:56:36 +0200 From: =?ISO-8859-1?Q?Herv=E9_Poussineau?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090000040103030305030307" Subject: [Qemu-devel] [PATCH] MIPS64: Fix XContext on exception 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. --------------090000040103030305030307 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi, Attached patch fixes XContext filling on exception, and prevents R field=20 to sometimes override BadVPN2 field. R field location was correct only when SEGBITS was 32, which is the case=20 on MIPS32, but not MIPS64. Herv=E9 --------------090000040103030305030307 Content-Type: plain/text; name="Fix XContext.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Fix XContext.diff" Index: target-mips/helper.c =================================================================== --- target-mips/helper.c (revision 5261) +++ target-mips/helper.c (working copy) @@ -304,7 +304,7 @@ #if defined(TARGET_MIPS64) env->CP0_EntryHi &= env->SEGMask; env->CP0_XContext = (env->CP0_XContext & ((~0ULL) << (env->SEGBITS - 7))) | - ((address & 0xC00000000000ULL) >> (env->SEGBITS - 9)) | + ((address & 0xC00000000000ULL) >> (55 - env->SEGBITS)) | ((address & ((1ULL << env->SEGBITS) - 1) & 0xFFFFFFFFFFFFE000ULL) >> 9); #endif env->exception_index = exception; --------------090000040103030305030307--