From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37619 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKTRc-0002aO-0p for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:16:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKTQv-0001nH-BT for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:16:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKTQv-0001nD-3V for qemu-devel@nongnu.org; Mon, 22 Nov 2010 05:15:37 -0500 Date: Mon, 22 Nov 2010 12:15:21 +0200 From: "Michael S. Tsirkin" Message-ID: <20101122101521.GA23271@redhat.com> References: <20101121191641.GA28858@redhat.com> <4CEA3E8E.9040508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CEA3E8E.9040508@redhat.com> Subject: [Qemu-devel] Re: [PATCHv3 RFC] qemu-kvm: stop devices on vmstop List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: jasowang@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com On Mon, Nov 22, 2010 at 10:57:34AM +0100, Gerd Hoffmann wrote: > On 11/21/10 20:16, Michael S. Tsirkin wrote: > >Stop running devices on vmstop, so that VM does not interact with > >outside world at that time. > > > >Whitelist system handlers which run even when VM is stopped. > >These are specific handlers like monitor, gdbstub, migration. > >I'm not really sure about ui: spice and vnc: do they need to run? > > Yes, vnc and spice should run. They serve the clients. They also > don't change device state. > > cheers, > Gerd > > PS: Well, in the spice case this isn't 100% true, the handlers can > change qxl device state in some cases. But spice has a start/stop > handler which takes care to flush all outstanding work which could > change device state on vmstop, so it is save to keep the handlers > active when the vm is in stopped state. So here's how I see it so far: assuming we want to avoid changing vm state on vmstop - flush bdrv and aio on vmstop (this is so we don't need to stop them) - keep running aio - stop running bh - stop running slirp - keep running host/rt timers - keep running fd callbacks for migration - keep running fd callbacks for ui: vnc, spice Note: only clock=vm can satisfy this requirement. Default clock=rtc keeps running when VM is stopped, this is by design. -- MST