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!