From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KV5aE-0006bg-KL for qemu-devel@nongnu.org; Mon, 18 Aug 2008 10:19:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KV5aD-0006an-KY for qemu-devel@nongnu.org; Mon, 18 Aug 2008 10:19:45 -0400 Received: from [199.232.76.173] (port=41434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KV5aD-0006ak-Fj for qemu-devel@nongnu.org; Mon, 18 Aug 2008 10:19:45 -0400 Received: from savannah.gnu.org ([199.232.41.3]:57884 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KV5aD-0004Oi-6k for qemu-devel@nongnu.org; Mon, 18 Aug 2008 10:19:45 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KV5aB-00073C-VQ for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:19:44 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KV5aB-000738-DP for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:19:43 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Mon, 18 Aug 2008 14:19:43 +0000 Subject: [Qemu-devel] [5024] APIC: Do not start zero-period timers (Jan Kiszka) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/apic.c Modified: trunk/hw/apic.c =================================================================== --- trunk/hw/apic.c 2008-08-18 14:00:20 UTC (rev 5023) +++ trunk/hw/apic.c 2008-08-18 14:19:42 UTC (rev 5024) @@ -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)