[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu v2 40/40] user-exec: Change exception_action
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu v2 40/40] user-exec: Change exception_action() argument to CPUState |
Date: |
Mon, 10 Mar 2014 01:15:49 +0100 |
Signed-off-by: Andreas Färber <address@hidden>
---
user-exec.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/user-exec.c b/user-exec.c
index 3b795c1..bc58056 100644
--- a/user-exec.c
+++ b/user-exec.c
@@ -38,11 +38,12 @@
//#define DEBUG_SIGNAL
-static void exception_action(CPUArchState *env1)
+static void exception_action(CPUState *cpu)
{
- CPUState *cpu = ENV_GET_CPU(env1);
-
#if defined(TARGET_I386)
+ X86CPU *x86_cpu = X86_CPU(cpu);
+ CPUX86State *env1 = &x86_cpu->env;
+
raise_exception_err(env1, cpu->exception_index, env1->error_code);
#else
cpu_loop_exit(cpu);
@@ -86,7 +87,6 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned
long address,
{
CPUState *cpu;
CPUClass *cc;
- CPUArchState *env;
int ret;
#if defined(DEBUG_SIGNAL)
@@ -105,7 +105,6 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned
long address,
cpu = current_cpu;
cc = CPU_GET_CLASS(cpu);
- env = cpu->env_ptr;
/* see if it is an MMU fault */
g_assert(cc->handle_mmu_fault);
ret = cc->handle_mmu_fault(cpu, address, is_write, MMU_USER_IDX);
@@ -121,7 +120,7 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned
long address,
/* we restore the process signal mask as the sigreturn should
do it (XXX: use sigsetjmp) */
sigprocmask(SIG_SETMASK, old_set, NULL);
- exception_action(env);
+ exception_action(cpu);
/* never comes here */
return 1;
--
1.8.4.5
- [Qemu-devel] [PATCH qom-cpu v2 30/40] exec: Change cpu_breakpoint_{insert, remove{, _by_ref, _all}} argument, (continued)
- [Qemu-devel] [PATCH qom-cpu v2 30/40] exec: Change cpu_breakpoint_{insert, remove{, _by_ref, _all}} argument, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 31/40] cpu-exec: Change cpu_resume_from_signal() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 32/40] cputlb: Change tlb_unprotect_code_phys() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 33/40] exec: Change memory_region_section_get_iotlb() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 34/40] exec: Change cpu_abort() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 35/40] target-cris: Replace DisasContext::env field with CRISCPU, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 36/40] target-microblaze: Replace DisasContext::env field with MicroBlazeCPU, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 37/40] cputlb: Change tlb_flush_page() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 38/40] cputlb: Change tlb_flush() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 39/40] cputlb: Change tlb_set_page() argument to CPUState, Andreas Färber, 2014/03/09
- [Qemu-devel] [PATCH qom-cpu v2 40/40] user-exec: Change exception_action() argument to CPUState,
Andreas Färber <=