Received: from [140.186.70.92] (port=58798 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq2Ep-00034q-KI for qemu-devel@nongnu.org; Mon, 30 Aug 2010 07:09:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq0d2-0002y9-Nw for qemu-devel@nongnu.org; Mon, 30 Aug 2010 05:26:13 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:34976) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq0d2-0002xk-CV for qemu-devel@nongnu.org; Mon, 30 Aug 2010 05:26:12 -0400 Date: Mon, 30 Aug 2010 18:38:02 +0900 From: Isaku Yamahata Message-ID: <20100830093802.GB7402@valinux.co.jp> References: <0a460e01cca4fa24f446c7a715fe6df17d0be9ed.1283152674.git.yamahata@valinux.co.jp> <4C7B70E7.80906@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C7B70E7.80906@redhat.com> Subject: [Qemu-devel] Re: [PATCH 5/5] RFC: distinguish warm reset from cold reset. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: blauwirbel@gmail.com, glommer@redhat.com, alex.williamson@redhat.com, qemu-devel@nongnu.org, avi@redhat.com Thank you for comments. On Mon, Aug 30, 2010 at 10:50:47AM +0200, Paolo Bonzini wrote: > On 08/30/2010 09:49 AM, Isaku Yamahata wrote: >> +/* those two functions are obsoleted by cold/warm reset API. */ >> [qemu_register_reset/qemu_unregister_reset] > > Are they? > > They have a _lot_ of callers and most of the time you do not really care > about cold vs. warm reset. So, I think either you define a new API > where you can request cold reset/warm reset/both, or qemu_register_reset > is here to stay forever. Then, let's keep qemu_register_reset() as for both cold/warm with documentation/comments. > In general, I don't like the duplication you introduce between cold > reset, warm reset, shutdown, powerdown, etc. Maybe you can introduce a > new "VMEvent" abstraction with functions like "request", "is requested", > "register handler"? Sounds good idea. I'll give it a try. Before touching the code, I'd like to split out those related functions and main_loop() from vl.c into a new file, main-loop.c or something like that. Any objection for splitting out vl.c for that? > It could also be interesting to convert everything to the Notifier API, > if someone wants to play with Coccinelle... > > Paolo > -- yamahata