Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Isaku Yamahata and committed by
Tony Luck
b937dd76 e4ff5b8f

+94 -1
+38
arch/ia64/include/asm/xen/patchlist.h
··· 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
+6
arch/ia64/kernel/vmlinux.lds.S
··· 201 201 __start_gate_section = .; 202 202 *(.data.gate) 203 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 211 . = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose 206 212 * kernel data
+15 -1
arch/ia64/xen/Makefile
··· 3 3 # 4 4 5 5 obj-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 8 9 obj-$(CONFIG_IA64_GENERIC) += machvec.o 10 + 11 + # The gate DSO image is built using a special linker script. 12 + include $(srctree)/arch/ia64/kernel/Makefile.gate 13 + 14 + # tell compiled for xen 15 + CPPFLAGS_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 + 9 23 10 24 AFLAGS_xenivt.o += -D__IA64_ASM_PARAVIRTUALIZED_XEN 11 25
+3
arch/ia64/xen/gate-data.S
··· 1 + .section .data.gate.xen, "aw" 2 + 3 + .incbin "arch/ia64/xen/gate.so"
+32
arch/ia64/xen/xen_pv_ops.c
··· 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 + 190 + DECLARE(fsyscall); 191 + DECLARE(brl_fsys_bubble_down); 192 + DECLARE(vtop); 193 + DECLARE(mckinley_e9); 194 + 195 + extern 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 + 203 + static 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 213 * pv_cpu_ops 183 214 * intrinsics hooks. 184 215 */ ··· 478 447 pv_info = xen_info; 479 448 pv_init_ops = xen_init_ops; 480 449 pv_fsys_data = xen_fsys_data; 450 + pv_patchdata = xen_patchdata; 481 451 pv_cpu_ops = xen_cpu_ops; 482 452 pv_iosapic_ops = xen_iosapic_ops; 483 453 pv_irq_ops = xen_irq_ops;