X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fxen%2Finterface%2Farch-x86_64.h;fp=include%2Fxen%2Finterface%2Farch-x86_64.h;h=2891cfa29e7c2e694689eca509289057cb66a614;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=a92387f12544d7bd4f091c82b5f5cdfa1da59075;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/include/xen/interface/arch-x86_64.h b/include/xen/interface/arch-x86_64.h index a92387f12..2891cfa29 100644 --- a/include/xen/interface/arch-x86_64.h +++ b/include/xen/interface/arch-x86_64.h @@ -9,8 +9,33 @@ #ifndef __XEN_PUBLIC_ARCH_X86_64_H__ #define __XEN_PUBLIC_ARCH_X86_64_H__ +/* + * Hypercall interface: + * Input: %rdi, %rsi, %rdx, %r10, %r8 (arguments 1-5) + * Output: %rax + * Access is via hypercall page (set up by guest loader or via a Xen MSR): + * call hypercall_page + hypercall-number * 32 + * Clobbered: argument registers (e.g., 2-arg hypercall clobbers %rdi,%rsi) + */ + +#if __XEN_INTERFACE_VERSION__ < 0x00030203 +/* + * Legacy hypercall interface: + * As above, except the entry sequence to the hypervisor is: + * mov $hypercall-number*32,%eax ; syscall + * Clobbered: %rcx, %r11, argument registers (as above) + */ +#define TRAP_INSTR "syscall" +#endif + +/* Structural guest handles introduced in 0x00030201. */ +#if __XEN_INTERFACE_VERSION__ >= 0x00030201 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \ typedef struct { type *p; } __guest_handle_ ## name +#else +#define __DEFINE_XEN_GUEST_HANDLE(name, type) \ + typedef type * __guest_handle_ ## name +#endif #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name @@ -80,9 +105,6 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); #define FLAT_USER_SS32 FLAT_RING3_SS32 #define FLAT_USER_SS FLAT_USER_SS64 -/* And the trap vector is... */ -#define TRAP_INSTR "syscall" - #define __HYPERVISOR_VIRT_START 0xFFFF800000000000 #define __HYPERVISOR_VIRT_END 0xFFFF880000000000 #define __MACH2PHYS_VIRT_START 0xFFFF800000000000