From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLAoO-0005wh-PZ for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLAoK-0004ek-A6 for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:43:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLAoK-0004eY-1m for qemu-devel@nongnu.org; Mon, 08 Oct 2012 06:43:44 -0400 Date: Mon, 8 Oct 2012 16:13:34 +0530 From: Amit Shah Message-ID: <20121008104334.GD25290@amit.redhat.com> References: <20120930230516.GA3923@amt.cnet> <1389829631.4053667.1349056207458.JavaMail.root@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389829631.4053667.1349056207458.JavaMail.root@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/1] kvmclock: fix guest stop notification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: Marcelo Tosatti , kvm list , Raghavendra K T , qemu list , Eric B Munson , Paolo Bonzini , Laszlo Ersek , Andreas =?iso-8859-1?Q?F=E4rber?= On (Sun) 30 Sep 2012 [21:50:07], Amos Kong wrote: > ----- Original Message ----- > > On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: > > > On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: > > > > Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest > > > > stop > > In commitlog of f349c12c0434e29c79ecde89029320c4002f7253: > > ## This patch uses the qemu Notifier system to tell the guest it _is about to be_ stopped > > > > > > notification, but it did it in a way that the stop notification > > > > would > > > > never reach the kernel. The kvm_vm_state_changed() function gets > > > > a > > > > value of 0 for the 'running' parameter when the VM is stopped, > > > > making > > > > all the code added previously dead code. > > > > > > > > This patch reworks the code so that it's called when 'running' is > > > > 0, > > > > which indicates the VM was stopped. > > Amit, did you touch any real issue? guest gets call trace with current code? > which kind of context? I guess you're asking for a testcase to trigger softlockups? Run a VM, make it do some work (like kernel compile). Then, 'stop' from the monitor for a few minutes. Later, on 'cont', the softlockup detector in the guest wakes up and shows a warning message mentioning the cpus were stuck for seconds. For this particular patch, though, I didn't really test things; just 'found' this by examining code. But as Marcelo points out, this patch is wrong. > Someone told me he got call trace when shutdown guest by 'init 0', I didn't > verify this issue. That sounds like a completely different thing, unless the trace is invoked by the softlockup detector. Amit