From: Leon Alrae <leon.alrae@imgtec.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/3] target-mips: fix CP0.BadVAddr by stopping translation on Address Error
Date: Wed, 18 Mar 2015 14:37:31 +0000 [thread overview]
Message-ID: <1426689453-9347-2-git-send-email-leon.alrae@imgtec.com> (raw)
In-Reply-To: <1426689453-9347-1-git-send-email-leon.alrae@imgtec.com>
CP0.BadVAddr is supposed to capture the most recent virtual address that caused
the exception. Currently this does not work correctly for unaligned instruction
fetch as translation is not stopped and CP0.BadVAddr is updated with subsequent
addresses.
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
target-mips/translate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target-mips/translate.c b/target-mips/translate.c
index 9059bfd..0e2443a 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -18438,6 +18438,7 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
if (ctx->pc & 0x3) {
env->CP0_BadVAddr = ctx->pc;
generate_exception_err(ctx, EXCP_AdEL, EXCP_INST_NOTAVAIL);
+ ctx->bstate = BS_STOP;
return;
}
--
2.1.0
next prev parent reply other threads:[~2015-03-18 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 14:37 [Qemu-devel] [PULL 0/3] target-mips queue Leon Alrae
2015-03-18 14:37 ` Leon Alrae [this message]
2015-03-18 14:37 ` [Qemu-devel] [PULL 2/3] target-mips: fix hflags modified in delay / forbidden slot Leon Alrae
2015-03-18 14:37 ` [Qemu-devel] [PULL 3/3] target-mips: save cpu state before calling MSA load and store helpers Leon Alrae
2015-03-19 14:10 ` [Qemu-devel] [PULL 0/3] target-mips queue 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=1426689453-9347-2-git-send-email-leon.alrae@imgtec.com \
--to=leon.alrae@imgtec.com \
--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).