X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=translate-all.c;h=da93608f0382a840154c2ba40712cae5e682c400;hb=035873283b3f7514ad77d409870ccfd5f9680d9e;hp=90ea00293578a3ce28c833ea1cff792aba0c26e5;hpb=6e72a00f909dcd093fbdd1faa2b3c8caa1697a6c;p=qemu.git diff --git a/translate-all.c b/translate-all.c index 90ea00293..da93608f0 100644 --- a/translate-all.c +++ b/translate-all.c @@ -35,9 +35,6 @@ #include "cpu.h" #include "disas/disas.h" #include "tcg.h" -#include "qemu/timer.h" -#include "exec/memory.h" -#include "exec/address-spaces.h" #if defined(CONFIG_USER_ONLY) #include "qemu.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -55,10 +52,14 @@ #include #endif #endif +#else +#include "exec/address-spaces.h" #endif +#include "qemu/timer.h" #include "exec/cputlb.h" #include "translate-all.h" +#include "qemu/timer.h" //#define DEBUG_TB_INVALIDATE //#define DEBUG_FLUSH @@ -1077,8 +1078,8 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, tb_phys_invalidate(tb, -1); if (cpu != NULL) { cpu->current_tb = saved_tb; - if (env && env->interrupt_request && cpu->current_tb) { - cpu_interrupt(env, env->interrupt_request); + if (cpu->interrupt_request && cpu->current_tb) { + cpu_interrupt(cpu, cpu->interrupt_request); } } } @@ -1308,11 +1309,11 @@ static void tb_link_page(TranslationBlock *tb, tb_page_addr_t phys_pc, /* check whether the given addr is in TCG generated code buffer or not */ bool is_tcg_gen_code(uintptr_t tc_ptr) { - /* This can be called during code generation, code_gen_buffer_max_size + /* This can be called during code generation, code_gen_buffer_size is used instead of code_gen_ptr for upper boundary checking */ return (tc_ptr >= (uintptr_t)tcg_ctx.code_gen_buffer && tc_ptr < (uintptr_t)(tcg_ctx.code_gen_buffer + - tcg_ctx.code_gen_buffer_max_size)); + tcg_ctx.code_gen_buffer_size)); } #endif @@ -1382,13 +1383,13 @@ void tb_check_watchpoint(CPUArchState *env) #ifndef CONFIG_USER_ONLY /* mask must never be zero, except for A20 change call */ -static void tcg_handle_interrupt(CPUArchState *env, int mask) +static void tcg_handle_interrupt(CPUState *cpu, int mask) { - CPUState *cpu = ENV_GET_CPU(env); + CPUArchState *env = cpu->env_ptr; int old_mask; - old_mask = env->interrupt_request; - env->interrupt_request |= mask; + old_mask = cpu->interrupt_request; + cpu->interrupt_request |= mask; /* * If called from iothread context, wake the target cpu in @@ -1552,11 +1553,9 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) #else /* CONFIG_USER_ONLY */ -void cpu_interrupt(CPUArchState *env, int mask) +void cpu_interrupt(CPUState *cpu, int mask) { - CPUState *cpu = ENV_GET_CPU(env); - - env->interrupt_request |= mask; + cpu->interrupt_request |= mask; cpu->tcg_exit_req = 1; }