From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: kernel 3.9.x kvm hangs after seabios Date: Wed, 8 May 2013 17:43:48 +0300 Message-ID: <20130508144347.GE12349@redhat.com> References: <20130508115559.GY12349@redhat.com> <20130508122052.GZ12349@redhat.com> <20130508132923.GB12349@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org To: Tomas Papan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49885 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756361Ab3EHOnu (ORCPT ); Wed, 8 May 2013 10:43:50 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, May 08, 2013 at 03:50:47PM +0200, Tomas Papan wrote: > Ok, the cpu stays at 0% when it hangs, there is only one 100% cpu peak > which happens when the vm starts ( I think this is quite normal). > > However I run following command, and I stop it right when it hangs: > anakin trace2 # virsh start vm-jack; pid=`virsh qemu-monitor-command > vm-jack --hmp info cpus | grep '\*' | awk '{print $5}' | cut -d\= > -f2`; trace-cmd record -P $pid -p function > > if anyone is interested it produces a 1.6 GB file (the compressed > version can be found here: http://papan.sk/share/trace2.dat.tar.gz > (150 MB)) > Thanks! Can you test the patch below: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6667042..0af1807 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -5197,6 +5197,12 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) return 0; } + if (vcpu->arch.halt_request) { + vcpu->arch.halt_request = 0; + ret = kvm_emulate_halt(vcpu); + goto out; + } + if (signal_pending(current)) goto out; if (need_resched()) -- Gleb.