From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCN-00061w-DO for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqHCI-0007Yn-HE for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:14 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:32812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCI-0007YS-Aa for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:10 -0400 Received: by mail-wm0-x241.google.com with SMTP id p138so6757699wmb.0 for ; Sat, 01 Oct 2016 03:07:10 -0700 (PDT) From: Artyom Tarasenko Date: Sat, 1 Oct 2016 12:05:09 +0200 Message-Id: <1475316333-9776-6-git-send-email-atar4qemu@gmail.com> In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> Subject: [Qemu-devel] [PATCH 05/29] target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Richard Henderson , Mark Cave-Ayland , Artyom Tarasenko As described in Chapter 5.7.6 of the UltraSPARC Architecture 2005, outstanding disrupting exceptions that are destined for privileged mode can only cause a trap when the virtual processor is in nonprivileged or privileged mode and PSTATE.ie = 1. At all other times, they are held pending. Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index bafa8d9..ff2e053 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -716,8 +716,9 @@ static inline int cpu_interrupts_enabled(CPUSPARCState *env1) if (env1->psret != 0) return 1; #else - if (env1->pstate & PS_IE) + if ((env1->pstate & PS_IE) && !cpu_hypervisor_mode(env1)) { return 1; + } #endif return 0; -- 2.7.2