10 #ifndef __XEN_PUBLIC_ARCH_X86_XEN_X86_64_H__ 11 #define __XEN_PUBLIC_ARCH_X86_XEN_X86_64_H__ 31 #define FLAT_RING3_CS32 0xe023 32 #define FLAT_RING3_CS64 0xe033 33 #define FLAT_RING3_DS32 0xe02b 34 #define FLAT_RING3_DS64 0x0000 35 #define FLAT_RING3_SS32 0xe02b 36 #define FLAT_RING3_SS64 0xe02b 38 #define FLAT_KERNEL_DS64 FLAT_RING3_DS64 39 #define FLAT_KERNEL_DS32 FLAT_RING3_DS32 40 #define FLAT_KERNEL_DS FLAT_KERNEL_DS64 41 #define FLAT_KERNEL_CS64 FLAT_RING3_CS64 42 #define FLAT_KERNEL_CS32 FLAT_RING3_CS32 43 #define FLAT_KERNEL_CS FLAT_KERNEL_CS64 44 #define FLAT_KERNEL_SS64 FLAT_RING3_SS64 45 #define FLAT_KERNEL_SS32 FLAT_RING3_SS32 46 #define FLAT_KERNEL_SS FLAT_KERNEL_SS64 48 #define FLAT_USER_DS64 FLAT_RING3_DS64 49 #define FLAT_USER_DS32 FLAT_RING3_DS32 50 #define FLAT_USER_DS FLAT_USER_DS64 51 #define FLAT_USER_CS64 FLAT_RING3_CS64 52 #define FLAT_USER_CS32 FLAT_RING3_CS32 53 #define FLAT_USER_CS FLAT_USER_CS64 54 #define FLAT_USER_SS64 FLAT_RING3_SS64 55 #define FLAT_USER_SS32 FLAT_RING3_SS32 56 #define FLAT_USER_SS FLAT_USER_SS64 58 #define __HYPERVISOR_VIRT_START 0xFFFF800000000000 59 #define __HYPERVISOR_VIRT_END 0xFFFF880000000000 60 #define __MACH2PHYS_VIRT_START 0xFFFF800000000000 61 #define __MACH2PHYS_VIRT_END 0xFFFF804000000000 63 #ifndef HYPERVISOR_VIRT_START 64 #define HYPERVISOR_VIRT_START xen_mk_ulong(__HYPERVISOR_VIRT_START) 65 #define HYPERVISOR_VIRT_END xen_mk_ulong(__HYPERVISOR_VIRT_END) 68 #define MACH2PHYS_VIRT_START xen_mk_ulong(__MACH2PHYS_VIRT_START) 69 #define MACH2PHYS_VIRT_END xen_mk_ulong(__MACH2PHYS_VIRT_END) 70 #define MACH2PHYS_NR_ENTRIES ((MACH2PHYS_VIRT_END-MACH2PHYS_VIRT_START)>>3) 71 #ifndef machine_to_phys_mapping 72 #define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START) 81 #define SEGBASE_GS_USER 1 82 #define SEGBASE_GS_KERNEL 2 83 #define SEGBASE_GS_USER_SEL 3 106 #define _VGCF_in_syscall 8 107 #define VGCF_in_syscall (1<<_VGCF_in_syscall) 108 #define VGCF_IN_SYSCALL VGCF_in_syscall 118 #if defined(__XEN__) || defined(__XEN_TOOLS__) 120 #define __DECL_REG_LOHI(which) union { \ 121 uint64_t r ## which ## x; \ 122 uint32_t e ## which ## x; \ 123 uint16_t which ## x; \ 125 uint8_t which ## l; \ 126 uint8_t which ## h; \ 129 #define __DECL_REG_LO8(name) union { \ 130 uint64_t r ## name; \ 131 uint32_t e ## name; \ 135 #define __DECL_REG_LO16(name) union { \ 136 uint64_t r ## name; \ 137 uint32_t e ## name; \ 140 #define __DECL_REG_HI(num) union { \ 142 uint32_t r ## num ## d; \ 143 uint16_t r ## num ## w; \ 144 uint8_t r ## num ## b; \ 146 #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) 148 #define __DECL_REG(name) union { \ 149 uint64_t r ## name, e ## name; \ 150 uint32_t _e ## name; \ 154 #define __DECL_REG(name) uint64_t r ## name 157 #ifndef __DECL_REG_LOHI 158 #define __DECL_REG_LOHI(name) __DECL_REG(name ## x) 159 #define __DECL_REG_LO8 __DECL_REG 160 #define __DECL_REG_LO16 __DECL_REG 161 #define __DECL_REG_HI(num) uint64_t r ## num 198 #undef __DECL_REG_LOHI 199 #undef __DECL_REG_LO8 200 #undef __DECL_REG_LO16 203 #define xen_pfn_to_cr3(pfn) ((unsigned long)(pfn) << 12) 204 #define xen_cr3_to_pfn(cr3) ((unsigned long)(cr3) >> 12) DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t)
static __always_inline void off_t int c
unsigned long long uint64_t
uint8_t saved_upcall_mask
IP4_t ip
Destination IP address.
unsigned long xen_callback_t