* [PATCH] target/loongarch: Clean up tlb when cpu reset
@ 2022-07-05 7:09 Song Gao
2022-07-05 8:29 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Song Gao @ 2022-07-05 7:09 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, yangxiaojuan
We should make sure that tlb is clean when cpu reset.
Signed-off-by: Song Gao <gaosong@loongson.cn>
---
target/loongarch/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index d2d4667a34..e21715592a 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);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/loongarch: Clean up tlb when cpu reset
2022-07-05 7:09 [PATCH] target/loongarch: Clean up tlb when cpu reset Song Gao
@ 2022-07-05 8:29 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2022-07-05 8:29 UTC (permalink / raw)
To: Song Gao, qemu-devel; +Cc: yangxiaojuan
On 7/5/22 12:39, Song Gao wrote:
> We should make sure that tlb is clean when cpu reset.
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
> target/loongarch/cpu.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Applied.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-05 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 7:09 [PATCH] target/loongarch: Clean up tlb when cpu reset Song Gao
2022-07-05 8:29 ` Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.