qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-next 06/74] pc: Pass X86CPU to pc_cpu_reset()


From: Andreas Färber
Subject: [Qemu-devel] [PATCH for-next 06/74] pc: Pass X86CPU to pc_cpu_reset()
Date: Sun, 6 May 2012 17:34:06 +0200

Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <address@hidden>
---
 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, int 
level)
 
 static void pc_cpu_reset(void *opaque)
 {
-    CPUX86State *env = opaque;
+    X86CPU *cpu = opaque;
+    CPUX86State *env = &cpu->env;
 
-    cpu_state_reset(env);
+    cpu_reset(CPU(cpu));
     env->halted = !cpu_is_bsp(env);
 }
 
@@ -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 = 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;
 }
 
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]