From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aurelien Jarno Subject: KVM-66: FreeBSD guest takes all CPU when idle Date: Fri, 2 May 2008 22:39:25 +0200 Message-ID: <20080502203925.GA30454@volta.aurel32.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti To: kvm-devel Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Hi, Since commit a0d22c57fbf0c67d73ab7ca3416841030e0bc22f, FreeBSD guests takes all host CPU even when they are idle. Reverting this patch in kvm-67 or git tree fixes (or workarounds?) the problem. Using -no-kvm-pit also workarounds the problem. Some more details: Host: Linux 2.6.24 x86-64 CPU: problem occurs on T7500 and Q9450 Guest: problem occurs with FreeBSD/i386 6.2 and 6.3 Regards, Aurelien commit a0d22c57fbf0c67d73ab7ca3416841030e0bc22f Author: Marcelo Tosatti Date: Fri Apr 11 14:53:26 2008 -0300 KVM: hlt emulation should take in-kernel APIC/PIT timers into account Timers that fire between guest hlt and vcpu_block's add_wait_queue() are ignored, possibly resulting in hangs. Also make sure that atomic_inc and waitqueue_active tests happen in the specified order, otherwise the following race is open: CPU0 CPU1 if (waitqueue_active(wq)) add_wait_queue() if (!atomic_read(pit_timer->pending)) schedule() atomic_inc(pit_timer->pending) Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone