From b6496a3458d1bdb1dd41af4c3e103d1aa1665ca2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 19 Jun 2008 10:21:59 +0100 Subject: [PATCH] New hook "main_loop_prepare" for us to set cur_cpu. Urgh --- i386-dm/helper2.c | 2 ++ vl.c | 5 +++++ xen-config-host.h | 2 ++ 3 files changed, 9 insertions(+) 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; -- 2.39.5