/[pkg-src]/trunk/kernel26-xen/patches-2.6.25-r1/1083-2.6.25-xen-Handle-Xen-exception-stack-it-is-different-from-bar.patch |
Contents of /trunk/kernel26-xen/patches-2.6.25-r1/1083-2.6.25-xen-Handle-Xen-exception-stack-it-is-different-from-bar.patch
Parent Directory | Revision Log
Revision 606 -
(show annotations)
(download)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1511 byte(s)
Thu May 22 23:13:13 2008 UTC (15 years, 11 months ago) by niro
File size: 1511 byte(s)
-ver bump to 2.6.25-magellan-r1: - linux-2.6.25.4 - fbcondecor-0.9.4 - squashfs-3.3 - unionfs-2.3.3 - tuxonice-3.0-rc7 - linux-phc-0.3.0 - acpi-dstd-0.9a - reiser4 - xen-3.2.0 . ipw3945-1.2.2
1 | From ae6e8b1f9015e6c70f6945063bc4002926e81d4f Mon Sep 17 00:00:00 2001 |
2 | From: Eduardo Habkost <ehabkost@redhat.com> |
3 | Date: Mon, 24 Dec 2007 17:22:58 -0200 |
4 | Subject: [PATCH] Handle Xen exception stack (it is different from baremetal stack) (FIXME) |
5 | |
6 | Now Oopses make sense! :D |
7 | |
8 | FIXME: This needs to be handled differently at runtime, not compile time. |
9 | |
10 | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> |
11 | --- |
12 | arch/x86/kernel/entry_64.S | 18 ++++++++++++++++++ |
13 | 1 files changed, 18 insertions(+), 0 deletions(-) |
14 | |
15 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S |
16 | index 3fedbd6..d026834 100644 |
17 | --- a/arch/x86/kernel/entry_64.S |
18 | +++ b/arch/x86/kernel/entry_64.S |
19 | @@ -728,11 +728,28 @@ ENTRY(spurious_interrupt) |
20 | apicinterrupt SPURIOUS_APIC_VECTOR,smp_spurious_interrupt |
21 | END(spurious_interrupt) |
22 | |
23 | + |
24 | +/* Xen register handling */ |
25 | +#ifdef CONFIG_XEN |
26 | + /*FIXME: select this at runtime */ |
27 | + .macro xen_fix_stack |
28 | + movq (%rsp),%rcx |
29 | + CFI_RESTORE rcx |
30 | + movq 8(%rsp),%r11 |
31 | + CFI_RESTORE r11 |
32 | + addq $0x10,%rsp /* skip rcx and r11 */ |
33 | + CFI_ADJUST_CFA_OFFSET -0x10 |
34 | + .endm |
35 | +#else |
36 | + .macro xen_fix_stack |
37 | + .endm |
38 | +#endif |
39 | /* |
40 | * Exception entry points. |
41 | */ |
42 | .macro zeroentry sym |
43 | INTR_FRAME |
44 | + xen_fix_stack |
45 | pushq $0 /* push error code/oldrax */ |
46 | CFI_ADJUST_CFA_OFFSET 8 |
47 | pushq %rax /* push real oldrax to the rdi slot */ |
48 | @@ -745,6 +762,7 @@ END(spurious_interrupt) |
49 | |
50 | .macro errorentry sym |
51 | XCPT_FRAME |
52 | + xen_fix_stack |
53 | pushq %rax |
54 | CFI_ADJUST_CFA_OFFSET 8 |
55 | CFI_REL_OFFSET rax,0 |
56 | -- |
57 | 1.5.4.1 |
58 |