From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 11/12] accel/tcg: Reset TCG specific fields in tcg_cpu_reset_hold()
Date: Sun, 28 Apr 2024 23:49:14 +0200 [thread overview]
Message-ID: <20240428214915.10339-12-philmd@linaro.org> (raw)
In-Reply-To: <20240428214915.10339-1-philmd@linaro.org>
Rather than resetting TCG specific fields in the common
cpu_common_reset_hold(), do it in tcg_cpu_reset_hold().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240427155714.53669-14-philmd@linaro.org>
---
accel/tcg/tcg-accel-ops.c | 3 +++
hw/core/cpu-common.c | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index 2c7b0cc09e..be99105ac5 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -85,6 +85,9 @@ static void tcg_cpu_reset_hold(CPUState *cpu)
tcg_flush_jmp_cache(cpu);
tlb_flush(cpu);
+
+ qatomic_set(&cpu->neg.icount_decr.u32, 0);
+ cpu->neg.can_do_io = true;
}
/* mask must never be zero, except for A20 change call */
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index c4175cc4b9..9b3efba82f 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -127,8 +127,6 @@ static void cpu_common_reset_hold(Object *obj, ResetType type)
cpu->halted = cpu->start_powered_off;
cpu->mem_io_pc = 0;
cpu->icount_extra = 0;
- qatomic_set(&cpu->neg.icount_decr.u32, 0);
- cpu->neg.can_do_io = true;
cpu->exception_index = -1;
cpu->crash_occurred = false;
cpu->cflags_next_tb = -1;
--
2.41.0
next prev parent reply other threads:[~2024-04-28 21:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-28 21:49 [PATCH v2 00/12] exec: Rework around CPUState user fields Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 01/12] plugins: Update stale comment Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 02/12] plugins/api: Only include 'exec/ram_addr.h' with system emulation Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 03/12] exec: Include missing license in 'exec/cpu-common.h' Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 04/12] exec/cpu: Indent TARGET_PAGE_foo definitions Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 05/12] exec/cpu: Remove obsolete PAGE_RESERVED definition Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 06/12] exec/cpu: Remove duplicated PAGE_PASSTHROUGH definition Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 07/12] exec/cpu: Extract page-protection definitions to page-protection.h Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 08/12] accel/tcg: Use cpu_loop_exit_requested() in cpu_loop_exec_tb() Philippe Mathieu-Daudé
2024-04-28 22:05 ` Richard Henderson
2024-04-28 21:49 ` [PATCH v2 09/12] accel/tcg: Restrict cpu_loop_exit_requested() to TCG Philippe Mathieu-Daudé
2024-04-28 22:08 ` Richard Henderson
2024-04-28 22:17 ` Philippe Mathieu-Daudé
2024-04-29 21:23 ` Philippe Mathieu-Daudé
2024-04-28 21:49 ` [PATCH v2 10/12] accel/tcg: Remove pointless initialization of cflags_next_tb Philippe Mathieu-Daudé
2024-04-28 21:49 ` Philippe Mathieu-Daudé [this message]
2024-04-28 21:49 ` [PATCH v2 12/12] accel/tcg: Access tcg_cflags with getter / setter Philippe Mathieu-Daudé
2024-04-29 12:02 ` [PATCH v2 00/12] exec: Rework around CPUState user fields Philippe Mathieu-Daudé
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=20240428214915.10339-12-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).