From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Lieven Subject: Re: qemu-kvm-1.0.1 - unable to exit if vcpu is in infinite loop Date: Thu, 28 Jun 2012 18:29:35 +0200 Message-ID: <4FEC866F.5000402@dlhnet.de> References: <4FEC56B2.6050502@dlhnet.de> <4FEC5B5A.4060302@siemens.com> <4FEC7214.2020900@dlhnet.de> <4FEC76A8.6060100@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" To: Jan Kiszka Return-path: Received: from ssl.dlhnet.de ([91.198.192.8]:56713 "EHLO ssl.dlh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888Ab2F1Q3i (ORCPT ); Thu, 28 Jun 2012 12:29:38 -0400 In-Reply-To: <4FEC76A8.6060100@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 28.06.2012 17:22, Jan Kiszka wrote: > On 2012-06-28 17:02, Peter Lieven wrote: >> On 28.06.2012 15:25, Jan Kiszka wrote: >>> On 2012-06-28 15:05, Peter Lieven wrote: >>>> Hi, >>>> >>>> i debugged my initial problem further and found out that the problem >>>> happens to be that >>>> the main thread is stuck in pause_all_vcpus() on reset or quit commands >>>> in the monitor >>>> if one cpu is stuck in the do-while loop kvm_cpu_exec. If I modify the >>>> condition from while (ret == 0) >>>> to while ((ret == 0)&& !env->stop); it works, but is this the right fix? >>>> "Quit" command seems to work, but on "Reset" the VM enterns pause state. >>> Before entering the wait loop in pause_all_vcpus, there are kicks sent >>> to all vcpus. Now we need to find out why some of those kicks apparently >>> don't reach the destination. >> can you explain shot what exactly these kicks do? does these kicks lead >> to leaving the kernel mode and returning to userspace? > Yes. A signal is sent, and KVM returns from the guest to userspace on > pending signals. is there a description available how this process exactly works? thanks peter