x86: Use faster accessors for MSR_KERNEL_GS_BASE
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 8 Nov 2016 22:17:25 +0000 (17:17 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 7 Dec 2016 22:46:48 +0000 (14:46 -0800)
commite8c055ecf48a0fd5da090ae0e8ed12fb864e7019
treea257cd476bac780cd28c9a0beb53768af14c1a0f
parent01c4c94ff0e45056e3b217e5138aa552e23920ae
x86: Use faster accessors for MSR_KERNEL_GS_BASE

Accessing kern_gsbase is usually a read_msr or write_msr.  write_msr is
especially expensive.  However, on hardware that has access to the
instructions that access FS/GS base directly, we can use swap_gs and
gs_base accessors to work with kern_gs_base.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/fsgsbase.h
kern/arch/x86/trap.c