From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42656 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq47Y-00045I-Do for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:09:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq47X-0000o6-0q for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:09:56 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:59740) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq47W-0000o0-Sh for qemu-devel@nongnu.org; Mon, 30 Aug 2010 09:09:54 -0400 Received: by yxs7 with SMTP id 7so406267yxs.4 for ; Mon, 30 Aug 2010 06:09:54 -0700 (PDT) Message-ID: <4C7BAC17.3030305@codemonkey.ws> Date: Mon, 30 Aug 2010 08:03:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 5/5] RFC: distinguish warm reset from cold reset. References: <0a460e01cca4fa24f446c7a715fe6df17d0be9ed.1283152674.git.yamahata@valinux.co.jp> <4C7B70E7.80906@redhat.com> In-Reply-To: <4C7B70E7.80906@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: glommer@redhat.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, Isaku Yamahata , alex.williamson@redhat.com, avi@redhat.com On 08/30/2010 03:50 AM, 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? Yes, but introduce more reset functions isn't the right approach. Reset should be a method of the device tree, not a stand alone function. Regards, Anthony Liguori > > 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 >