aboutsummaryrefslogtreecommitdiff
path: root/target/loongarch
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2022-07-05 15:09:50 +0800
committerRichard Henderson <richard.henderson@linaro.org>2022-07-05 16:17:53 +0530
commit3517fb726741c109cae7995f9ea46f0cab6187d6 (patch)
tree8200b6752c6b20d79587a2fcff742bc6382178b2 /target/loongarch
parentc1ca312a6f035adad6558f44e6a3bc9ddeeed4b0 (diff)
downloadqemu-3517fb726741c109cae7995f9ea46f0cab6187d6.zip
qemu-3517fb726741c109cae7995f9ea46f0cab6187d6.tar.gz
qemu-3517fb726741c109cae7995f9ea46f0cab6187d6.tar.bz2
target/loongarch: Clean up tlb when cpu reset
We should make sure that tlb is clean when cpu reset. Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20220705070950.2364243-1-gaosong@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/loongarch')
-rw-r--r--target/loongarch/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index d2d4667..e217155 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -479,6 +479,7 @@ static void loongarch_cpu_reset(DeviceState *dev)
#ifndef CONFIG_USER_ONLY
env->pc = 0x1c000000;
+ memset(env->tlb, 0, sizeof(env->tlb));
#endif
restore_fp_status(env);