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 Content-Length: 1011 Lines: 28 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! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/