From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3Uz-0008HL-OQ for qemu-devel@nongnu.org; Sun, 06 May 2012 11:35:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3Ux-0000bP-Sg for qemu-devel@nongnu.org; Sun, 06 May 2012 11:35:49 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55213 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3Ux-0000b9-L4 for qemu-devel@nongnu.org; Sun, 06 May 2012 11:35:47 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 6 May 2012 17:34:06 +0200 Message-Id: <1336318514-30906-7-git-send-email-afaerber@suse.de> In-Reply-To: <1336318514-30906-1-git-send-email-afaerber@suse.de> References: <1336318514-30906-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 for-next 06/74] pc: Pass X86CPU to pc_cpu_reset() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas F=C3=A4rber --- hw/pc.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4715f7a..4167782 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -934,9 +934,10 @@ void pc_acpi_smi_interrupt(void *opaque, int irq, in= t level) =20 static void pc_cpu_reset(void *opaque) { - CPUX86State *env =3D opaque; + X86CPU *cpu =3D opaque; + CPUX86State *env =3D &cpu->env; =20 - cpu_state_reset(env); + cpu_reset(CPU(cpu)); env->halted =3D !cpu_is_bsp(env); } =20 @@ -954,8 +955,8 @@ static X86CPU *pc_new_cpu(const char *cpu_model) if ((env->cpuid_features & CPUID_APIC) || smp_cpus > 1) { env->apic_state =3D apic_init(env, env->cpuid_apic_id); } - qemu_register_reset(pc_cpu_reset, env); - pc_cpu_reset(env); + qemu_register_reset(pc_cpu_reset, cpu); + pc_cpu_reset(cpu); return cpu; } =20 --=20 1.7.7