Received: from eggs.gnu.org ([208.118.235.92]:54719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMOv-00050T-Kj for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDMOu-0004jx-7H for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:29 -0500 Received: from ssl.serverraum.org ([88.198.40.39]:47198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDMOu-0004jn-0y for qemu-devel@nongnu.org; Wed, 06 Mar 2013 17:01:28 -0500 From: Michael Walle Date: Wed, 6 Mar 2013 23:00:06 +0100 Message-Id: <1362607209-12232-10-git-send-email-michael@walle.cc> In-Reply-To: <1362607209-12232-1-git-send-email-michael@walle.cc> References: <1362607209-12232-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PATCH 09/12] target-lm32: flush tlb after clearing env List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Walle 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 --- 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