From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMntc-0001kJ-LB for qemu-devel@nongnu.org; Sun, 09 Mar 2014 20:16:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMntV-0005M5-CU for qemu-devel@nongnu.org; Sun, 09 Mar 2014 20:16:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42351 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMntV-0005Lk-5M for qemu-devel@nongnu.org; Sun, 09 Mar 2014 20:16:37 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 10 Mar 2014 01:15:49 +0100 Message-Id: <1394410549-13751-41-git-send-email-afaerber@suse.de> In-Reply-To: <1394410549-13751-1-git-send-email-afaerber@suse.de> References: <1394410549-13751-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu v2 40/40] user-exec: Change exception_action() argument to CPUState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= Signed-off-by: Andreas F=C3=A4rber --- 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 @@ =20 //#define DEBUG_SIGNAL =20 -static void exception_action(CPUArchState *env1) +static void exception_action(CPUState *cpu) { - CPUState *cpu =3D ENV_GET_CPU(env1); - #if defined(TARGET_I386) + X86CPU *x86_cpu =3D X86_CPU(cpu); + CPUX86State *env1 =3D &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, unsig= ned long address, { CPUState *cpu; CPUClass *cc; - CPUArchState *env; int ret; =20 #if defined(DEBUG_SIGNAL) @@ -105,7 +105,6 @@ static inline int handle_cpu_signal(uintptr_t pc, uns= igned long address, =20 cpu =3D current_cpu; cc =3D CPU_GET_CLASS(cpu); - env =3D cpu->env_ptr; /* see if it is an MMU fault */ g_assert(cc->handle_mmu_fault); ret =3D cc->handle_mmu_fault(cpu, address, is_write, MMU_USER_IDX); @@ -121,7 +120,7 @@ static inline int handle_cpu_signal(uintptr_t pc, uns= igned 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); =20 /* never comes here */ return 1; --=20 1.8.4.5