From 5638d180d6c469fc4c56127a3c717e8b9f27d925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 27 Aug 2013 17:52:12 +0200 Subject: cpu-exec: Change cpu_loop_exit() argument to CPUState MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Färber --- target-i386/excp_helper.c | 2 +- target-i386/misc_helper.c | 7 +++---- target-i386/seg_helper.c | 2 +- target-i386/svm_helper.c | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) (limited to 'target-i386') diff --git a/target-i386/excp_helper.c b/target-i386/excp_helper.c index ec76eba760..f337fd20fb 100644 --- a/target-i386/excp_helper.c +++ b/target-i386/excp_helper.c @@ -108,7 +108,7 @@ static void QEMU_NORETURN raise_interrupt2(CPUX86State *env, int intno, env->error_code = error_code; env->exception_is_int = is_int; env->exception_next_eip = env->eip + next_eip_addend; - cpu_loop_exit(env); + cpu_loop_exit(cs); } /* shortcuts to generate exceptions */ diff --git a/target-i386/misc_helper.c b/target-i386/misc_helper.c index 582ad34ffe..8c6b9bfce2 100644 --- a/target-i386/misc_helper.c +++ b/target-i386/misc_helper.c @@ -569,11 +569,10 @@ void helper_rdmsr(CPUX86State *env) static void do_pause(X86CPU *cpu) { CPUState *cs = CPU(cpu); - CPUX86State *env = &cpu->env; /* Just let another CPU run. */ cs->exception_index = EXCP_INTERRUPT; - cpu_loop_exit(env); + cpu_loop_exit(cs); } static void do_hlt(X86CPU *cpu) @@ -584,7 +583,7 @@ static void do_hlt(X86CPU *cpu) env->hflags &= ~HF_INHIBIT_IRQ_MASK; /* needed if sti is just before */ cs->halted = 1; cs->exception_index = EXCP_HLT; - cpu_loop_exit(env); + cpu_loop_exit(cs); } void helper_hlt(CPUX86State *env, int next_eip_addend) @@ -642,5 +641,5 @@ void helper_debug(CPUX86State *env) CPUState *cs = CPU(x86_env_get_cpu(env)); cs->exception_index = EXCP_DEBUG; - cpu_loop_exit(env); + cpu_loop_exit(cs); } diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index c8fd572d99..4e134e4338 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -939,7 +939,7 @@ void helper_syscall(CPUX86State *env, int next_eip_addend) cs->exception_index = EXCP_SYSCALL; env->exception_next_eip = env->eip + next_eip_addend; - cpu_loop_exit(env); + cpu_loop_exit(cs); } #else void helper_syscall(CPUX86State *env, int next_eip_addend) diff --git a/target-i386/svm_helper.c b/target-i386/svm_helper.c index 5e0504d7f0..de2c2eebe0 100644 --- a/target-i386/svm_helper.c +++ b/target-i386/svm_helper.c @@ -334,7 +334,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) env->exception_is_int = 0; env->exception_next_eip = env->eip; qemu_log_mask(CPU_LOG_TB_IN_ASM, "NMI"); - cpu_loop_exit(env); + cpu_loop_exit(cs); break; case SVM_EVTINJ_TYPE_EXEPT: cs->exception_index = vector; @@ -342,7 +342,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) env->exception_is_int = 0; env->exception_next_eip = -1; qemu_log_mask(CPU_LOG_TB_IN_ASM, "EXEPT"); - cpu_loop_exit(env); + cpu_loop_exit(cs); break; case SVM_EVTINJ_TYPE_SOFT: cs->exception_index = vector; @@ -350,7 +350,7 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend) env->exception_is_int = 1; env->exception_next_eip = env->eip; qemu_log_mask(CPU_LOG_TB_IN_ASM, "SOFT"); - cpu_loop_exit(env); + cpu_loop_exit(cs); break; } qemu_log_mask(CPU_LOG_TB_IN_ASM, " %#x %#x\n", cs->exception_index, @@ -772,7 +772,7 @@ void helper_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1) env->error_code = 0; env->old_exception = -1; - cpu_loop_exit(env); + cpu_loop_exit(cs); } void cpu_vmexit(CPUX86State *env, uint32_t exit_code, uint64_t exit_info_1) -- cgit v1.2.1