From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbvZG-0004bY-2O for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:58:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbvZA-0002su-3y for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:57:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbvZ9-0002sq-Rt for qemu-devel@nongnu.org; Thu, 31 Oct 2013 12:57:52 -0400 Date: Thu, 31 Oct 2013 19:00:33 +0200 From: "Michael S. Tsirkin" Message-ID: <20131031170033.GA10925@redhat.com> References: <20131031150955.GE9948@redhat.com> <52727695.8080007@redhat.com> <20131031154556.GB10424@redhat.com> <52727D97.3070209@redhat.com> <20131031161404.GA10710@redhat.com> <52728294.9050305@redhat.com> <20131031162652.GA10789@redhat.com> <52728790.7010404@redhat.com> <20131031164828.GA10862@redhat.com> <52728ABB.2030808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52728ABB.2030808@redhat.com> Subject: Re: [Qemu-devel] pvpanic plans? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: pkrempa@redhat.com, lersek@redhat.com, marcel.a@redhat.com, libvir-list@redhat.com, Hu Tao , qemu-devel@nongnu.org, armbru@redhat.com, rhod@redhat.com, kraxel@redhat.com, anthony@codemonkey.ws, lcapitulino@redhat.com, afaerber@suse.de On Thu, Oct 31, 2013 at 05:52:11PM +0100, Paolo Bonzini wrote: > Il 31/10/2013 17:48, Michael S. Tsirkin ha scritto: > > But code duplication is bad. > > So should we make a table of IO_ERROR-like states to avoid code > duplication? You have to draw a line somewhere... > > > I think IO error for example > > is broken in that you can't pause but can run then pause. > > Seems strange. > > "cont" moves you out of IO_ERROR. IO_ERROR is already a non-running > state (all states except RUNNING are non-running), "stop" is a no-op in > non-running states. I don't like it that much either, but it works. > > Paolo Interesting. Why do we have - { RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED }, then?