1
linux/arch/ia64/include/asm
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
..
native
sn treewide: fix potentially dangerous trailing ';' in #defined values/expressions 2011-07-21 14:10:00 +02:00
uv
xen xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it. 2012-03-10 12:44:44 -05:00
acpi-ext.h
acpi.h ACPI / PM: Merge do_suspend_lowlevel() into acpi_save_state_mem() 2011-02-24 19:58:54 +01:00
agp.h
asm-offsets.h
asmmacro.h
atomic.h atomic: cleanup asm-generic atomic*.h inclusion 2011-07-26 16:49:47 -07:00
auxvec.h
bitops.h asm-generic: add another generic ext2 atomic bitops 2011-07-26 16:49:46 -07:00
bitsperlong.h
break.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
checksum.h
clocksource.h clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option 2011-07-21 13:34:05 -07:00
cpu.h
cputime.h Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-01-06 08:44:54 -08:00
current.h
cyclone.h
delay.h
device.h iommu: Rename the DMAR and INTR_REMAP config options 2011-09-21 10:22:03 +02:00
div64.h
dma-mapping.h [IA64] Add DMA_ERROR_CODE define. 2011-01-11 11:55:06 -08:00
dma.h
dmi.h
elf.h
emergency-restart.h
errno.h
esi.h
fb.h
fcntl.h
fpswa.h
fpu.h
ftrace.h
futex.h futex: Sanitize futex ops argument types 2011-03-11 12:23:31 +01:00
gcc_intrin.h
gpio.h [IA64] Hook up gpiolib support 2011-06-01 13:44:06 -07:00
hardirq.h [IA64] Move local_softirq_pending() definition 2010-10-19 13:31:11 +02:00
hpsim.h
hugetlb.h
hw_irq.h ia64: Remove redundant declaration of irq_desc[] 2011-03-29 14:48:05 +02:00
ia64regs.h
idle.h
intel_intrin.h
intrinsics.h
io.h ACPI: Use ioremap_cache() 2011-01-07 01:04:19 -05:00
ioctl.h
ioctls.h ioctl: Use asm-generic/ioctls.h on ia64 (enables termiox) 2010-10-22 10:20:00 -07:00
iommu_table.h ia64, iommu: Add a dummy iommu_table.h file in IA64. 2010-10-08 13:11:11 -07:00
iommu.h iommu: Add option to group multi-function devices 2011-11-15 12:22:31 +01:00
iosapic.h
ipcbuf.h consolidate a bunch of ipcbuf.h instances 2012-01-03 22:55:18 -05:00
irq_regs.h
irq.h
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
Kbuild archs: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
kdebug.h
kexec.h
kmap_types.h
kprobes.h
kregs.h
kvm_host.h KVM: Clean up vm creation and release 2011-01-12 11:29:09 +02:00
kvm_para.h
kvm.h
libata-portmap.h
linkage.h
local64.h
local.h
machvec_dig_vtd.h
machvec_dig.h
machvec_hpsim.h
machvec_hpzx1_swiotlb.h
machvec_hpzx1.h
machvec_init.h
machvec_sn2.h
machvec_uv.h
machvec_xen.h
machvec.h
mc146818rtc.h
mca_asm.h
mca.h
meminit.h
mman.h
mmu_context.h
mmu.h
mmzone.h
module.h
msgbuf.h
msidef.h
mutex.h
nodedata.h
numa.h
page.h [IA64] fix ia64 build failure in pmdp_get_and_clear 2011-01-14 10:56:38 -08:00
pal.h Fix common misspellings 2011-03-31 11:26:23 -03:00
param.h
paravirt_patch.h
paravirt_privop.h
paravirt.h ia64: add jump labels for paravirt 2011-07-14 12:59:45 +03:00
parport.h
patch.h
pci.h PCI: IA64: convert pcibios_set_master() to a non-inlined function 2012-01-06 12:10:37 -08:00
percpu.h
perfmon_default_smpl.h Fix common misspellings 2011-03-31 11:26:23 -03:00
perfmon.h fix typos 'comamnd' -> 'command' in comments 2011-02-02 11:31:21 +01:00
pgalloc.h
pgtable.h mm: remove pte_*map_nested() 2010-10-26 16:52:08 -07:00
poll.h
posix_types.h
processor.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ptrace_offsets.h
ptrace.h ptrace: unify show_regs() prototype 2011-07-26 16:49:43 -07:00
pvclock-abi.h
resource.h
rse.h
rwsem.h rwsem: Move duplicate function prototypes to linux/rwsem.h 2011-01-27 12:30:39 +01:00
sal.h
scatterlist.h
sections.h
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h Add _addr_lsb field to ia64 siginfo 2010-10-12 09:37:10 +02:00
signal.h
smp.h
socket.h net: add wireless TX status socket option 2011-11-09 16:01:02 -05:00
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
stat.h
statfs.h
string.h
swab.h
swiotlb.h
sync_bitops.h
syscall.h
system.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags 2010-10-21 14:37:27 -07:00
termbits.h tty: Add EXTPROC support for LINEMODE 2010-08-10 13:47:39 -07:00
termios.h
thread_info.h freezer: remove now unused TIF_FREEZE 2011-11-21 12:32:25 -08:00
timex.h
tlb.h ia64: mmu_gather rework 2011-05-25 08:39:15 -07:00
tlbflush.h
topology.h
types.h consolidate umode_t declarations 2012-01-03 22:55:17 -05:00
uaccess.h
ucontext.h
unaligned.h
uncached.h
unistd.h [IA64] Wire up cross memory attach syscalls 2011-11-02 14:00:26 -07:00
unwind.h
user.h
ustack.h
vga.h
xor.h