Go to the documentation of this file. 1 #ifndef _ASM_X86_XEN_INTERFACE_64_H
2 #define _ASM_X86_XEN_INTERFACE_64_H
11 #define FLAT_RING3_CS32 0xe023
12 #define FLAT_RING3_CS64 0xe033
13 #define FLAT_RING3_DS32 0xe02b
14 #define FLAT_RING3_DS64 0x0000
15 #define FLAT_RING3_SS32 0xe02b
16 #define FLAT_RING3_SS64 0xe02b
18 #define FLAT_KERNEL_DS64 FLAT_RING3_DS64
19 #define FLAT_KERNEL_DS32 FLAT_RING3_DS32
20 #define FLAT_KERNEL_DS FLAT_KERNEL_DS64
21 #define FLAT_KERNEL_CS64 FLAT_RING3_CS64
22 #define FLAT_KERNEL_CS32 FLAT_RING3_CS32
23 #define FLAT_KERNEL_CS FLAT_KERNEL_CS64
24 #define FLAT_KERNEL_SS64 FLAT_RING3_SS64
25 #define FLAT_KERNEL_SS32 FLAT_RING3_SS32
26 #define FLAT_KERNEL_SS FLAT_KERNEL_SS64
28 #define FLAT_USER_DS64 FLAT_RING3_DS64
29 #define FLAT_USER_DS32 FLAT_RING3_DS32
30 #define FLAT_USER_DS FLAT_USER_DS64
31 #define FLAT_USER_CS64 FLAT_RING3_CS64
32 #define FLAT_USER_CS32 FLAT_RING3_CS32
33 #define FLAT_USER_CS FLAT_USER_CS64
34 #define FLAT_USER_SS64 FLAT_RING3_SS64
35 #define FLAT_USER_SS32 FLAT_RING3_SS32
36 #define FLAT_USER_SS FLAT_USER_SS64
38 #define __HYPERVISOR_VIRT_START 0xFFFF800000000000
39 #define __HYPERVISOR_VIRT_END 0xFFFF880000000000
40 #define __MACH2PHYS_VIRT_START 0xFFFF800000000000
41 #define __MACH2PHYS_VIRT_END 0xFFFF804000000000
42 #define __MACH2PHYS_SHIFT 3
50 #define SEGBASE_GS_USER 1
51 #define SEGBASE_GS_KERNEL 2
52 #define SEGBASE_GS_USER_SEL 3
75 #define _VGCF_in_syscall 8
76 #define VGCF_in_syscall (1<<_VGCF_in_syscall)
77 #define VGCF_IN_SYSCALL VGCF_in_syscall
87 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
89 #define __DECL_REG(name) union { \
90 uint64_t r ## name, e ## name; \
91 uint32_t _e ## name; \
95 #define __DECL_REG(name) uint64_t r ## name
132 #define xen_pfn_to_cr3(pfn) ((unsigned long)(pfn) << 12)
133 #define xen_cr3_to_pfn(cr3) ((unsigned long)(cr3) >> 12)
142 #define XEN_CALLBACK(__cs, __rip) \
143 ((unsigned long)(__rip))