[Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: gate page paravirtualization.

2009-03-04 Thread Isaku Yamahata
paravirtualize gate page by allowing each pv_ops instances
to define its own gate page.

Signed-off-by: Isaku Yamahata 
---
 arch/ia64/include/asm/native/patchlist.h |   38 ++
 arch/ia64/include/asm/paravirt.h |   35 +
 arch/ia64/kernel/Makefile|   32 ++--
 arch/ia64/kernel/Makefile.gate   |   27 ++
 arch/ia64/kernel/gate.lds.S  |   17 +++---
 arch/ia64/kernel/paravirt_patchlist.c|   79 ++
 arch/ia64/kernel/paravirt_patchlist.h|   28 +++
 arch/ia64/kernel/patch.c |   12 ++--
 arch/ia64/mm/init.c  |6 ++-
 9 files changed, 231 insertions(+), 43 deletions(-)
 create mode 100644 arch/ia64/include/asm/native/patchlist.h
 create mode 100644 arch/ia64/kernel/Makefile.gate
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.c
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.h

diff --git a/arch/ia64/include/asm/native/patchlist.h 
b/arch/ia64/include/asm/native/patchlist.h
new file mode 100644
index 000..be16ca9
--- /dev/null
+++ b/arch/ia64/include/asm/native/patchlist.h
@@ -0,0 +1,38 @@
+/**
+ * arch/ia64/include/asm/native/inst.h
+ *
+ * Copyright (c) 2008 Isaku Yamahata 
+ *VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#define __paravirt_start_gate_fsyscall_patchlist   \
+   __ia64_native_start_gate_fsyscall_patchlist
+#define __paravirt_end_gate_fsyscall_patchlist \
+   __ia64_native_end_gate_fsyscall_patchlist
+#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist   \
+   __ia64_native_start_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
+   __ia64_native_end_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_start_gate_vtop_patchlist   \
+   __ia64_native_start_gate_vtop_patchlist
+#define __paravirt_end_gate_vtop_patchlist \
+   __ia64_native_end_gate_vtop_patchlist
+#define __paravirt_start_gate_mckinley_e9_patchlist\
+   __ia64_native_start_gate_mckinley_e9_patchlist
+#define __paravirt_end_gate_mckinley_e9_patchlist  \
+   __ia64_native_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index a73e77a..fc433f6 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -35,6 +35,41 @@ extern struct pv_fsys_data pv_fsys_data;
 
 unsigned long *paravirt_get_fsyscall_table(void);
 char *paravirt_get_fsys_bubble_down(void);
+
+/**
+ * patchlist addresses for gate page
+ */
+enum pv_gate_patchlist {
+   PV_GATE_START_FSYSCALL,
+   PV_GATE_END_FSYSCALL,
+
+   PV_GATE_START_BRL_FSYS_BUBBLE_DOWN,
+   PV_GATE_END_BRL_FSYS_BUBBLE_DOWN,
+
+   PV_GATE_START_VTOP,
+   PV_GATE_END_VTOP,
+
+   PV_GATE_START_MCKINLEY_E9,
+   PV_GATE_END_MCKINLEY_E9,
+};
+
+struct pv_patchdata {
+   unsigned long start_fsyscall_patchlist;
+   unsigned long end_fsyscall_patchlist;
+   unsigned long start_brl_fsys_bubble_down_patchlist;
+   unsigned long end_brl_fsys_bubble_down_patchlist;
+   unsigned long start_vtop_patchlist;
+   unsigned long end_vtop_patchlist;
+   unsigned long start_mckinley_e9_patchlist;
+   unsigned long end_mckinley_e9_patchlist;
+
+   void *gate_section;
+};
+
+extern struct pv_patchdata pv_patchdata;
+
+unsigned long paravirt_get_gate_patchlist(enum pv_gate_patchlist type);
+void *paravirt_get_gate_section(void);
 #endif
 
 #ifdef CONFIG_PARAVIRT_GUEST
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 1ab150e..8dc9df8 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -5,7 +5,7 @@
 extra-y:= head.o init_task.o vmlinux.lds
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o 
irq_ia64.o  \
-irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o 
ptrace.o sal.o  \
+irq_lsapic.o ivt.o machvec.o pal.o p

[Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: gate page paravirtualization.

2008-12-21 Thread Isaku Yamahata
paravirtualize gate page by allowing each pv_ops instances
to define its own gate page.

Signed-off-by: Isaku Yamahata 
---
 arch/ia64/include/asm/native/patchlist.h |   38 ++
 arch/ia64/include/asm/paravirt.h |   35 +
 arch/ia64/kernel/Makefile|   32 ++--
 arch/ia64/kernel/Makefile.gate   |   27 ++
 arch/ia64/kernel/gate.lds.S  |   17 +++---
 arch/ia64/kernel/paravirt_patchlist.c|   79 ++
 arch/ia64/kernel/paravirt_patchlist.h|   28 +++
 arch/ia64/kernel/patch.c |   12 ++--
 arch/ia64/mm/init.c  |6 ++-
 9 files changed, 231 insertions(+), 43 deletions(-)
 create mode 100644 arch/ia64/include/asm/native/patchlist.h
 create mode 100644 arch/ia64/kernel/Makefile.gate
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.c
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.h

diff --git a/arch/ia64/include/asm/native/patchlist.h 
b/arch/ia64/include/asm/native/patchlist.h
new file mode 100644
index 000..be16ca9
--- /dev/null
+++ b/arch/ia64/include/asm/native/patchlist.h
@@ -0,0 +1,38 @@
+/**
+ * arch/ia64/include/asm/native/inst.h
+ *
+ * Copyright (c) 2008 Isaku Yamahata 
+ *VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#define __paravirt_start_gate_fsyscall_patchlist   \
+   __ia64_native_start_gate_fsyscall_patchlist
+#define __paravirt_end_gate_fsyscall_patchlist \
+   __ia64_native_end_gate_fsyscall_patchlist
+#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist   \
+   __ia64_native_start_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
+   __ia64_native_end_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_start_gate_vtop_patchlist   \
+   __ia64_native_start_gate_vtop_patchlist
+#define __paravirt_end_gate_vtop_patchlist \
+   __ia64_native_end_gate_vtop_patchlist
+#define __paravirt_start_gate_mckinley_e9_patchlist\
+   __ia64_native_start_gate_mckinley_e9_patchlist
+#define __paravirt_end_gate_mckinley_e9_patchlist  \
+   __ia64_native_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index a73e77a..fc433f6 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -35,6 +35,41 @@ extern struct pv_fsys_data pv_fsys_data;
 
 unsigned long *paravirt_get_fsyscall_table(void);
 char *paravirt_get_fsys_bubble_down(void);
+
+/**
+ * patchlist addresses for gate page
+ */
+enum pv_gate_patchlist {
+   PV_GATE_START_FSYSCALL,
+   PV_GATE_END_FSYSCALL,
+
+   PV_GATE_START_BRL_FSYS_BUBBLE_DOWN,
+   PV_GATE_END_BRL_FSYS_BUBBLE_DOWN,
+
+   PV_GATE_START_VTOP,
+   PV_GATE_END_VTOP,
+
+   PV_GATE_START_MCKINLEY_E9,
+   PV_GATE_END_MCKINLEY_E9,
+};
+
+struct pv_patchdata {
+   unsigned long start_fsyscall_patchlist;
+   unsigned long end_fsyscall_patchlist;
+   unsigned long start_brl_fsys_bubble_down_patchlist;
+   unsigned long end_brl_fsys_bubble_down_patchlist;
+   unsigned long start_vtop_patchlist;
+   unsigned long end_vtop_patchlist;
+   unsigned long start_mckinley_e9_patchlist;
+   unsigned long end_mckinley_e9_patchlist;
+
+   void *gate_section;
+};
+
+extern struct pv_patchdata pv_patchdata;
+
+unsigned long paravirt_get_gate_patchlist(enum pv_gate_patchlist type);
+void *paravirt_get_gate_section(void);
 #endif
 
 #ifdef CONFIG_PARAVIRT_GUEST
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 1ab150e..8dc9df8 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -5,7 +5,7 @@
 extra-y:= head.o init_task.o vmlinux.lds
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o 
irq_ia64.o  \
-irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o 
ptrace.o sal.o  \
+irq_lsapic.o ivt.o machvec.o pal.o p

[Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: gate page paravirtualization.

2008-12-11 Thread Isaku Yamahata
paravirtualize gate page by allowing each pv_ops instances
to define its own gate page.

Signed-off-by: Isaku Yamahata 
---
 arch/ia64/include/asm/native/patchlist.h |   38 ++
 arch/ia64/include/asm/paravirt.h |   35 +
 arch/ia64/kernel/Makefile|   32 ++--
 arch/ia64/kernel/Makefile.gate   |   27 ++
 arch/ia64/kernel/gate.lds.S  |   17 ---
 arch/ia64/kernel/paravirt_patchlist.c|   78 ++
 arch/ia64/kernel/paravirt_patchlist.h|   28 +++
 arch/ia64/kernel/patch.c |   12 ++--
 arch/ia64/mm/init.c  |6 ++-
 9 files changed, 230 insertions(+), 43 deletions(-)
 create mode 100644 arch/ia64/include/asm/native/patchlist.h
 create mode 100644 arch/ia64/kernel/Makefile.gate
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.c
 create mode 100644 arch/ia64/kernel/paravirt_patchlist.h

diff --git a/arch/ia64/include/asm/native/patchlist.h 
b/arch/ia64/include/asm/native/patchlist.h
new file mode 100644
index 000..be16ca9
--- /dev/null
+++ b/arch/ia64/include/asm/native/patchlist.h
@@ -0,0 +1,38 @@
+/**
+ * arch/ia64/include/asm/native/inst.h
+ *
+ * Copyright (c) 2008 Isaku Yamahata 
+ *VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#define __paravirt_start_gate_fsyscall_patchlist   \
+   __ia64_native_start_gate_fsyscall_patchlist
+#define __paravirt_end_gate_fsyscall_patchlist \
+   __ia64_native_end_gate_fsyscall_patchlist
+#define __paravirt_start_gate_brl_fsys_bubble_down_patchlist   \
+   __ia64_native_start_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_end_gate_brl_fsys_bubble_down_patchlist \
+   __ia64_native_end_gate_brl_fsys_bubble_down_patchlist
+#define __paravirt_start_gate_vtop_patchlist   \
+   __ia64_native_start_gate_vtop_patchlist
+#define __paravirt_end_gate_vtop_patchlist \
+   __ia64_native_end_gate_vtop_patchlist
+#define __paravirt_start_gate_mckinley_e9_patchlist\
+   __ia64_native_start_gate_mckinley_e9_patchlist
+#define __paravirt_end_gate_mckinley_e9_patchlist  \
+   __ia64_native_end_gate_mckinley_e9_patchlist
diff --git a/arch/ia64/include/asm/paravirt.h b/arch/ia64/include/asm/paravirt.h
index a73e77a..fc433f6 100644
--- a/arch/ia64/include/asm/paravirt.h
+++ b/arch/ia64/include/asm/paravirt.h
@@ -35,6 +35,41 @@ extern struct pv_fsys_data pv_fsys_data;
 
 unsigned long *paravirt_get_fsyscall_table(void);
 char *paravirt_get_fsys_bubble_down(void);
+
+/**
+ * patchlist addresses for gate page
+ */
+enum pv_gate_patchlist {
+   PV_GATE_START_FSYSCALL,
+   PV_GATE_END_FSYSCALL,
+
+   PV_GATE_START_BRL_FSYS_BUBBLE_DOWN,
+   PV_GATE_END_BRL_FSYS_BUBBLE_DOWN,
+
+   PV_GATE_START_VTOP,
+   PV_GATE_END_VTOP,
+
+   PV_GATE_START_MCKINLEY_E9,
+   PV_GATE_END_MCKINLEY_E9,
+};
+
+struct pv_patchdata {
+   unsigned long start_fsyscall_patchlist;
+   unsigned long end_fsyscall_patchlist;
+   unsigned long start_brl_fsys_bubble_down_patchlist;
+   unsigned long end_brl_fsys_bubble_down_patchlist;
+   unsigned long start_vtop_patchlist;
+   unsigned long end_vtop_patchlist;
+   unsigned long start_mckinley_e9_patchlist;
+   unsigned long end_mckinley_e9_patchlist;
+
+   void *gate_section;
+};
+
+extern struct pv_patchdata pv_patchdata;
+
+unsigned long paravirt_get_gate_patchlist(enum pv_gate_patchlist type);
+void *paravirt_get_gate_section(void);
 #endif
 
 #ifdef CONFIG_PARAVIRT_GUEST
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 1ab150e..8dc9df8 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -5,7 +5,7 @@
 extra-y:= head.o init_task.o vmlinux.lds
 
 obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o 
irq_ia64.o  \
-irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o 
ptrace.o sal.o  \
+irq_lsapic.o ivt.o machvec.o pal.o