From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIGg5-0007eE-LD for qemu-devel@nongnu.org; Wed, 20 Mar 2013 06:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIGfu-00075d-6b for qemu-devel@nongnu.org; Wed, 20 Mar 2013 06:55:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIGft-00075U-VC for qemu-devel@nongnu.org; Wed, 20 Mar 2013 06:55:18 -0400 Message-ID: <5149957B.70505@redhat.com> Date: Wed, 20 Mar 2013 11:54:51 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <87y5dimorn.fsf@blackfin.pond.sub.org> In-Reply-To: <87y5dimorn.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v14 1/4] add a new runstate: RUN_STATE_GUEST_PANICKED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , Gleb Natapov , "Michael S. Tsirkin" , Hu Tao , qemu-devel , Luiz Capitulino , Blue Swirl , Orit Wasserman , Juan Quintela , Alexander Graf , Christian Borntraeger , Jan Kiszka , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti Il 20/03/2013 09:58, Markus Armbruster ha scritto: > Let's examine the other transitions to RUN_STATE_PAUSED, and whether > they can now come from RUN_STATE_GUEST_PANICKED: > > * process_incoming_migration_co() > > No, because we're in RUN_STATE_INMIGRATE here, aren't we? Juan? Yes. > * qmp_stop() > > No, because vm_stop() calls do_vm_stop() to do the actual state > transition, which protects it by runstate_is_running(). > > We can ignore the conditional, it merely punts the vm_stop() to the > main loop. > > Next question: RUN_STATE_INTERNAL_ERROR and RUN_STATE_SHUTDOWN may go to > RUN_STATE_FINISH_MIGRATE, but RUN_STATE_GUEST_PANICKED may not. Why? RUN_STATE_FINISH_MIGRATE is reached with vm_stop_force_state, so every state can go there. Next question: why doesn't the switch to RUN_STATE_SAVE_VM use vm_stop_force_state? Next question: almost all states go to RUN_STATE_FINISH_MIGRATE, the same would hold for RUN_STATE_SAVE_VM if it started using vm_stop_force_state. There are few exceptions, and I'm not even sure all of them are correct (why can't RUN_STATE_DEBUG go to RUN_STATE_FINISH_MIGRATE?). Should vm_stop_force_state override the runstate check (either directly, or by interposing a transition to RUN_STATE_PAUSED? The few outliers can be handled with manually-placed assertions. Paolo