From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59521 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq2FV-0003OX-42 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 07:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq04p-0006NT-N3 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 04:50:57 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:57336) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq04p-0006NN-Ia for qemu-devel@nongnu.org; Mon, 30 Aug 2010 04:50:51 -0400 Received: by qyk31 with SMTP id 31so5055795qyk.4 for ; Mon, 30 Aug 2010 01:50:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C7B70E7.80906@redhat.com> Date: Mon, 30 Aug 2010 10:50:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <0a460e01cca4fa24f446c7a715fe6df17d0be9ed.1283152674.git.yamahata@valinux.co.jp> In-Reply-To: <0a460e01cca4fa24f446c7a715fe6df17d0be9ed.1283152674.git.yamahata@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Isaku Yamahata Cc: blauwirbel@gmail.com, glommer@redhat.com, alex.williamson@redhat.com, qemu-devel@nongnu.org, avi@redhat.com 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. 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"? It could also be interesting to convert everything to the Notifier API, if someone wants to play with Coccinelle... Paolo