asm volatile ( \
"call hypercall_page + ("STR(__HYPERVISOR_##name)" * 32)"\
: "=a" (__res) \
+ : \
: "memory" ); \
(type)__res; \
})
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)
* 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 */