From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPTDs-0006ek-3g for qemu-devel@nongnu.org; Tue, 09 Apr 2013 03:44:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPTDp-0004T5-QQ for qemu-devel@nongnu.org; Tue, 09 Apr 2013 03:44:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPTDp-0004Si-Hv for qemu-devel@nongnu.org; Tue, 09 Apr 2013 03:44:05 -0400 Message-ID: <5163C6B4.3070507@redhat.com> Date: Tue, 09 Apr 2013 09:43:48 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365136091-26148-1-git-send-email-lig.fnst@cn.fujitsu.com> <1365136091-26148-4-git-send-email-lig.fnst@cn.fujitsu.com> <515EBA2A.1090005@redhat.com> <1365380334.5674.5.camel@liguang.fnst.cn.fujitsu.com> <516293A5.7030900@redhat.com> <1365492852.9553.14.camel@liguang.fnst.cn.fujitsu.com> In-Reply-To: <1365492852.9553.14.camel@liguang.fnst.cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: li guang Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, aliguori@us.ibm.com, afaerber@suse.de, stefanha@gmail.com Il 09/04/2013 09:34, li guang ha scritto: > Hmm ... maybe, but, > S-states may be more exactly, > S0 -> power on > S3 -> suspend > S5 -> power off > but that are conceptual, > actually, I just want centralize controlling > of power state transition of whole emulated machine. That is already there: qemu_system_suspend_request, qemu_register_suspend_notifier for S0->S3 qemu_system_wakeup_request, qemu_register_wakeup_notifier for S3->S0 qemu_system_powerdown_request, qemu_register_powerdown_notifier for Sx->S5 and the reset mechanism for S5->S0. Most of these should only be used by one "power management device" on the board (e.g. the PIIX3 or ICH9 power management devices in hw/acpi/*) and distributed to the other devices via whatever buses exist on the real machine. Paolo