alistair23-linux/include/xen
Konrad Rzeszutek Wilk 73c154c60b xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
For the hypervisor to take advantage of the MWAIT support it needs
to extract from the ACPI _CST the register address. But the
hypervisor does not have the support to parse DSDT so it relies on
the initial domain (dom0) to parse the ACPI Power Management information
and push it up to the hypervisor. The pushing of the data is done
by the processor_harveset_xen module which parses the information that
the ACPI parser has graciously exposed in 'struct acpi_processor'.

For the ACPI parser to also expose the Cx states for MWAIT, we need
to expose the MWAIT capability (leaf 1). Furthermore we also need to
expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
function.

The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
operations, but it can't do it since it needs to be backwards compatible.
Instead we choose to use the native CPUID to figure out if the MWAIT
capability exists and use the XEN_SET_PDC query hypercall to figure out
if the hypervisor wants us to expose the MWAIT_LEAF capability or not.

Note: The XEN_SET_PDC query was implemented in c/s 23783:
"ACPI: add _PDC input override mechanism".

With this in place, instead of
 C3 ACPI IOPORT 415
we get now
 C3:ACPI FFH INTEL MWAIT 0x20

Note: The cpu_idle which would be calling the mwait variants for idling
never gets set b/c we set the default pm_idle to be the hypercall variant.

Acked-by: Jan Beulich <JBeulich@suse.com>
[v2: Fix missing header file include and #ifdef]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-03-10 12:44:44 -05:00
..
interface xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it. 2012-03-10 12:44:44 -05:00
balloon.h xen-balloon: convert sysdev_class to a regular subsystem 2011-12-14 15:32:50 -08:00
events.h xen/event: Add reference counting to event channels 2011-11-21 17:14:48 -05:00
evtchn.h
features.h
gntalloc.h xen/gntalloc,gntdev: Add unmap notify ioctl 2011-02-14 14:16:17 -05:00
gntdev.h xen/gntalloc,gntdev: Add unmap notify ioctl 2011-02-14 14:16:17 -05:00
grant_table.h xen/grant-table: Support mappings required by blkback 2011-12-20 17:07:27 -05:00
hvc-console.h treewide: use __printf not __attribute__((format(printf,...))) 2011-10-31 17:30:54 -07:00
hvm.h
Kbuild
page.h xen: allow balloon driver to use more than one memory region 2011-09-29 11:12:10 -04:00
platform_pci.h xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI 2011-11-16 12:13:42 -05:00
privcmd.h
swiotlb-xen.h
tmem.h xen: tmem: self-ballooning and frontswap-selfshrinking 2011-07-08 12:26:21 -06:00
xen-ops.h xen: suspend: add "arch" to pre/post suspend hooks 2011-02-25 16:43:12 +00:00
xen.h
xenbus.h Xen: consolidate and simplify struct xenbus_driver instantiation 2012-01-04 17:01:17 -05:00
xenbus_dev.h xen: Add xenbus_backend device 2011-12-16 13:29:41 -05:00
xencomm.h