qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RESEND][PATCH] APIC: Do not start zero-period timers


From: Jan Kiszka
Subject: [Qemu-devel] [RESEND][PATCH] APIC: Do not start zero-period timers
Date: Sat, 16 Aug 2008 11:07:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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 <address@hidden>
---
 hw/apic.c |    2 ++
 1 file changed, 2 insertions(+)

Index: b/hw/apic.c
===================================================================
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -566,6 +566,8 @@ static void apic_timer_update(APICState
         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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]