10#ifndef __XEN_PUBLIC_ARCH_X86_XEN_X86_64_H__
11#define __XEN_PUBLIC_ARCH_X86_XEN_X86_64_H__
32#define FLAT_RING3_CS32 0xe023
33#define FLAT_RING3_CS64 0xe033
34#define FLAT_RING3_DS32 0xe02b
35#define FLAT_RING3_DS64 0x0000
36#define FLAT_RING3_SS32 0xe02b
37#define FLAT_RING3_SS64 0xe02b
39#define FLAT_KERNEL_DS64 FLAT_RING3_DS64
40#define FLAT_KERNEL_DS32 FLAT_RING3_DS32
41#define FLAT_KERNEL_DS FLAT_KERNEL_DS64
42#define FLAT_KERNEL_CS64 FLAT_RING3_CS64
43#define FLAT_KERNEL_CS32 FLAT_RING3_CS32
44#define FLAT_KERNEL_CS FLAT_KERNEL_CS64
45#define FLAT_KERNEL_SS64 FLAT_RING3_SS64
46#define FLAT_KERNEL_SS32 FLAT_RING3_SS32
47#define FLAT_KERNEL_SS FLAT_KERNEL_SS64
49#define FLAT_USER_DS64 FLAT_RING3_DS64
50#define FLAT_USER_DS32 FLAT_RING3_DS32
51#define FLAT_USER_DS FLAT_USER_DS64
52#define FLAT_USER_CS64 FLAT_RING3_CS64
53#define FLAT_USER_CS32 FLAT_RING3_CS32
54#define FLAT_USER_CS FLAT_USER_CS64
55#define FLAT_USER_SS64 FLAT_RING3_SS64
56#define FLAT_USER_SS32 FLAT_RING3_SS32
57#define FLAT_USER_SS FLAT_USER_SS64
59#define __HYPERVISOR_VIRT_START 0xFFFF800000000000
60#define __HYPERVISOR_VIRT_END 0xFFFF880000000000
61#define __MACH2PHYS_VIRT_START 0xFFFF800000000000
62#define __MACH2PHYS_VIRT_END 0xFFFF804000000000
64#ifndef HYPERVISOR_VIRT_START
65#define HYPERVISOR_VIRT_START xen_mk_ulong(__HYPERVISOR_VIRT_START)
66#define HYPERVISOR_VIRT_END xen_mk_ulong(__HYPERVISOR_VIRT_END)
69#define MACH2PHYS_VIRT_START xen_mk_ulong(__MACH2PHYS_VIRT_START)
70#define MACH2PHYS_VIRT_END xen_mk_ulong(__MACH2PHYS_VIRT_END)
71#define MACH2PHYS_NR_ENTRIES ((MACH2PHYS_VIRT_END-MACH2PHYS_VIRT_START)>>3)
72#ifndef machine_to_phys_mapping
73#define machine_to_phys_mapping ((unsigned long *)HYPERVISOR_VIRT_START)
82#define SEGBASE_GS_USER 1
83#define SEGBASE_GS_KERNEL 2
84#define SEGBASE_GS_USER_SEL 3
107#define _VGCF_in_syscall 8
108#define VGCF_in_syscall (1<<_VGCF_in_syscall)
109#define VGCF_IN_SYSCALL VGCF_in_syscall
119#if defined(__XEN__) || defined(__XEN_TOOLS__)
121#define __DECL_REG_LOHI(which) union { \
122 uint64_t r ## which ## x; \
123 uint32_t e ## which ## x; \
124 uint16_t which ## x; \
126 uint8_t which ## l; \
127 uint8_t which ## h; \
130#define __DECL_REG_LO8(name) union { \
131 uint64_t r ## name; \
132 uint32_t e ## name; \
136#define __DECL_REG_LO16(name) union { \
137 uint64_t r ## name; \
138 uint32_t e ## name; \
141#define __DECL_REG_HI(num) union { \
143 uint32_t r ## num ## d; \
144 uint16_t r ## num ## w; \
145 uint8_t r ## num ## b; \
147#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
149#define __DECL_REG(name) union { \
150 uint64_t r ## name, e ## name; \
151 uint32_t _e ## name; \
155#define __DECL_REG(name) uint64_t r ## name
158#ifndef __DECL_REG_LOHI
159#define __DECL_REG_LOHI(name) __DECL_REG(name ## x)
160#define __DECL_REG_LO8 __DECL_REG
161#define __DECL_REG_LO16 __DECL_REG
162#define __DECL_REG_HI(num) uint64_t r ## num
166#define cpu_user_regs guest_user_regs
208#undef __DECL_REG_LOHI
210#undef __DECL_REG_LO16
213#define xen_pfn_to_cr3(pfn) ((unsigned long)(pfn) << 12)
214#define xen_cr3_to_pfn(cr3) ((unsigned long)(cr3) >> 12)
struct arch_vcpu_info arch_vcpu_info_t
unsigned long long uint64_t
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define DEFINE_XEN_GUEST_HANDLE(name)
IP4_t ip
Destination IP address.
uint8_t saved_upcall_mask
struct cpu_user_regs cpu_user_regs_t