Received: from eggs.gnu.org ([2001:4830:134:3::10]:57032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuS0z-0006Oc-NO for qemu-devel@nongnu.org; Wed, 03 Jul 2013 14:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuS0w-0003D0-4j for qemu-devel@nongnu.org; Wed, 03 Jul 2013 14:42:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45601 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuS0v-0003Cd-Sy for qemu-devel@nongnu.org; Wed, 03 Jul 2013 14:42:50 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 3 Jul 2013 20:42:37 +0200 Message-Id: <1372876958-18186-3-git-send-email-afaerber@suse.de> In-Reply-To: <1372876958-18186-1-git-send-email-afaerber@suse.de> References: <1372876958-18186-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 2/3] target-i386: Change do_interrupt_all() argument to X86CPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , rth@twiddle.net log_cpu_state() needs CPUState. Signed-off-by: Andreas F=C3=A4rber --- target-i386/seg_helper.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index e0552d0..e789102 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -1160,12 +1160,13 @@ static void handle_even_inj(CPUX86State *env, int= intno, int is_int, * the int instruction. next_eip is the env->eip value AFTER the interru= pt * instruction. It is only relevant if is_int is TRUE. */ -static void do_interrupt_all(CPUX86State *env, int intno, int is_int, +static void do_interrupt_all(X86CPU *cpu, int intno, int is_int, int error_code, target_ulong next_eip, int = is_hw) { + CPUX86State *env =3D &cpu->env; + if (qemu_loglevel_mask(CPU_LOG_INT)) { if ((env->cr[0] & CR0_PE_MASK)) { - X86CPU *cpu =3D x86_env_get_cpu(env); static int count; =20 qemu_log("%6d: v=3D%02x e=3D%04x i=3D%d cpl=3D%d IP=3D%04x:"= TARGET_FMT_lx @@ -1253,7 +1254,7 @@ void x86_cpu_do_interrupt(CPUState *cs) /* simulate a real cpu exception. On i386, it can trigger new exceptions, but we do not handle double or triple faults yet. */ - do_interrupt_all(env, env->exception_index, + do_interrupt_all(cpu, env->exception_index, env->exception_is_int, env->error_code, env->exception_next_eip, 0); @@ -1264,7 +1265,7 @@ void x86_cpu_do_interrupt(CPUState *cs) =20 void do_interrupt_x86_hardirq(CPUX86State *env, int intno, int is_hw) { - do_interrupt_all(env, intno, 0, 0, 0, is_hw); + do_interrupt_all(x86_env_get_cpu(env), intno, 0, 0, 0, is_hw); } =20 void helper_enter_level(CPUX86State *env, int level, int data32, --=20 1.8.1.4