summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-08 15:07:01 -0700
committerIngo Molnar <mingo@elte.hu>2008-07-16 11:02:46 +0200
commit952d1d7055c8cbf95b4ad2f90be5ed37db8a48ee (patch)
tree8f3f3951c85aa3ecf8d450587990a4bbe348f7bf /arch
parent997409d3d0bd6894f33e31ced251c0fdf523aa14 (diff)
downloadlinux-3.10-952d1d7055c8cbf95b4ad2f90be5ed37db8a48ee.tar.gz
linux-3.10-952d1d7055c8cbf95b4ad2f90be5ed37db8a48ee.tar.bz2
linux-3.10-952d1d7055c8cbf95b4ad2f90be5ed37db8a48ee.zip
xen64: add pvop for swapgs
swapgs is a no-op under Xen, because the hypervisor makes sure the right version of %gs is current when switching between user and kernel modes. This means that the swapgs "implementation" can be inlined and used when the stack is unsafe (usermode). Unfortunately, it means that disabling patching will result in a non-booting kernel... Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/enlighten.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 9d94483b3b5..8b60982e457 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1076,6 +1076,9 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
.set_iopl_mask = xen_set_iopl_mask,
.io_delay = xen_io_delay,
+ /* Xen takes care of %gs when switching to usermode for us */
+ .swapgs = paravirt_nop,
+
.lazy_mode = {
.enter = paravirt_enter_lazy_cpu,
.leave = xen_leave_lazy,