linux/arch/x86/xen
Andy Lutomirski 8ef46a672a x86/asm/entry: Add this_cpu_sp0() to read sp0 for the current cpu
We currently store references to the top of the kernel stack in
multiple places: kernel_stack (with an offset) and
init_tss.x86_tss.sp0 (no offset).  The latter is defined by
hardware and is a clean canonical way to find the top of the
stack.  Add an accessor so we can start using it.

This needs minor paravirt tweaks.  On native, sp0 defines the
top of the kernel stack and is therefore always correct.  On Xen
and lguest, the hypervisor tracks the top of the stack, but we
want to start reading sp0 in the kernel.  Fixing this is simple:
just update our local copy of sp0 as well as the hypervisor's
copy on task switches.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/8d675581859712bee09a055ed8f785d80dac1eca.1425611534.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-06 08:32:57 +01:00
..
apic.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
debugfs.c debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
debugfs.h debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
efi.c xen/efi: Directly include needed headers 2014-09-23 13:36:20 +00:00
enlighten.c x86/asm/entry: Add this_cpu_sp0() to read sp0 for the current cpu 2015-03-06 08:32:57 +01:00
grant-table.c x86/xen: use vmap() to map grant table pages in PVH guests 2014-08-11 11:59:35 +01:00
irq.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
Kconfig Support PCI devices with multiple MSIs, performance improvement for 2014-04-03 14:01:37 -07:00
Makefile arch/x86/xen: Silence compiler warnings 2014-07-18 21:24:03 +01:00
mmu.c x86/xen: cleanup arch/x86/xen/mmu.c 2015-01-28 10:01:11 +00:00
mmu.h xen: make a pile of mmu pvop functions static 2011-05-20 14:25:24 -07:00
multicalls.c x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c Tighten rules for ACCESS_ONCE 2015-02-14 10:54:28 -08:00
p2m.h xen/setup: Remap Xen Identity Mapped RAM 2014-09-23 13:36:18 +00:00
pci-swiotlb-xen.c pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI 2013-11-08 15:21:44 -05:00
platform-pci-unplug.c xen/pvhvm: Remove the xen_platform_pci int. 2014-01-03 14:54:53 -05:00
setup.c x86/xen: add some __init and static annotations in arch/x86/xen/setup.c 2015-01-28 10:00:36 +00:00
smp.c x86,xen: use current->state helpers 2015-01-26 10:21:26 +00:00
smp.h x86/xen: Set EFER.NX and EFER.SCE in PVH guests 2014-10-06 10:27:47 +01:00
spinlock.c x86/spinlocks/paravirt: Fix memory corruption on unlock 2015-02-18 14:53:49 +01:00
suspend.c xen: refactor suspend pre/post hooks 2014-05-12 17:19:56 +01:00
time.c x86/xen: prefer TSC over xen clocksource for dom0 2015-01-20 18:44:24 +00:00
trace.c xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set 2011-08-05 09:43:02 -04:00
vdso.h
vga.c xen/vga: add the xen EFI video mode support 2012-09-24 09:28:57 -04:00
xen-asm.h
xen-asm.S xen: correctly check for pending events when restoring irq flags 2012-04-27 16:04:21 -04:00
xen-asm_32.S x86/xen: Fix 32-bit PV guests's usage of kernel_stack 2014-04-15 15:00:14 +01:00
xen-asm_64.S
xen-head.S x86/xen: Set EFER.NX and EFER.SCE in PVH guests 2014-10-06 10:27:47 +01:00
xen-ops.h x86/xen: cleanup arch/x86/xen/setup.c 2015-01-28 09:59:46 +00:00