From: Ian Jackson Date: Thu, 19 Jun 2008 09:21:59 +0000 (+0100) Subject: New hook "main_loop_prepare" for us to set cur_cpu. Urgh X-Git-Tag: xen-3.3.0-rc1~68 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b6496a3458d1bdb1dd41af4c3e103d1aa1665ca2;p=qemu-xen-3.3-testing.git New hook "main_loop_prepare" for us to set cur_cpu. Urgh --- diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c index 6995d2ae..630ce45a 100644 --- a/i386-dm/helper2.c +++ b/i386-dm/helper2.c @@ -543,6 +543,8 @@ int main_loop(void) char *qemu_file; fd_set fds; + main_loop_prepare(); + buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io, cpu_single_env); qemu_mod_timer(buffered_io_timer, qemu_get_clock(rt_clock)); diff --git a/vl.c b/vl.c index ace82cfa..65758ece 100644 --- a/vl.c +++ b/vl.c @@ -7215,6 +7215,11 @@ static int main_loop(void) cpu_disable_ticks(); return ret; } + +#else /* CONFIG_DM */ +void main_loop_prepare(void) { + cur_cpu = first_cpu; +} #endif /* !CONFIG_DM */ static void help(int exitcode) diff --git a/xen-config-host.h b/xen-config-host.h index daf0eed6..15e7789c 100644 --- a/xen-config-host.h +++ b/xen-config-host.h @@ -19,6 +19,8 @@ extern int domid; #undef CONFIG_GDBSTUB +void main_loop_prepare(void); + extern int xc_handle; extern int xen_pause_requested; extern int vcpus;