Patchwork [qom-next,58/59] xen_machine_pv: Use cpu_x86_init() to obtain X86CPU

login
register
mail settings
Submitter Andreas Färber
Date May 23, 2012, 3:08 a.m.
Message ID <1337742502-28565-59-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/160851/
State New
Headers show

Comments

Andreas Färber - May 23, 2012, 3:08 a.m.
Needed for moving halted field to CPUState.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/xen_machine_pv.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index 7eee770..4b72aa7 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -36,6 +36,7 @@  static void xen_init_pv(ram_addr_t ram_size,
 			const char *initrd_filename,
 			const char *cpu_model)
 {
+    X86CPU *cpu;
     CPUX86State *env;
     DriveInfo *dinfo;
     int i;
@@ -48,7 +49,8 @@  static void xen_init_pv(ram_addr_t ram_size,
         cpu_model = "qemu32";
 #endif
     }
-    env = cpu_init(cpu_model);
+    cpu = cpu_x86_init(cpu_model);
+    env = &cpu->env;
     env->halted = 1;
 
     /* Initialize backend core & drivers */