lkml.org 
[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC PATCH 20/35] subarch stack pointer update
Register the new kernel ('ring 0') stack pointer with the hypervisor
during context switch.

Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
include/asm-i386/mach-default/mach_processor.h | 8 ++++++++
include/asm-i386/mach-xen/mach_processor.h | 9 +++++++++
include/asm-i386/processor.h | 3 +++
3 files changed, 20 insertions(+)

--- xen-subarch-2.6.orig/include/asm-i386/processor.h
+++ xen-subarch-2.6/include/asm-i386/processor.h
@@ -472,6 +472,8 @@ struct thread_struct {
.io_bitmap_ptr = NULL, \
}

+#include <mach_processor.h>
+
/*
* Note that the .io_bitmap member must be extra-big. This is because
* the CPU will access an additional byte beyond the end of the IO
@@ -494,6 +496,7 @@ static inline void load_esp0(struct tss_
tss->ss1 = thread->sysenter_cs;
wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
}
+ mach_load_esp0(tss, thread);
}

#define start_thread(regs, new_eip, new_esp) do { \
--- /dev/null
+++ xen-subarch-2.6/include/asm-i386/mach-xen/mach_processor.h
@@ -0,0 +1,9 @@
+#ifndef __ASM_MACH_PROCESSOR_H
+#define __ASM_MACH_PROCESSOR_H
+
+static inline void mach_load_esp0(struct tss_struct *tss, struct thread_struct *thread)
+{
+ HYPERVISOR_stack_switch(tss->ss0, tss->esp0);
+}
+
+#endif /* __ASM_MACH_PROCESSOR_H */
--- /dev/null
+++ xen-subarch-2.6/include/asm-i386/mach-default/mach_processor.h
@@ -0,0 +1,8 @@
+#ifndef __ASM_MACH_PROCESSOR_H
+#define __ASM_MACH_PROCESSOR_H
+
+static inline void mach_load_esp0(struct tss_struct *tss, struct thread_struct *thread)
+{
+}
+
+#endif /* __ASM_MACH_PROCESSOR_H */
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-22 07:48    [W:0.441 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site