1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _UAPI__SVM_H 20 #define _UAPI__SVM_H 21 #define SVM_EXIT_READ_CR0 0x000 22 #define SVM_EXIT_READ_CR2 0x002 23 #define SVM_EXIT_READ_CR3 0x003 24 #define SVM_EXIT_READ_CR4 0x004 25 #define SVM_EXIT_READ_CR8 0x008 26 #define SVM_EXIT_WRITE_CR0 0x010 27 #define SVM_EXIT_WRITE_CR2 0x012 28 #define SVM_EXIT_WRITE_CR3 0x013 29 #define SVM_EXIT_WRITE_CR4 0x014 30 #define SVM_EXIT_WRITE_CR8 0x018 31 #define SVM_EXIT_READ_DR0 0x020 32 #define SVM_EXIT_READ_DR1 0x021 33 #define SVM_EXIT_READ_DR2 0x022 34 #define SVM_EXIT_READ_DR3 0x023 35 #define SVM_EXIT_READ_DR4 0x024 36 #define SVM_EXIT_READ_DR5 0x025 37 #define SVM_EXIT_READ_DR6 0x026 38 #define SVM_EXIT_READ_DR7 0x027 39 #define SVM_EXIT_WRITE_DR0 0x030 40 #define SVM_EXIT_WRITE_DR1 0x031 41 #define SVM_EXIT_WRITE_DR2 0x032 42 #define SVM_EXIT_WRITE_DR3 0x033 43 #define SVM_EXIT_WRITE_DR4 0x034 44 #define SVM_EXIT_WRITE_DR5 0x035 45 #define SVM_EXIT_WRITE_DR6 0x036 46 #define SVM_EXIT_WRITE_DR7 0x037 47 #define SVM_EXIT_EXCP_BASE 0x040 48 #define SVM_EXIT_LAST_EXCP 0x05f 49 #define SVM_EXIT_INTR 0x060 50 #define SVM_EXIT_NMI 0x061 51 #define SVM_EXIT_SMI 0x062 52 #define SVM_EXIT_INIT 0x063 53 #define SVM_EXIT_VINTR 0x064 54 #define SVM_EXIT_CR0_SEL_WRITE 0x065 55 #define SVM_EXIT_IDTR_READ 0x066 56 #define SVM_EXIT_GDTR_READ 0x067 57 #define SVM_EXIT_LDTR_READ 0x068 58 #define SVM_EXIT_TR_READ 0x069 59 #define SVM_EXIT_IDTR_WRITE 0x06a 60 #define SVM_EXIT_GDTR_WRITE 0x06b 61 #define SVM_EXIT_LDTR_WRITE 0x06c 62 #define SVM_EXIT_TR_WRITE 0x06d 63 #define SVM_EXIT_RDTSC 0x06e 64 #define SVM_EXIT_RDPMC 0x06f 65 #define SVM_EXIT_PUSHF 0x070 66 #define SVM_EXIT_POPF 0x071 67 #define SVM_EXIT_CPUID 0x072 68 #define SVM_EXIT_RSM 0x073 69 #define SVM_EXIT_IRET 0x074 70 #define SVM_EXIT_SWINT 0x075 71 #define SVM_EXIT_INVD 0x076 72 #define SVM_EXIT_PAUSE 0x077 73 #define SVM_EXIT_HLT 0x078 74 #define SVM_EXIT_INVLPG 0x079 75 #define SVM_EXIT_INVLPGA 0x07a 76 #define SVM_EXIT_IOIO 0x07b 77 #define SVM_EXIT_MSR 0x07c 78 #define SVM_EXIT_TASK_SWITCH 0x07d 79 #define SVM_EXIT_FERR_FREEZE 0x07e 80 #define SVM_EXIT_SHUTDOWN 0x07f 81 #define SVM_EXIT_VMRUN 0x080 82 #define SVM_EXIT_VMMCALL 0x081 83 #define SVM_EXIT_VMLOAD 0x082 84 #define SVM_EXIT_VMSAVE 0x083 85 #define SVM_EXIT_STGI 0x084 86 #define SVM_EXIT_CLGI 0x085 87 #define SVM_EXIT_SKINIT 0x086 88 #define SVM_EXIT_RDTSCP 0x087 89 #define SVM_EXIT_ICEBP 0x088 90 #define SVM_EXIT_WBINVD 0x089 91 #define SVM_EXIT_MONITOR 0x08a 92 #define SVM_EXIT_MWAIT 0x08b 93 #define SVM_EXIT_MWAIT_COND 0x08c 94 #define SVM_EXIT_XSETBV 0x08d 95 #define SVM_EXIT_RDPRU 0x08e 96 #define SVM_EXIT_EFER_WRITE_TRAP 0x08f 97 #define SVM_EXIT_CR0_WRITE_TRAP 0x090 98 #define SVM_EXIT_CR1_WRITE_TRAP 0x091 99 #define SVM_EXIT_CR2_WRITE_TRAP 0x092 100 #define SVM_EXIT_CR3_WRITE_TRAP 0x093 101 #define SVM_EXIT_CR4_WRITE_TRAP 0x094 102 #define SVM_EXIT_CR5_WRITE_TRAP 0x095 103 #define SVM_EXIT_CR6_WRITE_TRAP 0x096 104 #define SVM_EXIT_CR7_WRITE_TRAP 0x097 105 #define SVM_EXIT_CR8_WRITE_TRAP 0x098 106 #define SVM_EXIT_CR9_WRITE_TRAP 0x099 107 #define SVM_EXIT_CR10_WRITE_TRAP 0x09a 108 #define SVM_EXIT_CR11_WRITE_TRAP 0x09b 109 #define SVM_EXIT_CR12_WRITE_TRAP 0x09c 110 #define SVM_EXIT_CR13_WRITE_TRAP 0x09d 111 #define SVM_EXIT_CR14_WRITE_TRAP 0x09e 112 #define SVM_EXIT_CR15_WRITE_TRAP 0x09f 113 #define SVM_EXIT_INVPCID 0x0a2 114 #define SVM_EXIT_NPF 0x400 115 #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 116 #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402 117 #define SVM_EXIT_VMGEXIT 0x403 118 #define SVM_VMGEXIT_MMIO_READ 0x80000001 119 #define SVM_VMGEXIT_MMIO_WRITE 0x80000002 120 #define SVM_VMGEXIT_NMI_COMPLETE 0x80000003 121 #define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004 122 #define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005 123 #define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0 124 #define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1 125 #define SVM_VMGEXIT_PSC 0x80000010 126 #define SVM_VMGEXIT_GUEST_REQUEST 0x80000011 127 #define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012 128 #define SVM_VMGEXIT_AP_CREATION 0x80000013 129 #define SVM_VMGEXIT_AP_CREATE_ON_INIT 0 130 #define SVM_VMGEXIT_AP_CREATE 1 131 #define SVM_VMGEXIT_AP_DESTROY 2 132 #define SVM_VMGEXIT_HV_FEATURES 0x8000fffd 133 #define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe 134 #define SVM_VMGEXIT_TERM_REASON(reason_set,reason_code) (((((u64) reason_set) & 0xf)) | ((((u64) reason_code) & 0xff) << 4)) 135 #define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff 136 #define SVM_EXIT_SW 0xf0000000 137 #define SVM_EXIT_ERR - 1 138 #define SVM_EXIT_REASONS { SVM_EXIT_READ_CR0, "read_cr0" }, { SVM_EXIT_READ_CR2, "read_cr2" }, { SVM_EXIT_READ_CR3, "read_cr3" }, { SVM_EXIT_READ_CR4, "read_cr4" }, { SVM_EXIT_READ_CR8, "read_cr8" }, { SVM_EXIT_WRITE_CR0, "write_cr0" }, { SVM_EXIT_WRITE_CR2, "write_cr2" }, { SVM_EXIT_WRITE_CR3, "write_cr3" }, { SVM_EXIT_WRITE_CR4, "write_cr4" }, { SVM_EXIT_WRITE_CR8, "write_cr8" }, { SVM_EXIT_READ_DR0, "read_dr0" }, { SVM_EXIT_READ_DR1, "read_dr1" }, { SVM_EXIT_READ_DR2, "read_dr2" }, { SVM_EXIT_READ_DR3, "read_dr3" }, { SVM_EXIT_READ_DR4, "read_dr4" }, { SVM_EXIT_READ_DR5, "read_dr5" }, { SVM_EXIT_READ_DR6, "read_dr6" }, { SVM_EXIT_READ_DR7, "read_dr7" }, { SVM_EXIT_WRITE_DR0, "write_dr0" }, { SVM_EXIT_WRITE_DR1, "write_dr1" }, { SVM_EXIT_WRITE_DR2, "write_dr2" }, { SVM_EXIT_WRITE_DR3, "write_dr3" }, { SVM_EXIT_WRITE_DR4, "write_dr4" }, { SVM_EXIT_WRITE_DR5, "write_dr5" }, { SVM_EXIT_WRITE_DR6, "write_dr6" }, { SVM_EXIT_WRITE_DR7, "write_dr7" }, { SVM_EXIT_EXCP_BASE + DE_VECTOR, "DE excp" }, { SVM_EXIT_EXCP_BASE + DB_VECTOR, "DB excp" }, { SVM_EXIT_EXCP_BASE + BP_VECTOR, "BP excp" }, { SVM_EXIT_EXCP_BASE + OF_VECTOR, "OF excp" }, { SVM_EXIT_EXCP_BASE + BR_VECTOR, "BR excp" }, { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, { SVM_EXIT_EXCP_BASE + DF_VECTOR, "DF excp" }, { SVM_EXIT_EXCP_BASE + TS_VECTOR, "TS excp" }, { SVM_EXIT_EXCP_BASE + NP_VECTOR, "NP excp" }, { SVM_EXIT_EXCP_BASE + SS_VECTOR, "SS excp" }, { SVM_EXIT_EXCP_BASE + GP_VECTOR, "GP excp" }, { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, { SVM_EXIT_EXCP_BASE + MF_VECTOR, "MF excp" }, { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, { SVM_EXIT_EXCP_BASE + XM_VECTOR, "XF excp" }, { SVM_EXIT_INTR, "interrupt" }, { SVM_EXIT_NMI, "nmi" }, { SVM_EXIT_SMI, "smi" }, { SVM_EXIT_INIT, "init" }, { SVM_EXIT_VINTR, "vintr" }, { SVM_EXIT_CR0_SEL_WRITE, "cr0_sel_write" }, { SVM_EXIT_IDTR_READ, "read_idtr" }, { SVM_EXIT_GDTR_READ, "read_gdtr" }, { SVM_EXIT_LDTR_READ, "read_ldtr" }, { SVM_EXIT_TR_READ, "read_rt" }, { SVM_EXIT_IDTR_WRITE, "write_idtr" }, { SVM_EXIT_GDTR_WRITE, "write_gdtr" }, { SVM_EXIT_LDTR_WRITE, "write_ldtr" }, { SVM_EXIT_TR_WRITE, "write_rt" }, { SVM_EXIT_RDTSC, "rdtsc" }, { SVM_EXIT_RDPMC, "rdpmc" }, { SVM_EXIT_PUSHF, "pushf" }, { SVM_EXIT_POPF, "popf" }, { SVM_EXIT_CPUID, "cpuid" }, { SVM_EXIT_RSM, "rsm" }, { SVM_EXIT_IRET, "iret" }, { SVM_EXIT_SWINT, "swint" }, { SVM_EXIT_INVD, "invd" }, { SVM_EXIT_PAUSE, "pause" }, { SVM_EXIT_HLT, "hlt" }, { SVM_EXIT_INVLPG, "invlpg" }, { SVM_EXIT_INVLPGA, "invlpga" }, { SVM_EXIT_IOIO, "io" }, { SVM_EXIT_MSR, "msr" }, { SVM_EXIT_TASK_SWITCH, "task_switch" }, { SVM_EXIT_FERR_FREEZE, "ferr_freeze" }, { SVM_EXIT_SHUTDOWN, "shutdown" }, { SVM_EXIT_VMRUN, "vmrun" }, { SVM_EXIT_VMMCALL, "hypercall" }, { SVM_EXIT_VMLOAD, "vmload" }, { SVM_EXIT_VMSAVE, "vmsave" }, { SVM_EXIT_STGI, "stgi" }, { SVM_EXIT_CLGI, "clgi" }, { SVM_EXIT_SKINIT, "skinit" }, { SVM_EXIT_RDTSCP, "rdtscp" }, { SVM_EXIT_ICEBP, "icebp" }, { SVM_EXIT_WBINVD, "wbinvd" }, { SVM_EXIT_MONITOR, "monitor" }, { SVM_EXIT_MWAIT, "mwait" }, { SVM_EXIT_XSETBV, "xsetbv" }, { SVM_EXIT_EFER_WRITE_TRAP, "write_efer_trap" }, { SVM_EXIT_CR0_WRITE_TRAP, "write_cr0_trap" }, { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, { SVM_EXIT_INVPCID, "invpcid" }, { SVM_EXIT_NPF, "npf" }, { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, { SVM_EXIT_VMGEXIT, "vmgexit" }, { SVM_VMGEXIT_MMIO_READ, "vmgexit_mmio_read" }, { SVM_VMGEXIT_MMIO_WRITE, "vmgexit_mmio_write" }, { SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, { SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, { SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, { SVM_VMGEXIT_PSC, "vmgexit_page_state_change" }, { SVM_VMGEXIT_GUEST_REQUEST, "vmgexit_guest_request" }, { SVM_VMGEXIT_EXT_GUEST_REQUEST, "vmgexit_ext_guest_request" }, { SVM_VMGEXIT_AP_CREATION, "vmgexit_ap_creation" }, { SVM_VMGEXIT_HV_FEATURES, "vmgexit_hypervisor_feature" }, { SVM_EXIT_ERR, "invalid_guest_state" } 139 #endif 140