mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
include/hw/core: Create struct CPUJumpCache
Wrap the bare TranslationBlock pointer into a structure. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
1d41a79b3c
commit
a976a99a29
12 changed files with 72 additions and 28 deletions
|
@ -236,9 +236,6 @@ struct kvm_run;
|
|||
struct hax_vcpu_state;
|
||||
struct hvf_vcpu_state;
|
||||
|
||||
#define TB_JMP_CACHE_BITS 12
|
||||
#define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS)
|
||||
|
||||
/* work queue */
|
||||
|
||||
/* The union type allows passing of 64 bit target pointers on 32 bit
|
||||
|
@ -369,8 +366,7 @@ struct CPUState {
|
|||
CPUArchState *env_ptr;
|
||||
IcountDecr *icount_decr_ptr;
|
||||
|
||||
/* Accessed in parallel; all accesses must be atomic */
|
||||
TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE];
|
||||
CPUJumpCache *tb_jmp_cache;
|
||||
|
||||
struct GDBRegisterState *gdb_regs;
|
||||
int gdb_num_regs;
|
||||
|
@ -456,15 +452,6 @@ extern CPUTailQ cpus;
|
|||
|
||||
extern __thread CPUState *current_cpu;
|
||||
|
||||
static inline void cpu_tb_jmp_cache_clear(CPUState *cpu)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < TB_JMP_CACHE_SIZE; i++) {
|
||||
qatomic_set(&cpu->tb_jmp_cache[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* qemu_tcg_mttcg_enabled:
|
||||
* Check whether we are running MultiThread TCG or not.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue