qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip


From: li guang
Subject: Re: [Qemu-devel] [PATCH][RFC 0/14] implement power chip
Date: Tue, 19 Mar 2013 08:55:54 +0800

在 2013-03-18一的 11:07 +0000,Peter Maydell写道:
> On 13 March 2013 08:01, liguang <address@hidden> wrote:
> > By now, all devices of QEMU do not have much more
> > power management consideration, for example, if
> > system do suspend, it will call all registered notifiers,
> > this was loosely required, and the code to do power management
> > state transition seems just do 'ugly emulation', rather than be
> > conscious with whole system devices, same condition with reset(it
> > has been embedded in DeviceClass, good!),
> > shutdown, in real world, commonly all devices' power are controlled
> > by a power chip, then all power sequence can be done just
> > issue commands to this chip.
> > so, I come across an idea to implement qdev'ed power device, and
> > make all qdev struct of devices aware of self power management(add
> > on/off/wakeup/suspend ... filed for DeviceClass), this will
> > bring tidy power management, and the emulation will more like what
> > happened in real world.
> 
> I'm really dubious that this can or should be implemented by
> adding methods at the device base class level. I don't think
> real hardware works this way.

and what it should be?

>  You could probably do power on/off
> like this. Reset definitely shouldn't be done this way, and
> suspend probably not either.

AFAIK, reset is mostly power off then power on,
suspend, of course is not supported by all devices, 
but, if system want to suspend, it have to let all devices
aware this, and if the device support power suspend, it
can do something specific(or just some with others, simple)

> 
> I think more documentation/discussion of what you think the
> semantics of the power down/up/etc should be might be useful.
> 

I'm eager to get more comments and discussion.
This idea simply based on system board design convention,
I'm not saying a power chip has signals directly connected
to all devices, I mean system board and its devices should 
have protocol to deal with power state changes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]