aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-05-27 18:08:01 -0400
committerTony Luck <tony.luck@intel.com>2008-05-27 18:08:01 -0400
commit4df8d22bbbb16ccfa4e10cc068135183c9e5e006 (patch)
tree6c989c6c493b9487311831218810e5e84886190d /include/asm-ia64
parent498c5170472ff0c03a29d22dbd33225a0be038f4 (diff)
[IA64] pvops: paravirtualize entry.S
paravirtualize ia64_swtich_to, ia64_leave_syscall and ia64_leave_kernel. They include sensitive or performance critical privileged instructions so that they need paravirtualization. To paravirtualize them by single source and multi compile they are converted into indirect jump. And define each pv instances. Cc: Keith Owens <kaos@ocs.com.au> Cc: "Dong, Eddie" <eddie.dong@intel.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/native/inst.h8
-rw-r--r--include/asm-ia64/paravirt_privop.h23
2 files changed, 31 insertions, 0 deletions
diff --git a/include/asm-ia64/native/inst.h b/include/asm-ia64/native/inst.h
index f1072ace0cfa..c953a2ca4fce 100644
--- a/include/asm-ia64/native/inst.h
+++ b/include/asm-ia64/native/inst.h
@@ -22,6 +22,14 @@
22 22
23#define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN 23#define DO_SAVE_MIN IA64_NATIVE_DO_SAVE_MIN
24 24
25#define __paravirt_switch_to ia64_native_switch_to
26#define __paravirt_leave_syscall ia64_native_leave_syscall
27#define __paravirt_work_processed_syscall ia64_native_work_processed_syscall
28#define __paravirt_leave_kernel ia64_native_leave_kernel
29#define __paravirt_pending_syscall_end ia64_work_pending_syscall_end
30#define __paravirt_work_processed_syscall_target \
31 ia64_work_processed_syscall
32
25#ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK 33#ifdef CONFIG_PARAVIRT_GUEST_ASM_CLOBBER_CHECK
26# define PARAVIRT_POISON 0xdeadbeefbaadf00d 34# define PARAVIRT_POISON 0xdeadbeefbaadf00d
27# define CLOBBER(clob) \ 35# define CLOBBER(clob) \
diff --git a/include/asm-ia64/paravirt_privop.h b/include/asm-ia64/paravirt_privop.h
index 7b133ae86df0..52482e6940ac 100644
--- a/include/asm-ia64/paravirt_privop.h
+++ b/include/asm-ia64/paravirt_privop.h
@@ -80,12 +80,35 @@ extern unsigned long ia64_native_getreg_func(int regnum);
80 ia64_native_rsm(mask); \ 80 ia64_native_rsm(mask); \
81 } while (0) 81 } while (0)
82 82
83/******************************************************************************
84 * replacement of hand written assembly codes.
85 */
86struct pv_cpu_asm_switch {
87 unsigned long switch_to;
88 unsigned long leave_syscall;
89 unsigned long work_processed_syscall;
90 unsigned long leave_kernel;
91};
92void paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch);
93
83#endif /* __ASSEMBLY__ */ 94#endif /* __ASSEMBLY__ */
84 95
96#define IA64_PARAVIRT_ASM_FUNC(name) paravirt_ ## name
97
85#else 98#else
86 99
87/* fallback for native case */ 100/* fallback for native case */
101#define IA64_PARAVIRT_ASM_FUNC(name) ia64_native_ ## name
88 102
89#endif /* CONFIG_PARAVIRT */ 103#endif /* CONFIG_PARAVIRT */
90 104
105/* these routines utilize privilege-sensitive or performance-sensitive
106 * privileged instructions so the code must be replaced with
107 * paravirtualized versions */
108#define ia64_switch_to IA64_PARAVIRT_ASM_FUNC(switch_to)
109#define ia64_leave_syscall IA64_PARAVIRT_ASM_FUNC(leave_syscall)
110#define ia64_work_processed_syscall \
111 IA64_PARAVIRT_ASM_FUNC(work_processed_syscall)
112#define ia64_leave_kernel IA64_PARAVIRT_ASM_FUNC(leave_kernel)
113
91#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */ 114#endif /* _ASM_IA64_PARAVIRT_PRIVOP_H */