Jan Beulich
2012-Nov-23 14:18 UTC
[PATCH] linux-2.6.18/x86: adjust unwind info for special HYPERVISOR_iret stack layout
Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/arch/i386/kernel/head-xen.S +++ b/arch/i386/kernel/head-xen.S @@ -70,7 +70,13 @@ ENTRY(startup_32) .org HYPERCALL_PAGE_OFFSET ENTRY(hypercall_page) CFI_STARTPROC -.skip 0x1000 + .skip __HYPERVISOR_iret * 32 + CFI_REMEMBER_STATE + .skip 1 /* push %eax */ + CFI_ADJUST_CFA_OFFSET 8 + CFI_REL_OFFSET eax,0 + CFI_RESTORE_STATE + .balign 0x1000,0 CFI_ENDPROC /* --- a/arch/x86_64/kernel/head-xen.S +++ b/arch/x86_64/kernel/head-xen.S @@ -23,6 +23,7 @@ #include <asm/msr.h> #include <asm/cache.h> #include <asm/dwarf2.h> +#include <xen/interface/xen.h> #include <xen/interface/elfnote.h> #include <xen/interface/features.h> @@ -80,6 +81,7 @@ NEXT_PAGE(level1_fixmap_pgt) NEXT_PAGE(hypercall_page) CFI_STARTPROC + i = 0 .rept 0x1000 / 0x20 .skip 1 /* push %rcx */ CFI_ADJUST_CFA_OFFSET 8 @@ -87,15 +89,25 @@ NEXT_PAGE(hypercall_page) .skip 2 /* push %r11 */ CFI_ADJUST_CFA_OFFSET 8 CFI_REL_OFFSET r11,0 + .if i == __HYPERVISOR_iret + .skip 1 /* push %rax */ + CFI_ADJUST_CFA_OFFSET 8 + CFI_REL_OFFSET rax,0 + .endif .skip 5 /* mov $#,%eax */ .skip 2 /* syscall */ + .if i == __HYPERVISOR_iret + CFI_ADJUST_CFA_OFFSET -3*8 + .else .skip 2 /* pop %r11 */ CFI_ADJUST_CFA_OFFSET -8 CFI_RESTORE r11 .skip 1 /* pop %rcx */ CFI_ADJUST_CFA_OFFSET -8 CFI_RESTORE rcx - .align 0x20,0 /* ret */ + .endif + .balign 0x20,0 /* ret */ + i = i + 1 .endr CFI_ENDPROC _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel