From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxAVj-0004ab-BK for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:23:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxAVe-0007Tw-BD for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:23:43 -0400 Received: from 12.mo1.mail-out.ovh.net ([87.98.162.229]:48387) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxAVe-0007TU-53 for qemu-devel@nongnu.org; Thu, 20 Oct 2016 06:23:38 -0400 Received: from player726.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 64A6815FD4 for ; Thu, 20 Oct 2016 12:23:36 +0200 (CEST) Date: Thu, 20 Oct 2016 12:23:30 +0200 From: Greg Kurz Message-ID: <20161020122330.6fd279bc@bahia> In-Reply-To: <20161020065912.16132-2-npiggin@gmail.com> References: <20161020065912.16132-1-npiggin@gmail.com> <20161020065912.16132-2-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] ppc: fix MSR_ME handling for system reset interrupt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nicholas Piggin Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, David Gibson On Thu, 20 Oct 2016 17:59:10 +1100 Nicholas Piggin wrote: > Power ISA specifies ME bit handling for system reset interrupt: > > if the interrupt occurred while the thread was in power-saving > mode, set to 1; otherwise not altered > > Signed-off-by: Nicholas Piggin > --- As described in "6.5 Interrupt Definitions, Figure 64" of Power ISA 3.0. Reviewed-by: Greg Kurz > target-ppc/excp_helper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c > index 921c39d..53c4075 100644 > --- a/target-ppc/excp_helper.c > +++ b/target-ppc/excp_helper.c > @@ -385,11 +385,11 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp) > srr1 = SPR_BOOKE_CSRR1; > break; > case POWERPC_EXCP_RESET: /* System reset exception */ > + /* A power-saving exception sets ME, otherwise it is unchanged */ > if (msr_pow) { > /* indicate that we resumed from power save mode */ > msr |= 0x10000; > - } else { > - new_msr &= ~((target_ulong)1 << MSR_ME); > + new_msr |= ((target_ulong)1 << MSR_ME); > } > > new_msr |= (target_ulong)MSR_HVB;