aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/extable.c
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-11-23 22:46:54 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-11-23 22:46:54 +0000
commit3a0b9c57d5c9e82c55dd967c84dd06cb43c49ee9 (patch)
treecf8cf77f7209358485ef309e4ec4a6f688ab685b /xen/arch/x86/extable.c
parent172b6660d82e8d178d5ba7f843fd90c62ed21b67 (diff)
downloadxen-3a0b9c57d5c9e82c55dd967c84dd06cb43c49ee9.tar.gz
xen-3a0b9c57d5c9e82c55dd967c84dd06cb43c49ee9.tar.bz2
xen-3a0b9c57d5c9e82c55dd967c84dd06cb43c49ee9.zip
bitkeeper revision 1.1159.187.3 (41a3bdde1DKDiUc_Vvg6h5QrnkHvJg)
Big rewrite of Xen->guest transition code. If we fault during the transition then we roll back and reenable interrupts before properly handling the fault. This means, for example, that shadow code always executes with interrupts enabled.
Diffstat (limited to 'xen/arch/x86/extable.c')
-rw-r--r--xen/arch/x86/extable.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c
index 6dc4a2e634..54251cc3c5 100644
--- a/xen/arch/x86/extable.c
+++ b/xen/arch/x86/extable.c
@@ -3,9 +3,6 @@
#include <xen/spinlock.h>
#include <asm/uaccess.h>
-extern const struct exception_table_entry __start___ex_table[];
-extern const struct exception_table_entry __stop___ex_table[];
-
static inline unsigned long
search_one_table(const struct exception_table_entry *first,
const struct exception_table_entry *last,
@@ -31,5 +28,21 @@ search_one_table(const struct exception_table_entry *first,
unsigned long
search_exception_table(unsigned long addr)
{
- return search_one_table(__start___ex_table, __stop___ex_table-1, addr);
+ extern const struct exception_table_entry __start___ex_table[];
+ extern const struct exception_table_entry __stop___ex_table[];
+ return search_one_table(
+ __start___ex_table, __stop___ex_table-1, addr);
+}
+
+#ifdef __i386__
+unsigned long
+search_pre_exception_table(unsigned long addr)
+{
+ extern const struct exception_table_entry __start___pre_ex_table[];
+ extern const struct exception_table_entry __stop___pre_ex_table[];
+ unsigned long fixup = search_one_table(
+ __start___pre_ex_table, __stop___pre_ex_table-1, addr);
+ DPRINTK("Pre-exception: %08lx -> %08lx\n", addr, fixup);
+ return fixup;
}
+#endif