From patchwork Fri Oct 24 12:42:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Alrae X-Patchwork-Id: 402857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 16746140082 for ; Fri, 24 Oct 2014 23:49:41 +1100 (AEDT) Received: from localhost ([::1]:48421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XheJH-0003zm-0J for incoming@patchwork.ozlabs.org; Fri, 24 Oct 2014 08:49:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XheD6-0002LU-Nx for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XheD1-0007dy-Lj for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:16 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:62051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XheD1-0007dr-E3 for qemu-devel@nongnu.org; Fri, 24 Oct 2014 08:43:11 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 948DB7F647149; Fri, 24 Oct 2014 13:43:06 +0100 (IST) Received: from virtUbuntuLTP.kl.imgtec.org (192.168.14.163) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 24 Oct 2014 13:43:08 +0100 From: Leon Alrae To: Date: Fri, 24 Oct 2014 13:42:26 +0100 Message-ID: <1414154549-2102-13-git-send-email-leon.alrae@imgtec.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414154549-2102-1-git-send-email-leon.alrae@imgtec.com> References: <1414154549-2102-1-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.14.163] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH v3 12/15] target-mips: CP0_Status.CU0 no longer allows the user to access CP0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Leon Alrae Reviewed-by: Yongbok Kim --- target-mips/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 6367d8c..3b975eb 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -790,7 +790,8 @@ static inline void compute_hflags(CPUMIPSState *env) } } #endif - if ((env->CP0_Status & (1 << CP0St_CU0)) || + if (((env->CP0_Status & (1 << CP0St_CU0)) && + !(env->insn_flags & ISA_MIPS32R6)) || !(env->hflags & MIPS_HFLAG_KSU)) { env->hflags |= MIPS_HFLAG_CP0; }