qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: qemu-devel@nongnu.org
Cc: Michael Walle <michael@walle.cc>
Subject: [Qemu-devel] [PATCH 09/12] target-lm32: flush tlb after clearing env
Date: Wed,  6 Mar 2013 23:00:06 +0100	[thread overview]
Message-ID: <1362607209-12232-10-git-send-email-michael@walle.cc> (raw)
In-Reply-To: <1362607209-12232-1-git-send-email-michael@walle.cc>

The tlb data is stored within the CPU env. Therefore, the initialization
has to be done after we clear the environment. Otherwise the tlb will have
a valid entry for address 0x0.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 target-lm32/cpu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c
index a2badb5..5e1ab80 100644
--- a/target-lm32/cpu.c
+++ b/target-lm32/cpu.c
@@ -36,10 +36,10 @@ static void lm32_cpu_reset(CPUState *s)
 
     lcc->parent_reset(s);
 
-    tlb_flush(env, 1);
-
     /* reset cpu state */
     memset(env, 0, offsetof(CPULM32State, breakpoints));
+
+    tlb_flush(env, 1);
 }
 
 static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)
-- 
1.7.2.5

  parent reply	other threads:[~2013-03-06 22:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 21:59 [Qemu-devel] [PATCH 00/12] target-lm32: various fixes Michael Walle
2013-03-06 21:59 ` [Qemu-devel] [PATCH 01/12] target-lm32: fix debug memory access Michael Walle
2013-03-06 21:59 ` [Qemu-devel] [PATCH 02/12] lm32-dis: fix NULL pointer dereference Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 03/12] milkymist-uart: fix receive buffering Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 04/12] lm32_uart: " Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 05/12] target-lm32: don't log cpu state in translation Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 06/12] tests: tcg: lm32: add more test cases Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 07/12] target-lm32: fix cmpgui and cmpgeui opcodes Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 08/12] target-lm32: remove dead code Michael Walle
2013-03-06 22:00 ` Michael Walle [this message]
2013-03-06 22:00 ` [Qemu-devel] [PATCH 10/12] target-lm32: use HELPER() macro Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 11/12] configure: proper OpenGL/GLX probe Michael Walle
2013-03-06 22:00 ` [Qemu-devel] [PATCH 12/12] configure: rename OpenGL feature to GLX Michael Walle

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=1362607209-12232-10-git-send-email-michael@walle.cc \
    --to=michael@walle.cc \
    --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).