* Compatibility hypercall routines.
*/
+#include <xen/config.h>
+#include <xen/errno.h>
+#include <xen/softirq.h>
+#include <asm/asm_defns.h>
+#include <asm/apicdef.h>
+#include <asm/page.h>
#include <asm/desc.h>
+#include <public/xen.h>
-.text
+#define GET_GUEST_REGS(reg) \
+ movq $~(STACK_SIZE-1),reg; \
+ andq %rsp,reg; \
+ orq $(STACK_SIZE-CPUINFO_sizeof),reg;
+#define GET_CURRENT(reg) \
+ movq $STACK_SIZE-8, reg; \
+ orq %rsp, reg; \
+ andq $~7,reg; \
+ movq (reg),reg;
+
+ ALIGN
ENTRY(compat_hypercall)
pushq $0
movl $TRAP_syscall,4(%rsp)
movl %eax,UREGS_rax(%rsp) # save the return value
/* %rbx: struct vcpu */
-compat_test_all_events:
+ENTRY(compat_test_all_events)
cli # tests must not race interrupts
/*compat_test_softirqs:*/
movl VCPU_processor(%rbx),%eax
.previous
/* %rdx: trap_bounce, %rbx: struct vcpu */
-compat_post_handle_exception:
+ENTRY(compat_post_handle_exception)
testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
jz compat_test_all_events
call compat_create_bounce_frame
domain_crash_synchronous_string:
.asciz "domain_crash_sync called from entry.S\n"
-domain_crash_synchronous:
+ENTRY(domain_crash_synchronous)
# Get out of the guest-save area of the stack.
GET_GUEST_REGS(%rax)
movq %rax,%rsp
ALIGN
/* No special register assumptions. */
-handle_exception:
+ENTRY(handle_exception)
SAVE_ALL
testb $X86_EFLAGS_IF>>8,UREGS_eflags+1(%rsp)
jz exception_with_ints_disabled
.rept NR_hypercalls-(.-hypercall_args_table)
.byte 0 /* do_ni_hypercall */
.endr
-
-#ifdef CONFIG_COMPAT
-#include "compat/entry.S"
-#endif