qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@openwide.fr>
To: qemu-devel@nongnu.org
Cc: Bug 608107 <608107@bugs.launchpad.net>
Subject: [Qemu-devel] [PATCH] target-ppc: clear MSR_POW on interrupt
Date: Fri, 10 Sep 2010 14:32:05 +0200	[thread overview]
Message-ID: <201009101432.06340.thomas.monjalon@openwide.fr> (raw)
In-Reply-To: <20100721085317.10710.79353.malone@soybean.canonical.com>

From: till <608107@bugs.launchpad.net>

According to FreeScale's 'Programming Environments Manual for 32-bit
Implementations of the PowerPC Architecture' [MPCFPE32B, Rev.3, 9/2005],
section 6.5, table 6-7, an interrupt resets MSR_POW to zero but qemu-0.12.4
fails to do so.
Resetting the bit is necessary in order to bring the processor out of power
management since otherwise it goes to sleep right away in the exception
handler, i.e., it is impossible to leave PM-mode.

https://bugs.launchpad.net/qemu/+bug/608107

Signed-off-by: till <608107@bugs.launchpad.net>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

---
 target-ppc/helper.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index f66fb30..0bb353e 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -2578,6 +2578,7 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
     if (new_msr & ((1 << MSR_IR) | (1 << MSR_DR)))
         tlb_flush(env, 1);
     /* reload MSR with correct bits */
+    new_msr &= ~((target_ulong)1 << MSR_POW);
     new_msr &= ~((target_ulong)1 << MSR_EE);
     new_msr &= ~((target_ulong)1 << MSR_PR);
     new_msr &= ~((target_ulong)1 << MSR_FP);

  reply	other threads:[~2010-09-10 12:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21  8:53 [Qemu-devel] [Bug 608107] [NEW] ppc fails to clear MSR_POW when incurring exception till
2010-07-21  8:53 ` [Qemu-devel] [Bug 608107] " till
2010-09-10 12:32   ` Thomas Monjalon [this message]
2010-09-10 13:02     ` [Qemu-devel] [PATCH] target-ppc: clear MSR_POW on interrupt Alexander Graf
2010-09-10 15:03       ` Thomas Monjalon
2010-09-10 15:26         ` Alexander Graf
2010-09-10 15:46           ` Thomas Monjalon
2010-09-10 15:50             ` Alexander Graf
2010-09-10 16:08               ` Edgar E. Iglesias
2010-09-10 16:35                 ` Alexander Graf
2010-09-10 16:58                   ` Thomas Monjalon
2010-09-10 19:57                     ` Edgar E. Iglesias
2010-09-10 23:10                     ` Alexander Graf
2010-09-10  9:22 ` [Qemu-devel] [Bug 608107] Re: ppc fails to clear MSR_POW when incurring exception Thomas Monjalon
2010-09-13 13:02 ` till
2012-08-03  2:56 ` Samuel Bronson
2016-10-31  9:11 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201009101432.06340.thomas.monjalon@openwide.fr \
    --to=thomas.monjalon@openwide.fr \
    --cc=608107@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).