From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hu Tao Subject: Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED Date: Wed, 6 Mar 2013 17:03:18 +0800 Message-ID: <20130306090318.GC4719@localhost.localdomain> References: <51346BFF.5000704@redhat.com> <20130305031701.GN16362@localhost.localdomain> <5135AC2A.8010008@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Peter Maydell , Gleb Natapov , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel , Markus Armbruster , Blue Swirl , Orit Wasserman , kvm list , Juan Quintela , Alexander Graf , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , Luiz Capitulino , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti , "linux-kernel@vger.kernel.org" To: Paolo Bonzini Return-path: In-Reply-To: <5135AC2A.8010008@redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On Tue, Mar 05, 2013 at 09:26:18AM +0100, Paolo Bonzini wrote: > Il 05/03/2013 04:17, Hu Tao ha scritto: > > Will > > > > if (runstate_check(RUN_STATE_INTERNAL_ERROR) || > > runstate_check(RUN_STATE_SHUTDOWN) || > > runstate_check(RUN_STATE_GUEST_PANICKED)) { > > runstate_set(RUN_STATE_PAUSED); > > } > > > > be OK? Or I must be misunderstanding you. > > > > Please move > > return (runstate_check(RUN_STATE_INTERNAL_ERROR) || > runstate_check(RUN_STATE_SHUTDOWN) || > runstate_check(RUN_STATE_GUEST_PANICKED)); > > to a separate function (runstate_needs_reset for example), so that you > can reuse it in the two or three places that need it. See it now. Thanks! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755650Ab3CFJDV (ORCPT ); Wed, 6 Mar 2013 04:03:21 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:4725 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750816Ab3CFJDM (ORCPT ); Wed, 6 Mar 2013 04:03:12 -0500 X-IronPort-AV: E=Sophos;i="4.84,793,1355068800"; d="scan'208";a="6823401" Date: Wed, 6 Mar 2013 17:03:18 +0800 From: Hu Tao To: Paolo Bonzini Cc: kvm list , qemu-devel , "linux-kernel@vger.kernel.org" , "Daniel P. Berrange" , KAMEZAWA Hiroyuki , Jan Kiszka , Gleb Natapov , Blue Swirl , Eric Blake , Andrew Jones , Marcelo Tosatti , Sasha Levin , Luiz Capitulino , Anthony Liguori , Markus Armbruster , Stefan Hajnoczi , Juan Quintela , Orit Wasserman , Kevin Wolf , Wen Congyang , "Michael S. Tsirkin" , Alexander Graf , Alex Williamson , Peter Maydell Subject: Re: [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED Message-ID: <20130306090318.GC4719@localhost.localdomain> References: <51346BFF.5000704@redhat.com> <20130305031701.GN16362@localhost.localdomain> <5135AC2A.8010008@redhat.com> MIME-Version: 1.0 In-Reply-To: <5135AC2A.8010008@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/06 17:02:07, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/03/06 17:02:07, Serialize complete at 2013/03/06 17:02:07 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 05, 2013 at 09:26:18AM +0100, Paolo Bonzini wrote: > Il 05/03/2013 04:17, Hu Tao ha scritto: > > Will > > > > if (runstate_check(RUN_STATE_INTERNAL_ERROR) || > > runstate_check(RUN_STATE_SHUTDOWN) || > > runstate_check(RUN_STATE_GUEST_PANICKED)) { > > runstate_set(RUN_STATE_PAUSED); > > } > > > > be OK? Or I must be misunderstanding you. > > > > Please move > > return (runstate_check(RUN_STATE_INTERNAL_ERROR) || > runstate_check(RUN_STATE_SHUTDOWN) || > runstate_check(RUN_STATE_GUEST_PANICKED)); > > to a separate function (runstate_needs_reset for example), so that you > can reuse it in the two or three places that need it. See it now. Thanks! From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDAFq-0005ib-Gm for qemu-devel@nongnu.org; Wed, 06 Mar 2013 04:03:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDAFl-000348-QK for qemu-devel@nongnu.org; Wed, 06 Mar 2013 04:03:18 -0500 Received: from [222.73.24.84] (port=55567 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDAFl-00033N-FQ for qemu-devel@nongnu.org; Wed, 06 Mar 2013 04:03:13 -0500 Date: Wed, 6 Mar 2013 17:03:18 +0800 From: Hu Tao Message-ID: <20130306090318.GC4719@localhost.localdomain> References: <51346BFF.5000704@redhat.com> <20130305031701.GN16362@localhost.localdomain> <5135AC2A.8010008@redhat.com> MIME-Version: 1.0 In-Reply-To: <5135AC2A.8010008@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH v13 4/8] add a new runstate: RUN_STATE_GUEST_PANICKED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , Gleb Natapov , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel , Markus Armbruster , Blue Swirl , Orit Wasserman , kvm list , Juan Quintela , Alexander Graf , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , Luiz Capitulino , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti , "linux-kernel@vger.kernel.org" On Tue, Mar 05, 2013 at 09:26:18AM +0100, Paolo Bonzini wrote: > Il 05/03/2013 04:17, Hu Tao ha scritto: > > Will > > > > if (runstate_check(RUN_STATE_INTERNAL_ERROR) || > > runstate_check(RUN_STATE_SHUTDOWN) || > > runstate_check(RUN_STATE_GUEST_PANICKED)) { > > runstate_set(RUN_STATE_PAUSED); > > } > > > > be OK? Or I must be misunderstanding you. > > > > Please move > > return (runstate_check(RUN_STATE_INTERNAL_ERROR) || > runstate_check(RUN_STATE_SHUTDOWN) || > runstate_check(RUN_STATE_GUEST_PANICKED)); > > to a separate function (runstate_needs_reset for example), so that you > can reuse it in the two or three places that need it. See it now. Thanks!