qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 09/12] target-lm32: flush tlb after clearing env


From: Michael Walle
Subject: [Qemu-devel] [PATCH 09/12] target-lm32: flush tlb after clearing env
Date: Wed, 6 Mar 2013 23:00:06 +0100

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]