Patchwork [17/27] xen_machine_pv: use cpu_init() instead of cpu_x86_init()

login
register
mail settings
Submitter Eduardo Habkost
Date Oct. 24, 2012, 5:49 p.m.
Message ID <1351101001-14589-18-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/193896/
State New
Headers show

Comments

Eduardo Habkost - Oct. 24, 2012, 5:49 p.m.
cpu_init() will be kept as the simple-to-use init+realize function that some
code uses (e.g., *-user, and now xen_machine_pv too).

This will make cpu_x86_init() be used directly only by the more specialized PC
code, that will need to do additional initialization steps between the CPU
object creation and the x86_cpu_realize() call.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/xen_machine_pv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 4264703..95833f4 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -35,7 +35,6 @@  static void xen_init_pv(QEMUMachineInitArgs *args)
     const char *kernel_filename = args->kernel_filename;
     const char *kernel_cmdline = args->kernel_cmdline;
     const char *initrd_filename = args->initrd_filename;
-    X86CPU *cpu;
     CPUX86State *env;
     DriveInfo *dinfo;
     int i;
@@ -48,8 +47,7 @@  static void xen_init_pv(QEMUMachineInitArgs *args)
         cpu_model = "qemu32";
 #endif
     }
-    cpu = cpu_x86_init(cpu_model);
-    env = &cpu->env;
+    env = cpu_init(cpu_model);
     env->halted = 1;
 
     /* Initialize backend core & drivers */