All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: Song Gao <gaosong@loongson.cn>
Subject: [PULL 2/6] target/loongarch: Clean up tlb when cpu reset
Date: Tue,  5 Jul 2022 16:29:53 +0530	[thread overview]
Message-ID: <20220705105957.1144514-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220705105957.1144514-1-richard.henderson@linaro.org>

From: Song Gao <gaosong@loongson.cn>

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>
---
 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.34.1



  parent reply	other threads:[~2022-07-05 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 10:59 [PULL 0/6] loongarch64 patch queue Richard Henderson
2022-07-05 10:59 ` [PULL 1/6] hw/rtc/ls7a_rtc: Drop unused inline functions Richard Henderson
2022-07-05 10:59 ` [PATCH] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER Richard Henderson
2022-07-05 10:59 ` Richard Henderson [this message]
2022-07-05 10:59 ` [PULL 3/6] scripts/qemu-binfmt-conf: Add LoongArch to qemu_get_family() Richard Henderson
2022-07-05 10:59 ` [PULL 4/6] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER Richard Henderson
2022-07-05 10:59 ` [PULL 5/6] hw/intc/loongarch_ipi: Fix ipi device access of 64bits Richard Henderson
2022-07-05 10:59 ` [PULL 6/6] hw/intc/loongarch_ipi: Fix mail send and any send function Richard Henderson
2022-07-05 12:35 ` [PULL 0/6] loongarch64 patch queue Richard Henderson

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=20220705105957.1144514-4-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=gaosong@loongson.cn \
    --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 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.