From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: KVM-66: FreeBSD guest takes all CPU when idle Date: Fri, 2 May 2008 19:23:22 -0300 Message-ID: <20080502222322.GA15040@dmt> References: <20080502203925.GA30454@volta.aurel32.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Aurelien Jarno Return-path: Content-Disposition: inline In-Reply-To: <20080502203925.GA30454@volta.aurel32.net> 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 On Fri, May 02, 2008 at 10:39:25PM +0200, Aurelien Jarno wrote: > 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 Aurelien, Can you give this a try. diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 1646102..07f9ff1 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -216,7 +216,7 @@ int pit_has_pending_timer(struct kvm_vcpu *vcpu) { struct kvm_pit *pit = vcpu->kvm->arch.vpit; - if (pit && vcpu->vcpu_id == 0) + if (pit && vcpu->vcpu_id == 0 && pit->pit_state.inject_pending) return atomic_read(&pit->pit_state.pit_timer.pending); return 0; ------------------------------------------------------------------------- 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