]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commitdiff
New hook "main_loop_prepare" for us to set cur_cpu. Urgh
authorIan Jackson <iwj@mariner.uk.xensource.com>
Thu, 19 Jun 2008 09:21:59 +0000 (10:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 19 Jun 2008 09:21:59 +0000 (10:21 +0100)
i386-dm/helper2.c
vl.c
xen-config-host.h

index 6995d2ae2a9285cca75807401c060cb26fc91729..630ce45af4d23d9d140e4d97e88bb597b4819b2a 100644 (file)
@@ -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 ace82cfa125e8bc6c31b827e18e63d43d671f4ef..65758ecec94ad913c60d9338b592f9919823d961 100644 (file)
--- 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)
index daf0eed664d5df34784a5e3e98fd2daecd75a174..15e7789c0393298aa69df6a95e0693ed855ecbff 100644 (file)
@@ -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;