aboutsummaryrefslogtreecommitdiffstats
path: root/xen-2.4.16/include/asm-i386/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'xen-2.4.16/include/asm-i386/processor.h')
-rw-r--r--xen-2.4.16/include/asm-i386/processor.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen-2.4.16/include/asm-i386/processor.h b/xen-2.4.16/include/asm-i386/processor.h
index b3f496c5bc..f7f949d82b 100644
--- a/xen-2.4.16/include/asm-i386/processor.h
+++ b/xen-2.4.16/include/asm-i386/processor.h
@@ -10,6 +10,7 @@
#include <asm/page.h>
#include <asm/types.h>
#include <asm/cpufeature.h>
+#include <asm/desc.h>
#include <xeno/config.h>
#include <hypervisor-ifs/hypervisor-if.h>
@@ -352,15 +353,29 @@ struct thread_struct {
/* floating point info */
union i387_union i387;
/* Trap info. */
+ int fast_trap_idx;
+ struct desc_struct fast_trap_desc;
trap_info_t traps[256];
};
+#define SET_DEFAULT_FAST_TRAP(_p) \
+ (_p)->fast_trap_idx = 0x20; \
+ (_p)->fast_trap_desc.a = 0; \
+ (_p)->fast_trap_desc.b = 0;
+
+#define CLEAR_FAST_TRAP(_p) \
+ (memset(idt_table + (_p)->fast_trap_idx, 0, 8))
+
+#define SET_FAST_TRAP(_p) \
+ (memcpy(idt_table + (_p)->fast_trap_idx, &((_p)->fast_trap_desc), 8))
+
#define INIT_THREAD { \
sizeof(idle0_stack) + (long) &idle0_stack, /* esp0 */ \
0, 0, 0, 0, 0, 0, \
{ [0 ... 7] = 0 }, /* debugging registers */ \
0, 0, 0, \
{ { 0, }, }, /* 387 state */ \
+ 0x20, { 0, 0 }, /* DEFAULT_FAST_TRAP */ \
{ {0} } /* io permissions */ \
}