[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/13] accel/tcg: Restrict icount to system emulation
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 12/13] accel/tcg: Restrict icount to system emulation |
Date: |
Mon, 29 Apr 2024 23:30:49 +0200 |
So far we don't support icount on user emulation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240428221450.26460-24-philmd@linaro.org>
---
accel/tcg/cpu-exec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 84fd041aec..1f618f6c2e 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -780,6 +780,9 @@ static inline bool cpu_handle_exception(CPUState *cpu, int
*ret)
static inline bool icount_exit_request(CPUState *cpu)
{
+#if defined(CONFIG_USER_ONLY)
+ return false;
+#else
if (!icount_enabled()) {
return false;
}
@@ -787,6 +790,7 @@ static inline bool icount_exit_request(CPUState *cpu)
return false;
}
return cpu->neg.icount_decr.u16.low + cpu->icount_extra == 0;
+#endif
}
static inline bool cpu_handle_interrupt(CPUState *cpu,
@@ -801,12 +805,14 @@ static inline bool cpu_handle_interrupt(CPUState *cpu,
return false;
}
+#if !defined(CONFIG_USER_ONLY)
/* Clear the interrupt flag now since we're processing
* cpu->interrupt_request and cpu->exit_request.
* Ensure zeroing happens before reading cpu->exit_request or
* cpu->interrupt_request (see also smp_wmb in cpu_exit())
*/
qatomic_set_mb(&cpu->neg.icount_decr.u16.high, 0);
+#endif /* !CONFIG_USER_ONLY */
if (unlikely(qatomic_read(&cpu->interrupt_request))) {
int interrupt_request;
--
2.41.0
- [PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState, (continued)
- [PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 06/13] accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 07/13] accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 05/13] accel/tcg: Restrict IcountDecr / can_do_io / CPUTLB to TCG, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 08/13] accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 09/13] accel/tcg: Move @tb_jmp_cache from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 10/13] accel/tcg: Remove NULL check in tcg_flush_jmp_cache(), Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 11/13] accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29
- [PATCH v2 12/13] accel/tcg: Restrict icount to system emulation,
Philippe Mathieu-Daudé <=
- [PATCH v2 13/13] accel/tcg: Move icount fields from CPUState to TCG AccelCPUState, Philippe Mathieu-Daudé, 2024/04/29