android_kernel_xiaomi_sm8350/arch/x86/xen
Tejun Heo ccbeed3a05 x86: make lazy %gs optional on x86_32
Impact: pt_regs changed, lazy gs handling made optional, add slight
        overhead to SAVE_ALL, simplifies error_code path a bit

On x86_32, %gs hasn't been used by kernel and handled lazily.  pt_regs
doesn't have place for it and gs is saved/loaded only when necessary.
In preparation for stack protector support, this patch makes lazy %gs
handling optional by doing the followings.

* Add CONFIG_X86_32_LAZY_GS and place for gs in pt_regs.

* Save and restore %gs along with other registers in entry_32.S unless
  LAZY_GS.  Note that this unfortunately adds "pushl $0" on SAVE_ALL
  even when LAZY_GS.  However, it adds no overhead to common exit path
  and simplifies entry path with error code.

* Define different user_gs accessors depending on LAZY_GS and add
  lazy_save_gs() and lazy_load_gs() which are noop if !LAZY_GS.  The
  lazy_*_gs() ops are used to save, load and clear %gs lazily.

* Define ELF_CORE_COPY_KERNEL_REGS() which always read %gs directly.

xen and lguest changes need to be verified.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-10 00:42:00 +01:00
..
debugfs.c
debugfs.h
enlighten.c x86: make lazy %gs optional on x86_32 2009-02-10 00:42:00 +01:00
grant-table.c
irq.c x86/paravirt: add register-saving thunks to reduce caller register pressure 2009-01-30 14:51:45 -08:00
Kconfig
Makefile xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
mmu.c xen: fix 32-bit build resulting from mmu move 2009-02-04 16:44:31 -08:00
mmu.h xen: move remaining mmu-related stuff into mmu.c 2009-01-30 14:51:14 -08:00
multicalls.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
multicalls.h Merge commit 'v2.6.29-rc4' into core/percpu 2009-02-09 14:58:11 +01:00
setup.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
smp.c xen: setup percpu data pointers 2009-02-04 16:59:02 -08:00
spinlock.c
suspend.c x86, xen: fix hardirq.h merge fallout 2009-01-23 11:09:15 +01:00
time.c Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2009-01-03 11:56:24 -08:00
vdso.h
xen-asm_32.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-asm_64.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-asm.h xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
xen-asm.S x86: style cleanups for xen assemblies 2009-02-05 20:25:41 +01:00
xen-head.S
xen-ops.h xen: setup percpu data pointers 2009-02-04 16:59:02 -08:00