On Thu, 16 Aug 2012, Lei Wen wrote:
Hi Dave,
On Thu, Aug 16, 2012 at 2:30 AM, Dave Martin dave.martin@linaro.org wrote:
In this kind of implementation, the hypervisor would be responsible for most aspects of power handling. The virtualisation support in the CPU allows CPUs to be hidden from Linux, and also allows CPU IDs and interrupt routing to be "faked" so that Linux does not see any change when it is migrated onto a different physical CPU by the hypervisor.
Linaro is currently working on a different implementation which gives Linux much more control over the whole process, and avoids the over- heads associated with using virtualisation for this purpose, but the code is not ready to be published yet.
Is it feasible to disclose in more details? What I can see is to move hypervisor code into kernel and install it at beginning like what KVM current does. While there is also heavy usage of secure monitor code in the switcher, does linaro also want to optimize them out?
That depends on the firmware to come with any given hardware implementation. If there is actually a Secore OS in that firmware then it is likely to assert control over all power up/down operations, in which case the sMCs can't be "optimized out".
But we can and did optimize out all the hypervisor code. You can have a look at this article for more details on the general design:
http://lwn.net/Articles/481055/
The code is available to Linaro members only for now and will be made public and submitted upstream in due course.
Nicolas