aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-03-04 07:05:43 -0500
committerTony Luck <tony.luck@intel.com>2009-03-26 13:51:12 -0400
commitb937dd76d07f2347684d6cc1e1ec4e2746417357 (patch)
treebe711211f1b83d8cebff60b01bbbd1e80e609295 /arch/ia64
parente4ff5b8f545811008123dd9556a51d814f562fcf (diff)
ia64/pv_ops/xen: define xen specific gate page.
define xen specific gate page. At this phase bits in the gate page is same to native. At the next phase, it will be paravirtualized. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/xen/patchlist.h38
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S6
-rw-r--r--arch/ia64/xen/Makefile16
-rw-r--r--arch/ia64/xen/gate-data.S3
-rw-r--r--arch/ia64/xen/xen_pv_ops.c32
5 files changed, 94 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/xen/patchlist.h b/arch/ia64/include/asm/xen/patchlist.h
new file mode 100644
index 000000000000..eae944e88846
--- /dev/null
+++ b/arch/ia64/include/asm/xen/patchlist.h
@@ -0,0 +1,38 @@
1/******************************************************************************
2 * arch/ia64/include/asm/xen/patchlist.h
3 *
4 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#define __paravirt_start_gate_fsyscall_patchlist \
24 __xen_start_gate_fsyscall_patchlist
25#define __paravirt_end_gate_fsyscall_patchlist \
26 __xen_end_gate_fsyscall_patchlist
27#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist \
28 __xen_start_gate_brl_fsys_bubble_down_patchlist
29#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
30 __xen_end_gate_brl_fsys_bubble_down_patchlist
31#define __paravirt_start_gate_vtop_patchlist \
32 __xen_start_gate_vtop_patchlist
33#define __paravirt_end_gate_vtop_patchlist \
34 __xen_end_gate_vtop_patchlist
35#define __paravirt_start_gate_mckinley_e9_patchlist \
36 __xen_start_gate_mckinley_e9_patchlist
37#define __paravirt_end_gate_mckinley_e9_patchlist \
38 __xen_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 10a7d47e8510..92ae7e8f0142 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -201,6 +201,12 @@ SECTIONS
201 __start_gate_section = .; 201 __start_gate_section = .;
202 *(.data.gate) 202 *(.data.gate)
203 __stop_gate_section = .; 203 __stop_gate_section = .;
204#ifdef CONFIG_XEN
205 . = ALIGN(PAGE_SIZE);
206 __xen_start_gate_section = .;
207 *(.data.gate.xen)
208 __xen_stop_gate_section = .;
209#endif
204 } 210 }
205 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose 211 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose
206 * kernel data 212 * kernel data
diff --git a/arch/ia64/xen/Makefile b/arch/ia64/xen/Makefile
index b4ca2e6c0ead..94f0d8e7d9de 100644
--- a/arch/ia64/xen/Makefile
+++ b/arch/ia64/xen/Makefile
@@ -3,10 +3,24 @@
3# 3#
4 4
5obj-y := hypercall.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o \ 5obj-y := hypercall.o xenivt.o xensetup.o xen_pv_ops.o irq_xen.o \
6 hypervisor.o xencomm.o xcom_hcall.o grant-table.o time.o suspend.o 6 hypervisor.o xencomm.o xcom_hcall.o grant-table.o time.o suspend.o \
7 gate-data.o
7 8
8obj-$(CONFIG_IA64_GENERIC) += machvec.o 9obj-$(CONFIG_IA64_GENERIC) += machvec.o
9 10
11# The gate DSO image is built using a special linker script.
12include $(srctree)/arch/ia64/kernel/Makefile.gate
13
14# tell compiled for xen
15CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_XEN
16
17# use same file of native.
18$(obj)/gate.o: $(src)/../kernel/gate.S FORCE
19 $(call if_changed_dep,as_o_S)
20$(obj)/gate.lds: $(src)/../kernel/gate.lds.S FORCE
21 $(call if_changed_dep,cpp_lds_S)
22
23
10AFLAGS_xenivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN 24AFLAGS_xenivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN
11 25
12# xen multi compile 26# xen multi compile
diff --git a/arch/ia64/xen/gate-data.S b/arch/ia64/xen/gate-data.S
new file mode 100644
index 000000000000..7d4830afc91d
--- /dev/null
+++ b/arch/ia64/xen/gate-data.S
@@ -0,0 +1,3 @@
1 .section .data.gate.xen, "aw"
2
3 .incbin "arch/ia64/xen/gate.so"
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c
index d91336114344..bdf1acbce81c 100644
--- a/arch/ia64/xen/xen_pv_ops.c
+++ b/arch/ia64/xen/xen_pv_ops.c
@@ -179,6 +179,37 @@ struct pv_fsys_data xen_fsys_data __initdata = {
179}; 179};
180 180
181/*************************************************************************** 181/***************************************************************************
182 * pv_patchdata
183 * patchdata addresses
184 */
185
186#define DECLARE(name) \
187 extern unsigned long __xen_start_gate_##name##_patchlist[]; \
188 extern unsigned long __xen_end_gate_##name##_patchlist[]
189
190DECLARE(fsyscall);
191DECLARE(brl_fsys_bubble_down);
192DECLARE(vtop);
193DECLARE(mckinley_e9);
194
195extern unsigned long __xen_start_gate_section[];
196
197#define ASSIGN(name) \
198 .start_##name##_patchlist = \
199 (unsigned long)__xen_start_gate_##name##_patchlist, \
200 .end_##name##_patchlist = \
201 (unsigned long)__xen_end_gate_##name##_patchlist
202
203static struct pv_patchdata xen_patchdata __initdata = {
204 ASSIGN(fsyscall),
205 ASSIGN(brl_fsys_bubble_down),
206 ASSIGN(vtop),
207 ASSIGN(mckinley_e9),
208
209 .gate_section = (void*)__xen_start_gate_section,
210};
211
212/***************************************************************************
182 * pv_cpu_ops 213 * pv_cpu_ops
183 * intrinsics hooks. 214 * intrinsics hooks.
184 */ 215 */
@@ -447,6 +478,7 @@ xen_setup_pv_ops(void)
447 pv_info = xen_info; 478 pv_info = xen_info;
448 pv_init_ops = xen_init_ops; 479 pv_init_ops = xen_init_ops;
449 pv_fsys_data = xen_fsys_data; 480 pv_fsys_data = xen_fsys_data;
481 pv_patchdata = xen_patchdata;
450 pv_cpu_ops = xen_cpu_ops; 482 pv_cpu_ops = xen_cpu_ops;
451 pv_iosapic_ops = xen_iosapic_ops; 483 pv_iosapic_ops = xen_iosapic_ops;
452 pv_irq_ops = xen_irq_ops; 484 pv_irq_ops = xen_irq_ops;