From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bWz-00062n-SR for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:29:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5bWs-0006lG-I7 for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:29:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5bWs-0006kx-A2 for qemu-devel@nongnu.org; Thu, 08 Mar 2012 06:29:06 -0500 Message-ID: <4F5897F8.6090503@redhat.com> Date: Thu, 08 Mar 2012 13:28:56 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4F58664D.1070800@cn.fujitsu.com> <4F5868C4.2090509@cn.fujitsu.com> <4F5886C4.7040100@cn.fujitsu.com> In-Reply-To: <4F5886C4.7040100@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RESEND][PATCH 2/2 v3] deal with guest panicked event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: Gleb Natapov , kvm list , Jan Kiszka , qemu-devel , "linux-kernel@vger.kernel.org" , KAMEZAWA Hiroyuki On 03/08/2012 12:15 PM, Wen Congyang wrote: > When the host knows the guest is panicked, it will set > exit_reason to KVM_EXIT_GUEST_PANICKED. So if qemu receive > this exit_reason, we can send a event to tell management > application that the guest is panicked and set the guest > status to RUN_STATE_PANICKED. > > Signed-off-by: Wen Congyang > --- > kvm-all.c | 5 +++++ > monitor.c | 3 +++ > monitor.h | 1 + > qapi-schema.json | 2 +- > qmp.c | 3 ++- > vl.c | 1 + > 6 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/kvm-all.c b/kvm-all.c > index 77eadf6..b3c9a83 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1290,6 +1290,11 @@ int kvm_cpu_exec(CPUState *env) > (uint64_t)run->hw.hardware_exit_reason); > ret = -1; > break; > + case KVM_EXIT_GUEST_PANICKED: > + monitor_protocol_event(QEVENT_GUEST_PANICKED, NULL); > + vm_stop(RUN_STATE_PANICKED); > + ret = -1; > + break; > If the management application is not aware of this event, then it will never resume the guest, so it will appear hung. -- error compiling committee.c: too many arguments to function