From: David Hoover <spm@boiteauxlettres.sent.at>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] ARM Cortex-M IRQs can not be globally disabled
Date: Mon, 01 Sep 2014 20:34:19 +0200 [thread overview]
Message-ID: <1409596459.2228712.162374913.35CEF62E@webmail.messagingengine.com> (raw)
Hi,
It seems that interrupts are not disabled by CPSIE instruction. The
current code apparently ignores (daif&PSTATE_I) for Cortex-M. The patch
below is basically identical to the patch that was attached to the
following message:
https://lists.gnu.org/archive/html/qemu-devel/2011-06/msg00513.html
Cheers,
David
From: David Hoover <spm@boiteauxlettres.sent.at>
Date: Mon, 1 Sep 2014 14:24:56 +0200
Subject: [PATCH] ARM Cortex-M IRQs can not be globally disabled
Signed-off-by: David Hoover <spm@boiteauxlettres.sent.at>
---
cpu-exec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index c6aad74..fdebe2b 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -610,8 +610,8 @@ int cpu_exec(CPUArchState *env)
We avoid this by disabling interrupts when
pc contains a magic address. */
if (interrupt_request & CPU_INTERRUPT_HARD
- && ((IS_M(env) && env->regs[15] < 0xfffffff0)
- || !(env->daif & PSTATE_I))) {
+ && !(env->daif & PSTATE_I)
+ && (!IS_M(env) || env->regs[15] < 0xfffffff0))
{
cpu->exception_index = EXCP_IRQ;
cc->do_interrupt(cpu);
next_tb = 0;
--
1.8.5.2
next reply other threads:[~2014-09-01 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 18:34 David Hoover [this message]
2014-09-02 12:50 ` [Qemu-devel] ARM Cortex-M IRQs can not be globally disabled Peter Maydell
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=1409596459.2228712.162374913.35CEF62E@webmail.messagingengine.com \
--to=spm@boiteauxlettres.sent.at \
--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).