linux_old1/arch/ia64/include/asm/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
..
events.h xen: Remove unnecessary arch specific xen irq functions. 2010-02-18 17:17:58 -08:00
hypercall.h xen: ia64 build broken due to "xen: switch to new schedop hypercall by default." 2011-03-01 18:10:54 -05:00
hypervisor.h ia64/xen: compilation fix 2009-11-06 15:04:55 -08:00
inst.h ia64/pv_ops/xen/gate.S: xen gate page paravirtualization 2009-03-26 11:01:55 -07:00
interface.h xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it. 2012-03-10 12:44:44 -05:00
irq.h ia64/pv_ops/xen: define the nubmer of irqs which xen needs. 2008-10-17 10:06:59 -07:00
minstate.h ia64/pv_ops/xen: paravirtualize read/write ar.itc and ar.itm 2009-03-26 10:50:32 -07:00
page.h ia64/xen: define helper functions for xen related address conversion. 2008-10-17 09:57:57 -07:00
patchlist.h ia64/pv_ops/xen: define xen specific gate page. 2009-03-26 10:51:12 -07:00
privop.h ia64: remove some warnings. 2009-03-27 11:11:04 -07:00
xcom_hcall.h ia64/xen: xencomm conversion functions for hypercalls 2008-10-17 10:00:19 -07:00
xencomm.h ia64/xen: xencomm conversion functions for hypercalls 2008-10-17 10:00:19 -07:00