From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAQa4-0006Ky-57 for qemu-devel@nongnu.org; Wed, 10 Dec 2008 10:02:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAQa3-0006JJ-0O for qemu-devel@nongnu.org; Wed, 10 Dec 2008 10:02:27 -0500 Received: from [199.232.76.173] (port=58850 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAQa2-0006Ih-PT for qemu-devel@nongnu.org; Wed, 10 Dec 2008 10:02:26 -0500 Received: from savannah.gnu.org ([199.232.41.3]:45828 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAQa1-0007DK-JC for qemu-devel@nongnu.org; Wed, 10 Dec 2008 10:02:25 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LAQa0-00043T-Tr for qemu-devel@nongnu.org; Wed, 10 Dec 2008 15:02:24 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LAQa0-00043P-KS for qemu-devel@nongnu.org; Wed, 10 Dec 2008 15:02:24 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Wed, 10 Dec 2008 15:02:24 +0000 Subject: [Qemu-devel] [5964] target-ppc: initialize MSR appropriately in user-mode 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 Revision: 5964 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5964 Author: aurel32 Date: 2008-12-10 15:02:24 +0000 (Wed, 10 Dec 2008) Log Message: ----------- target-ppc: initialize MSR appropriately in user-mode Mask the initial MSR with the mask from the PowerPC CPU definition. Noticed by Nathan Froyd. Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/helper.c Modified: trunk/target-ppc/helper.c =================================================================== --- trunk/target-ppc/helper.c 2008-12-10 15:02:16 UTC (rev 5963) +++ trunk/target-ppc/helper.c 2008-12-10 15:02:24 UTC (rev 5964) @@ -2904,12 +2904,12 @@ #if defined(CONFIG_USER_ONLY) msr |= (target_ulong)1 << MSR_FP; /* Allow floating point usage */ msr |= (target_ulong)1 << MSR_PR; + env->msr = msr & env->msr_mask; #else env->nip = env->hreset_vector | env->excp_prefix; if (env->mmu_model != POWERPC_MMU_REAL) ppc_tlb_invalidate_all(env); #endif - env->msr = msr; hreg_compute_hflags(env); env->reserve = (target_ulong)-1ULL; /* Be sure no exception or interrupt is pending */