[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/20] accel/tcg: Restrict 'icount_align_option' global to TCG
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 09/20] accel/tcg: Restrict 'icount_align_option' global to TCG |
Date: |
Fri, 24 Jan 2025 00:44:03 +0100 |
Since commit 740b1759734 ("cpu-timers, icount: new modules")
we don't need to expose icount_align_option to all the
system code, we can restrict it to TCG. Since it is used as
a boolean, declare it as 'bool' type.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/tcg/internal-common.h | 2 ++
include/system/cpus.h | 2 --
accel/tcg/icount-common.c | 2 ++
system/globals.c | 1 -
4 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h
index d3186721839..7ef620d9631 100644
--- a/accel/tcg/internal-common.h
+++ b/accel/tcg/internal-common.h
@@ -17,6 +17,8 @@ extern int64_t max_advance;
extern bool one_insn_per_tb;
+extern bool icount_align_option;
+
/*
* Return true if CS is not running in parallel with other cpus, either
* because there are no other cpus or we are within an exclusive context.
diff --git a/include/system/cpus.h b/include/system/cpus.h
index 3d8fd368f32..1cffeaaf5c4 100644
--- a/include/system/cpus.h
+++ b/include/system/cpus.h
@@ -38,8 +38,6 @@ void resume_all_vcpus(void);
void pause_all_vcpus(void);
void cpu_stop_current(void);
-extern int icount_align_option;
-
/* Unblock cpu */
void qemu_cpu_kick_self(void);
diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c
index b178dccec45..402d3e3f4e8 100644
--- a/accel/tcg/icount-common.c
+++ b/accel/tcg/icount-common.c
@@ -48,6 +48,8 @@ static bool icount_sleep = true;
/* Arbitrarily pick 1MIPS as the minimum allowable speed. */
#define MAX_ICOUNT_SHIFT 10
+bool icount_align_option;
+
/* Do not count executed instructions */
ICountMode use_icount = ICOUNT_DISABLED;
diff --git a/system/globals.c b/system/globals.c
index 4867c93ca6b..b968e552452 100644
--- a/system/globals.c
+++ b/system/globals.c
@@ -48,7 +48,6 @@ unsigned int nb_prom_envs;
const char *prom_envs[MAX_PROM_ENVS];
uint8_t *boot_splash_filedata;
int only_migratable; /* turn it off unless user states otherwise */
-int icount_align_option;
/* The bytes in qemu_uuid are in the order specified by RFC4122, _not_ in the
* little-endian "wire format" described in the SMBIOS 2.6 specification.
--
2.47.1
- [PATCH 01/20] qemu/compiler: Absorb 'clang-tsa.h', (continued)
- [PATCH 01/20] qemu/compiler: Absorb 'clang-tsa.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 02/20] user: Extract common MMAP API to 'user/mmap.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 03/20] gdbstub: Check for TCG before calling tb_flush(), Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 04/20] cpus: Cache CPUClass early in instance_init() handler, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 05/20] cpus: Keep default fields initialization in cpu_common_initfn(), Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 06/20] accel/kvm: Remove unused 'system/cpus.h' header in kvm-cpus.h, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 07/20] accel/tcg: Build tcg_flags helpers as common code, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 08/20] accel/tcg: Restrict tlb_init() / destroy() to TCG, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 09/20] accel/tcg: Restrict 'icount_align_option' global to TCG,
Philippe Mathieu-Daudé <=
- [PATCH 10/20] accel/tcg: Rename 'hw/core/tcg-cpu-ops.h' -> 'accel/tcg/cpu-ops.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 11/20] accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 12/20] accel/accel-cpu-target.h: Include missing 'cpu.h' header, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 13/20] accel: Forward-declare AccelOpsClass in 'qemu/typedefs.h', Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 14/20] accel/tcg: Move cpu_memory_rw_debug() user implementation to user-exec.c, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 15/20] cpus: Fix style in cpu-target.c, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 16/20] cpus: Restrict cpu_common_post_load() code to TCG, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 17/20] cpus: Have cpu_class_init_props() per user / system emulation, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 18/20] cpus: Have cpu_exec_initfn() per user / system emulation, Philippe Mathieu-Daudé, 2025/01/23
- [PATCH 19/20] cpus: Register VMState per user / system emulation, Philippe Mathieu-Daudé, 2025/01/23