Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145852
b: refs/heads/master
c: 6cac5a9
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge committed May 8, 2009
1 parent c3348e0 commit c8da5d6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b2e8523df148c15ea5abf13075026fb8bdb3f86
refs/heads/master: 6cac5a924668a56c7ccefc345805f1fe0536a90e
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/traps.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ asmlinkage void divide_error(void);
asmlinkage void debug(void);
asmlinkage void nmi(void);
asmlinkage void int3(void);
asmlinkage void xen_debug(void);
asmlinkage void xen_int3(void);
asmlinkage void xen_stack_segment(void);
asmlinkage void overflow(void);
asmlinkage void bounds(void);
asmlinkage void invalid_op(void);
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -1379,6 +1379,11 @@ END(xen_failsafe_callback)
paranoidzeroentry_ist debug do_debug DEBUG_STACK
paranoidzeroentry_ist int3 do_int3 DEBUG_STACK
paranoiderrorentry stack_segment do_stack_segment
#ifdef CONFIG_XEN
zeroentry xen_debug do_debug
zeroentry xen_int3 do_int3
errorentry xen_stack_segment do_stack_segment
#endif
errorentry general_protection do_general_protection
errorentry page_fault do_page_fault
#ifdef CONFIG_X86_MCE
Expand Down
19 changes: 18 additions & 1 deletion trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/start_kernel.h>
#include <linux/sched.h>
#include <linux/kprobes.h>
#include <linux/bootmem.h>
#include <linux/module.h>
#include <linux/mm.h>
Expand All @@ -44,6 +45,7 @@
#include <asm/processor.h>
#include <asm/proto.h>
#include <asm/msr-index.h>
#include <asm/traps.h>
#include <asm/setup.h>
#include <asm/desc.h>
#include <asm/pgtable.h>
Expand Down Expand Up @@ -428,11 +430,26 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
static int cvt_gate_to_trap(int vector, const gate_desc *val,
struct trap_info *info)
{
unsigned long addr;

if (val->type != GATE_TRAP && val->type != GATE_INTERRUPT)
return 0;

info->vector = vector;
info->address = gate_offset(*val);

addr = gate_offset(*val);
#ifdef CONFIG_X86_64
if (addr == (unsigned long)debug)
addr = (unsigned long)xen_debug;
else if (addr == (unsigned long)int3)
addr = (unsigned long)xen_int3;
else if (addr == (unsigned long)stack_segment)
addr = (unsigned long)xen_stack_segment;
else
WARN_ON(val->ist != 0);
#endif /* CONFIG_X86_64 */
info->address = addr;

info->cs = gate_segment(*val);
info->flags = val->dpl;
/* interrupt gates clear IF */
Expand Down

0 comments on commit c8da5d6

Please sign in to comment.