Commit 997409d3 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

xen64: deal with extra words Xen pushes onto exception frames

Xen pushes two extra words containing the values of rcx and r11.  This
pvop hook copies the words back into their appropriate registers, and
cleans them off the stack.  This leaves the stack in native form, so
the normal handler can run unchanged.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent e176d367
...@@ -1091,7 +1091,7 @@ static const struct pv_irq_ops xen_irq_ops __initdata = { ...@@ -1091,7 +1091,7 @@ static const struct pv_irq_ops xen_irq_ops __initdata = {
.safe_halt = xen_safe_halt, .safe_halt = xen_safe_halt,
.halt = xen_halt, .halt = xen_halt,
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
.adjust_exception_frame = paravirt_nop, .adjust_exception_frame = xen_adjust_exception_frame,
#endif #endif
}; };
......
...@@ -133,6 +133,11 @@ check_events: ...@@ -133,6 +133,11 @@ check_events:
ret ret
#endif #endif
ENTRY(xen_adjust_exception_frame)
mov 8+0(%rsp),%rcx
mov 8+8(%rsp),%r11
ret $16
ENTRY(xen_iret) ENTRY(xen_iret)
pushq $0 pushq $0
jmp hypercall_page + __HYPERVISOR_iret * 32 jmp hypercall_page + __HYPERVISOR_iret * 32
......
...@@ -67,7 +67,9 @@ DECL_ASM(void, xen_irq_disable_direct, void); ...@@ -67,7 +67,9 @@ DECL_ASM(void, xen_irq_disable_direct, void);
DECL_ASM(unsigned long, xen_save_fl_direct, void); DECL_ASM(unsigned long, xen_save_fl_direct, void);
DECL_ASM(void, xen_restore_fl_direct, unsigned long); DECL_ASM(void, xen_restore_fl_direct, unsigned long);
/* These are not functions, and cannot be called normally */
void xen_iret(void); void xen_iret(void);
void xen_sysexit(void); void xen_sysexit(void);
void xen_adjust_exception_frame(void);
#endif /* XEN_OPS_H */ #endif /* XEN_OPS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment