10 #ifndef __XEN_PUBLIC_ARCH_X86_XEN_X86_32_H__ 11 #define __XEN_PUBLIC_ARCH_X86_XEN_X86_32_H__ 29 #define FLAT_RING1_CS 0xe019 30 #define FLAT_RING1_DS 0xe021 31 #define FLAT_RING1_SS 0xe021 32 #define FLAT_RING3_CS 0xe02b 33 #define FLAT_RING3_DS 0xe033 34 #define FLAT_RING3_SS 0xe033 36 #define FLAT_KERNEL_CS FLAT_RING1_CS 37 #define FLAT_KERNEL_DS FLAT_RING1_DS 38 #define FLAT_KERNEL_SS FLAT_RING1_SS 39 #define FLAT_USER_CS FLAT_RING3_CS 40 #define FLAT_USER_DS FLAT_RING3_DS 41 #define FLAT_USER_SS FLAT_RING3_SS 43 #define __HYPERVISOR_VIRT_START_PAE 0xF5800000 44 #define __MACH2PHYS_VIRT_START_PAE 0xF5800000 45 #define __MACH2PHYS_VIRT_END_PAE 0xF6800000 46 #define HYPERVISOR_VIRT_START_PAE xen_mk_ulong(__HYPERVISOR_VIRT_START_PAE) 47 #define MACH2PHYS_VIRT_START_PAE xen_mk_ulong(__MACH2PHYS_VIRT_START_PAE) 48 #define MACH2PHYS_VIRT_END_PAE xen_mk_ulong(__MACH2PHYS_VIRT_END_PAE) 51 #define __HYPERVISOR_VIRT_START_NONPAE 0xFC000000 52 #define __MACH2PHYS_VIRT_START_NONPAE 0xFC000000 53 #define __MACH2PHYS_VIRT_END_NONPAE 0xFC400000 54 #define HYPERVISOR_VIRT_START_NONPAE \ 55 xen_mk_ulong(__HYPERVISOR_VIRT_START_NONPAE) 56 #define MACH2PHYS_VIRT_START_NONPAE \ 57 xen_mk_ulong(__MACH2PHYS_VIRT_START_NONPAE) 58 #define MACH2PHYS_VIRT_END_NONPAE \ 59 xen_mk_ulong(__MACH2PHYS_VIRT_END_NONPAE) 61 #define __HYPERVISOR_VIRT_START __HYPERVISOR_VIRT_START_PAE 62 #define __MACH2PHYS_VIRT_START __MACH2PHYS_VIRT_START_PAE 63 #define __MACH2PHYS_VIRT_END __MACH2PHYS_VIRT_END_PAE 65 #ifndef HYPERVISOR_VIRT_START 66 #define HYPERVISOR_VIRT_START xen_mk_ulong(__HYPERVISOR_VIRT_START) 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)>>2) 72 #ifndef machine_to_phys_mapping 73 #define machine_to_phys_mapping ((unsigned long *)MACH2PHYS_VIRT_START) 77 #if defined(__XEN__) || defined(__XEN_TOOLS__) 78 #undef ___DEFINE_XEN_GUEST_HANDLE 79 #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \ 80 typedef struct { type *p; } \ 81 __guest_handle_ ## name; \ 82 typedef struct { union { type *p; uint64_aligned_t q; }; } \ 83 __guest_handle_64_ ## name 84 #undef set_xen_guest_handle_raw 85 #define set_xen_guest_handle_raw(hnd, val) \ 86 do { if ( sizeof(hnd) == 8 ) *(uint64_t *)&(hnd) = 0; \ 89 #define int64_aligned_t int64_t __attribute__((aligned(8))) 90 #define uint64_aligned_t uint64_t __attribute__((aligned(8))) 91 #define __XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name 92 #define XEN_GUEST_HANDLE_64(name) __XEN_GUEST_HANDLE_64(name) 97 #if defined(XEN_GENERATING_COMPAT_HEADERS) 99 #elif defined(__XEN__) || defined(__XEN_TOOLS__) 101 #define __DECL_REG_LO8(which) union { \ 102 uint32_t e ## which ## x; \ 103 uint16_t which ## x; \ 105 uint8_t which ## l; \ 106 uint8_t which ## h; \ 109 #define __DECL_REG_LO16(name) union { \ 110 uint32_t e ## name, _e ## name; \ 115 #define __DECL_REG_LO8(which) uint32_t e ## which ## x 116 #define __DECL_REG_LO16(name) uint32_t e ## name 144 #undef __DECL_REG_LO8 145 #undef __DECL_REG_LO16 152 #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) 153 #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))
static __always_inline void off_t int c
DEFINE_XEN_GUEST_HANDLE(cpu_user_regs_t)
uint8_t saved_upcall_mask
IP4_t ip
Destination IP address.