1 #ifndef __VKI_XEN_H 2 #define __VKI_XEN_H 3 4 #define ENABLE_XEN 1 5 6 #define __VKI_XEN_set_trap_table 0 7 #define __VKI_XEN_mmu_update 1 8 #define __VKI_XEN_set_gdt 2 9 #define __VKI_XEN_stack_switch 3 10 #define __VKI_XEN_set_callbacks 4 11 #define __VKI_XEN_fpu_taskswitch 5 12 #define __VKI_XEN_sched_op_compat 6 /* compat since 0x00030101 */ 13 #define __VKI_XEN_platform_op 7 14 #define __VKI_XEN_set_debugreg 8 15 #define __VKI_XEN_get_debugreg 9 16 #define __VKI_XEN_update_descriptor 10 17 #define __VKI_XEN_memory_op 12 18 #define __VKI_XEN_multicall 13 19 #define __VKI_XEN_update_va_mapping 14 20 #define __VKI_XEN_set_timer_op 15 21 #define __VKI_XEN_event_channel_op_compat 16 /* compat since 0x00030202 */ 22 #define __VKI_XEN_xen_version 17 23 #define __VKI_XEN_console_io 18 24 #define __VKI_XEN_physdev_op_compat 19 /* compat since 0x00030202 */ 25 #define __VKI_XEN_grant_table_op 20 26 #define __VKI_XEN_vm_assist 21 27 #define __VKI_XEN_update_va_mapping_otherdomain 22 28 #define __VKI_XEN_iret 23 /* x86 only */ 29 #define __VKI_XEN_vcpu_op 24 30 #define __VKI_XEN_set_segment_base 25 /* x86/64 only */ 31 #define __VKI_XEN_mmuext_op 26 32 #define __VKI_XEN_xsm_op 27 33 #define __VKI_XEN_nmi_op 28 34 #define __VKI_XEN_sched_op 29 35 #define __VKI_XEN_callback_op 30 36 #define __VKI_XEN_xenoprof_op 31 37 #define __VKI_XEN_event_channel_op 32 38 #define __VKI_XEN_physdev_op 33 39 #define __VKI_XEN_hvm_op 34 40 #define __VKI_XEN_sysctl 35 41 #define __VKI_XEN_domctl 36 42 #define __VKI_XEN_kexec_op 37 43 #define __VKI_XEN_tmem_op 38 44 #define __VKI_XEN_xc_reserved_op 39 /* reserved for XenClient */ 45 46 #define __DEFINE_VKI_XEN_GUEST_HANDLE(name, type) \ 47 ___DEFINE_VKI_XEN_GUEST_HANDLE(name, type); \ 48 ___DEFINE_VKI_XEN_GUEST_HANDLE(const_##name, const type) 49 #define DEFINE_VKI_XEN_GUEST_HANDLE(name) __DEFINE_VKI_XEN_GUEST_HANDLE(name, name) 50 51 typedef vki_uint8_t vki_xen_domain_handle_t[16]; 52 typedef vki_uint16_t vki_xen_domid_t; 53 54 #if defined(__i386__) || defined(__x86_64__) 55 #include <vki/vki-xen-x86.h> 56 #else 57 #error "Need to define per-ARCH Xen types for this platform" 58 #endif 59 60 DEFINE_VKI_XEN_GUEST_HANDLE(void); 61 DEFINE_VKI_XEN_GUEST_HANDLE(char); 62 DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_pfn_t); 63 64 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_ulong, unsigned long); 65 66 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_int16, vki_int16_t); 67 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_int32, vki_int32_t); 68 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_int64, vki_int64_t); 69 70 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_uint8, vki_uint8_t); 71 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_uint16, vki_uint16_t); 72 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_uint32, vki_uint32_t); 73 __DEFINE_VKI_XEN_GUEST_HANDLE(vki_uint64, vki_uint64_t); 74 75 struct vki_xenctl_bitmap { 76 VKI_XEN_GUEST_HANDLE_64(vki_uint8) bitmap; 77 vki_uint32_t nr_bits; 78 }; 79 80 #include <vki/vki-xen-domctl.h> 81 #include <vki/vki-xen-sysctl.h> 82 #include <vki/vki-xen-mmuext.h> 83 #include <vki/vki-xen-memory.h> 84 #include <vki/vki-xen-evtchn.h> 85 #include <vki/vki-xen-gnttab.h> 86 #include <vki/vki-xen-version.h> 87 #include <vki/vki-xen-hvm.h> 88 #include <vki/vki-xen-tmem.h> 89 90 #endif // __VKI_XEN_H 91 92 /*--------------------------------------------------------------------*/ 93 /*--- end ---*/ 94 /*--------------------------------------------------------------------*/ 95