From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 25 Jan 2006 10:08:33 +0000 (+0100) Subject: Fix 64-bit build and fix the transfer-page code for the X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16535 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b1f769322ecc9bb5a583a8bb55104001b47fda90;p=xen.git Fix 64-bit build and fix the transfer-page code for the iret hypercall. Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h index b81ea36cb4..96e12d1b22 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h @@ -43,6 +43,7 @@ asm volatile ( \ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\ : "=a" (__res) \ + : \ : "memory" ); \ (type)__res; \ }) diff --git a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h index 840cdb8f7a..cd255f646a 100644 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h @@ -46,6 +46,7 @@ asm volatile ( \ "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\ : "=a" (__res) \ + : \ : "memory" ); \ (type)__res; \ }) @@ -286,12 +287,6 @@ HYPERVISOR_vcpu_op( return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args); } -static inline int -HYPERVISOR_iret(void) -{ - return _hypercall0(int, iret); -} - static inline int HYPERVISOR_set_segment_base( int reg, unsigned long value) diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index ebf364cf8c..0822e1624e 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -293,9 +293,9 @@ void hypercall_page_initialise(void *hypercall_page) * calling it. */ p = (char *)(hypercall_page + (__HYPERVISOR_iret * 32)); - *(u8 *)(p+ 0) = 0x50; /* push %rax */ - *(u8 *)(p+ 1) = 0x51; /* push %rcx */ - *(u16 *)(p+ 2) = 0x5341; /* push %r11 */ + *(u8 *)(p+ 0) = 0x51; /* push %rcx */ + *(u16 *)(p+ 1) = 0x5341; /* push %r11 */ + *(u8 *)(p+ 3) = 0x50; /* push %rax */ *(u8 *)(p+ 4) = 0xb8; /* mov $__HYPERVISOR_iret,%eax */ *(u32 *)(p+ 5) = __HYPERVISOR_iret; *(u16 *)(p+ 9) = 0x050f; /* syscall */