The following patches are a solution to a problem we have encounteredwhen using the Xen hypervisor: - Need Pxx/Cxx states to save on power consumption when using Xen (we do want those datacenters to consume less power!), - Also need to figure out the Turbo mode so that the scheduler can properly boost a core for CPU bound guests.

In essence the Xen hypervisor requires that information to work efficiently.

There are some other ways of solving this problem as well that havebeen tossed around. I am enumerating them here, but I don't have thefull records of the disadvantages/advantges so hopefully some other peoplecan chime in. - Parse the information in userspace. I am not really sure how that would work, but one thought was export in SysFS the Pxx/Cxx states and other ones (hand-waving here) and the libvirt/xend/xl toolstack would parse those as needed and push them up (say when the guest is started). But it does have a disadvantage that it would not work well with CPU hotplug, nor with the physical CPU != virtual CPU discountinty (that is Linux sees only one CPU, and the ACPI Pxx says there are eight of them - with different values than the CPU0). - Make the ACPI subsystem export some of this functionality so that there can be multiple ACPI processor drivers and they can share common code. This is what this patch series follows. This does mean exporting some ACPI "stuff" outside drivers/acpi. - Implement the ACPI DSDT parsing in the hypervisor. The couple of reasons that pop in my head for not going that route is foremost it seems an overkill just so that this specific information (Pxx/Cxx) can pushed in the hypervisor. We already use the Linux ACPI to figure out the IRQ routing, or for ACPI states changes like button pushing, docking events, etc. Making it all be done in the hypervisor seems well, an overkill.

The original authors of the code are Intel folks. Liang has been workingon this to see if the abstraction can be improved, but I am by no meansan ACPI expert - so feedback, guidance or input would be much appreciated.

Liang: ACPI: processor: Don't setup cpu idle driver and handler

I think it can be actually dropped - now that disable_cpuidle() functionalityexists and we use it?