[5024] APIC: Do not start zero-period timers (Jan Kiszka)
Revision: 5024
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5024 Author: aliguori Date: 2008-08-18 14:19:42 +0000 (Mon, 18 Aug 2008)
Log Message:
-----------
APIC: Do not start zero-period timers (Jan Kiszka)
The APIC timer must not start when the initial count is (still) zero.
This caused occasional stalls when booting secondary CPUs of Linux SMP guests.
Signed-off-by Jan Kiszka <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
trunk/hw/apic.c
Modified: trunk/hw/apic.c
===================================================================
hw/apic.c +2 -0
@@ -566,6 +566,8 @@ d = (current_time - s->initial_count_load_time) >> s->count_shift;if (s->lvt[APIC_LVT_TIMER ] &APIC_LVT_TIMER_PERIODIC ) { +if (!s->initial_count) + goto no_timer; d = ((d / ((uint64_t )s->initial_count +1 )) +1 ) * ((uint64_t )s->initial_count +1 ); }else {if (d >= s->initial_count)