>From a0f24a20f472024f156a1271e3012500047b6b32 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 26 Jun 2008 20:17:55 +0200 Subject: [PATCH] qemu-xen: Fix PV segfault Don't access cur_cpu with CONFIG_DM, for PV machines it is NULL. Signed-off-by: Kevin Wolf --- vl.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 65758ec..e7ac686 100644 --- a/vl.c +++ b/vl.c @@ -7106,7 +7106,9 @@ void main_loop_wait(int timeout) qemu_aio_poll(); if (vm_running) { +#ifndef CONFIG_DM if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)) +#endif qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL], qemu_get_clock(vm_clock)); /* run dma transfers, if any */ @@ -7114,7 +7116,9 @@ void main_loop_wait(int timeout) } /* real time timers */ +#ifndef CONFIG_DM if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER)) +#endif qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME], qemu_get_clock(rt_clock)); -- 1.5.4.5