Fix 64-bit build and fix the transfer-page code for the
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 25 Jan 2006 10:08:33 +0000 (11:08 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 25 Jan 2006 10:08:33 +0000 (11:08 +0100)
iret hypercall.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h
xen/arch/x86/x86_64/traps.c

index b81ea36cb401a3f1276e73b472b1f61cf4197762..96e12d1b2297f9f61d23f074a97f4e3ca8605471 100644 (file)
@@ -43,6 +43,7 @@
        asm volatile (                          \
                "call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
                : "=a" (__res)                  \
+               :                               \
                : "memory" );                   \
        (type)__res;                            \
 })
index 840cdb8f7a4c200d35402bc19524f5629d8ea42c..cd255f646a8cb21e5842589dc85135a338a7ae96 100644 (file)
@@ -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)
index ebf364cf8c741e7f1c1cf782562771feca90a538..0822e1624e10e78ae8d5b665e909dfdea5e68193 100644 (file)
@@ -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 */