From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] MIPS interrupt handling
Date: Wed, 03 May 2006 21:15:08 +0200 [thread overview]
Message-ID: <4459013C.4040002@bellard.org> (raw)
In-Reply-To: <20060502234421.GK5004@networkno.de>
Thiemo Seufer wrote:
> Fabrice Bellard wrote:
>
>>I just looked at the MIPS file target-mips/op_helper.c and I don't
>>understand why IRQs need to be handled in op_helper.c:do_mtc0() with reg
>>= 12.
>
>
> Register 12 is the cp0_status register, it defines which interrupts are
> masked/enabled/disabled. Btw, I have a patch which moves this to op.c,
> this should improve performance a bit (and avoids the TB stop for
> most mtc0 writes).
op.c should only contain small functions so it is not a good idea. TB
stop after mtc0 is needed at least when the TLB are modified or to
handle the interrupts. The current handling of interrupts in mtc0 must
be suppressed ASAP as it is not useful and complicates the code.
>>IMHO, the corresponding code should be deleted because the TB is
>>forced to terminate after mtc0 so that the IRQs can be handled in the
>>main loop in cpu-exec.c.
>>
>>Moreover, clearing CPU_INTERRUPT_HARD in do_mtc0() is almost surely a bug !
>
>
> Somehow the interrupt assert has to be prevented when St0_IE is cleared.
> That's probably also a job for the main loop, but there may be a race
> condition (haven't looked yet). Empirically, it works well. :-)
If ST0_IE means interrupt enable, the interrupt assert must not be
suppressed, but I did not read yet this part of the MIPS spec...
Fabrice.
next prev parent reply other threads:[~2006-05-03 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 22:28 [Qemu-devel] MIPS interrupt handling Fabrice Bellard
2006-05-02 23:44 ` Thiemo Seufer
2006-05-03 19:15 ` Fabrice Bellard [this message]
2006-05-03 19:52 ` Thiemo Seufer
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=4459013C.4040002@bellard.org \
--to=fabrice@bellard.org \
--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).