From cf494ee581a80f0b5346f1e9afcd95f6d3a12ef6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 23 Mar 2009 16:39:29 +0000 Subject: [PATCH] Fixup dummy cpu setup. Passing NULL to cpu_init() doesn't work in upstream qemu. Also make sure the dummy cpu is in halted mode. Signed-off-by: Gerd Hoffmann --- hw/xen_machine_pv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 624d8dd2..df28be9b 100644 --- a/hw/xen_machine_pv.c +++ b/hw/xen_machine_pv.c @@ -51,7 +51,15 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size, #endif /* Initialize a dummy CPU */ - env = cpu_init(NULL); + if (cpu_model == NULL) { +#ifdef TARGET_X86_64 + cpu_model = "qemu64"; +#else + cpu_model = "qemu32"; +#endif + } + env = cpu_init(cpu_model); + env->halted = 1; /* Initialize backend core & drivers */ if (-1 == xen_be_init()) { -- 2.39.5