10 #ifndef __XEN_PUBLIC_XEN_H__ 11 #define __XEN_PUBLIC_XEN_H__ 17 #if defined(__i386__) || defined(__x86_64__) 19 #elif defined(__arm__) || defined (__aarch64__) 31 #if __XEN_INTERFACE_VERSION__ < 0x00040300 42 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 43 #define XEN_FLEX_ARRAY_DIM 44 #elif defined(__GNUC__) 45 #define XEN_FLEX_ARRAY_DIM 0 47 #define XEN_FLEX_ARRAY_DIM 1 51 #define __xen_mk_uint(x) x ## U 52 #define __xen_mk_ulong(x) x ## UL 53 #ifndef __xen_mk_ullong 54 # define __xen_mk_ullong(x) x ## ULL 56 #define xen_mk_uint(x) __xen_mk_uint(x) 57 #define xen_mk_ulong(x) __xen_mk_ulong(x) 58 #define xen_mk_ullong(x) __xen_mk_ullong(x) 63 #define xen_mk_uint(x) x 64 #define xen_mk_ulong(x) x 65 #define xen_mk_ullong(x) x 77 #define __HYPERVISOR_set_trap_table 0 78 #define __HYPERVISOR_mmu_update 1 79 #define __HYPERVISOR_set_gdt 2 80 #define __HYPERVISOR_stack_switch 3 81 #define __HYPERVISOR_set_callbacks 4 82 #define __HYPERVISOR_fpu_taskswitch 5 83 #define __HYPERVISOR_sched_op_compat 6 84 #define __HYPERVISOR_platform_op 7 85 #define __HYPERVISOR_set_debugreg 8 86 #define __HYPERVISOR_get_debugreg 9 87 #define __HYPERVISOR_update_descriptor 10 88 #define __HYPERVISOR_memory_op 12 89 #define __HYPERVISOR_multicall 13 90 #define __HYPERVISOR_update_va_mapping 14 91 #define __HYPERVISOR_set_timer_op 15 92 #define __HYPERVISOR_event_channel_op_compat 16 93 #define __HYPERVISOR_xen_version 17 94 #define __HYPERVISOR_console_io 18 95 #define __HYPERVISOR_physdev_op_compat 19 96 #define __HYPERVISOR_grant_table_op 20 97 #define __HYPERVISOR_vm_assist 21 98 #define __HYPERVISOR_update_va_mapping_otherdomain 22 99 #define __HYPERVISOR_iret 23 100 #define __HYPERVISOR_vcpu_op 24 101 #define __HYPERVISOR_set_segment_base 25 102 #define __HYPERVISOR_mmuext_op 26 103 #define __HYPERVISOR_xsm_op 27 104 #define __HYPERVISOR_nmi_op 28 105 #define __HYPERVISOR_sched_op 29 106 #define __HYPERVISOR_callback_op 30 107 #define __HYPERVISOR_xenoprof_op 31 108 #define __HYPERVISOR_event_channel_op 32 109 #define __HYPERVISOR_physdev_op 33 110 #define __HYPERVISOR_hvm_op 34 111 #define __HYPERVISOR_sysctl 35 112 #define __HYPERVISOR_domctl 36 113 #define __HYPERVISOR_kexec_op 37 114 #define __HYPERVISOR_tmem_op 38 115 #define __HYPERVISOR_argo_op 39 116 #define __HYPERVISOR_xenpmu_op 40 117 #define __HYPERVISOR_dm_op 41 118 #define __HYPERVISOR_hypfs_op 42 121 #define __HYPERVISOR_arch_0 48 122 #define __HYPERVISOR_arch_1 49 123 #define __HYPERVISOR_arch_2 50 124 #define __HYPERVISOR_arch_3 51 125 #define __HYPERVISOR_arch_4 52 126 #define __HYPERVISOR_arch_5 53 127 #define __HYPERVISOR_arch_6 54 128 #define __HYPERVISOR_arch_7 55 137 #if __XEN_INTERFACE_VERSION__ < 0x00030101 138 #undef __HYPERVISOR_sched_op 139 #define __HYPERVISOR_sched_op __HYPERVISOR_sched_op_compat 143 #if __XEN_INTERFACE_VERSION__ < 0x00030202 144 #undef __HYPERVISOR_event_channel_op 145 #define __HYPERVISOR_event_channel_op __HYPERVISOR_event_channel_op_compat 146 #undef __HYPERVISOR_physdev_op 147 #define __HYPERVISOR_physdev_op __HYPERVISOR_physdev_op_compat 151 #if __XEN_INTERFACE_VERSION__ < 0x00030204 152 #define __HYPERVISOR_dom0_op __HYPERVISOR_platform_op 168 #define VIRQ_CONSOLE 2 169 #define VIRQ_DOM_EXC 3 171 #define VIRQ_DEBUGGER 6 172 #define VIRQ_XENOPROF 7 173 #define VIRQ_CON_RING 8 174 #define VIRQ_PCPU_STATE 9 175 #define VIRQ_MEM_EVENT 10 177 #define VIRQ_ENOMEM 12 178 #define VIRQ_XENPMU 13 181 #define VIRQ_ARCH_0 16 182 #define VIRQ_ARCH_1 17 183 #define VIRQ_ARCH_2 18 184 #define VIRQ_ARCH_3 19 185 #define VIRQ_ARCH_4 20 186 #define VIRQ_ARCH_5 21 187 #define VIRQ_ARCH_6 22 188 #define VIRQ_ARCH_7 23 336 #define MMU_NORMAL_PT_UPDATE 0 337 #define MMU_MACHPHYS_UPDATE 1 338 #define MMU_PT_UPDATE_PRESERVE_AD 2 339 #define MMU_PT_UPDATE_NO_TRANSLATE 3 407 #define MMUEXT_PIN_L1_TABLE 0 408 #define MMUEXT_PIN_L2_TABLE 1 409 #define MMUEXT_PIN_L3_TABLE 2 410 #define MMUEXT_PIN_L4_TABLE 3 411 #define MMUEXT_UNPIN_TABLE 4 412 #define MMUEXT_NEW_BASEPTR 5 413 #define MMUEXT_TLB_FLUSH_LOCAL 6 414 #define MMUEXT_INVLPG_LOCAL 7 415 #define MMUEXT_TLB_FLUSH_MULTI 8 416 #define MMUEXT_INVLPG_MULTI 9 417 #define MMUEXT_TLB_FLUSH_ALL 10 418 #define MMUEXT_INVLPG_ALL 11 419 #define MMUEXT_FLUSH_CACHE 12 420 #define MMUEXT_SET_LDT 13 421 #define MMUEXT_NEW_USER_BASEPTR 15 422 #define MMUEXT_CLEAR_PAGE 16 423 #define MMUEXT_COPY_PAGE 17 424 #define MMUEXT_FLUSH_CACHE_GLOBAL 18 425 #define MMUEXT_MARK_SUPER 19 426 #define MMUEXT_UNMARK_SUPER 20 443 #if __XEN_INTERFACE_VERSION__ >= 0x00030205 474 #define UVMF_NONE (xen_mk_ulong(0)<<0) 475 #define UVMF_TLB_FLUSH (xen_mk_ulong(1)<<0) 476 #define UVMF_INVLPG (xen_mk_ulong(2)<<0) 477 #define UVMF_FLUSHTYPE_MASK (xen_mk_ulong(3)<<0) 478 #define UVMF_MULTI (xen_mk_ulong(0)<<2) 479 #define UVMF_LOCAL (xen_mk_ulong(0)<<2) 480 #define UVMF_ALL (xen_mk_ulong(1)<<2) 507 #define CONSOLEIO_write 0 508 #define CONSOLEIO_read 1 513 #define VMASST_CMD_enable 0 514 #define VMASST_CMD_disable 1 517 #define VMASST_TYPE_4gb_segments 0 520 #define VMASST_TYPE_4gb_segments_notify 1 527 #define VMASST_TYPE_writable_pagetables 2 530 #define VMASST_TYPE_pae_extended_cr3 3 538 #define VMASST_TYPE_architectural_iopl 4 545 #define VMASST_TYPE_runstate_update_flag 5 557 #define VMASST_TYPE_m2p_strict 32 559 #if __XEN_INTERFACE_VERSION__ < 0x00040600 560 #define MAX_VMASST_TYPE 3 564 #define DOMID_FIRST_RESERVED xen_mk_uint(0x7FF0) 567 #define DOMID_SELF xen_mk_uint(0x7FF0) 580 #define DOMID_IO xen_mk_uint(0x7FF1) 591 #define DOMID_XEN xen_mk_uint(0x7FF2) 595 #define DOMID_COW xen_mk_uint(0x7FF3) 598 #define DOMID_INVALID xen_mk_uint(0x7FF4) 601 #define DOMID_IDLE xen_mk_uint(0x7FFF) 604 #define DOMID_MASK xen_mk_uint(0x7FFF) 637 #if __XEN_INTERFACE_VERSION__ < 0x00040400 642 #define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS 668 #if __XEN_INTERFACE_VERSION__ > 0x040600 677 #define XEN_PVCLOCK_TSC_STABLE_BIT (1 << 0) 678 #define XEN_PVCLOCK_GUEST_STOPPED (1 << 1) 707 #ifdef XEN_HAVE_PV_UPCALL_MASK 778 #if !defined(__i386__) 780 # define xen_wc_sec_hi wc_sec_hi 781 #elif !defined(__XEN__) && !defined(__XEN_TOOLS__) 782 # define xen_wc_sec_hi arch.wc_sec_hi 829 #ifdef XEN_HAVE_PV_GUEST_ENTRY 833 unsigned long nr_pages;
849 unsigned long pt_base;
850 unsigned long nr_pt_frames;
851 unsigned long mfn_list;
855 unsigned long mod_len;
856 #define MAX_GUEST_CMDLINE 1024 857 int8_t cmd_line[MAX_GUEST_CMDLINE];
859 unsigned long first_p2m_pfn;
860 unsigned long nr_p2m_frames;
862 typedef struct start_info start_info_t;
865 #if __XEN_INTERFACE_VERSION__ < 0x00030203 866 #define console_mfn console.domU.mfn 867 #define console_evtchn console.domU.evtchn 872 #define SIF_PRIVILEGED (1<<0) 873 #define SIF_INITDOMAIN (1<<1) 874 #define SIF_MULTIBOOT_MOD (1<<2) 875 #define SIF_MOD_START_PFN (1<<3) 876 #define SIF_VIRT_P2M_4TOOLS (1<<4) 878 #define SIF_PM_MASK (0xFF<<8) 915 #define XEN_VGATYPE_TEXT_MODE_3 0x03 916 #define XEN_VGATYPE_VESA_LFB 0x23 917 #define XEN_VGATYPE_EFI_LFB 0x70 944 #if __XEN_INTERFACE_VERSION__ >= 0x00030206 951 #if __XEN_INTERFACE_VERSION__ >= 0x00040d00 958 #define xen_vga_console_info dom0_vga_console_info 959 #define xen_vga_console_info_t dom0_vga_console_info_t 983 #define XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6) \ 984 {{((a) >> 24) & 0xFF, ((a) >> 16) & 0xFF, \ 985 ((a) >> 8) & 0xFF, ((a) >> 0) & 0xFF, \ 986 ((b) >> 8) & 0xFF, ((b) >> 0) & 0xFF, \ 987 ((c) >> 8) & 0xFF, ((c) >> 0) & 0xFF, \ 988 ((d) >> 8) & 0xFF, ((d) >> 0) & 0xFF, \ 989 e1, e2, e3, e4, e5, e6}} 991 #if defined(__STDC_VERSION__) ? __STDC_VERSION__ >= 199901L : defined(__GNUC__) 992 #define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \ 993 ((xen_uuid_t)XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6)) 995 #define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \ 996 XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6) 1002 #if defined(__XEN__) || defined(__XEN_TOOLS__) 1004 #ifndef int64_aligned_t 1005 #define int64_aligned_t int64_t 1007 #ifndef uint64_aligned_t 1008 #define uint64_aligned_t uint64_t 1010 #ifndef XEN_GUEST_HANDLE_64 1011 #define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name) 1014 #ifndef __ASSEMBLY__ 1015 struct xenctl_bitmap {
1019 typedef struct xenctl_bitmap xenctl_bitmap_t;
__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char)
struct dom0_vga_console_info::@679::@681 vesa_lfb
#define XEN_LEGACY_MAX_VCPUS
unsigned long long uint64_t
#define XEN_GUEST_HANDLE(name)
struct dom0_vga_console_info::@679::@680 text_mode_3
unsigned long xen_ulong_t
struct arch_shared_info arch
uint32_t tsc_to_system_mul
xen_ulong_t evtchn_pending_sel
union dom0_vga_console_info::@679 u
union mmuext_op::@678 arg2
xen_ulong_t evtchn_pending[sizeof(xen_ulong_t) *8]
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint16_t magic
Magic signature.
union mmuext_op::@677 arg1
unsigned long linear_addr
DEFINE_XEN_GUEST_HANDLE(trap_info_t)
unsigned long xen_ulong_t
struct arch_vcpu_info arch
uint8_t xen_domain_handle_t[16]
xen_ulong_t evtchn_mask[sizeof(xen_ulong_t) *8]
struct dom0_vga_console_info dom0_vga_console_info_t
uint8_t evtchn_upcall_pending