svm.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. #ifndef _UAPI__SVM_H
  2. #define _UAPI__SVM_H
  3. #define SVM_EXIT_READ_CR0 0x000
  4. #define SVM_EXIT_READ_CR2 0x002
  5. #define SVM_EXIT_READ_CR3 0x003
  6. #define SVM_EXIT_READ_CR4 0x004
  7. #define SVM_EXIT_READ_CR8 0x008
  8. #define SVM_EXIT_WRITE_CR0 0x010
  9. #define SVM_EXIT_WRITE_CR2 0x012
  10. #define SVM_EXIT_WRITE_CR3 0x013
  11. #define SVM_EXIT_WRITE_CR4 0x014
  12. #define SVM_EXIT_WRITE_CR8 0x018
  13. #define SVM_EXIT_READ_DR0 0x020
  14. #define SVM_EXIT_READ_DR1 0x021
  15. #define SVM_EXIT_READ_DR2 0x022
  16. #define SVM_EXIT_READ_DR3 0x023
  17. #define SVM_EXIT_READ_DR4 0x024
  18. #define SVM_EXIT_READ_DR5 0x025
  19. #define SVM_EXIT_READ_DR6 0x026
  20. #define SVM_EXIT_READ_DR7 0x027
  21. #define SVM_EXIT_WRITE_DR0 0x030
  22. #define SVM_EXIT_WRITE_DR1 0x031
  23. #define SVM_EXIT_WRITE_DR2 0x032
  24. #define SVM_EXIT_WRITE_DR3 0x033
  25. #define SVM_EXIT_WRITE_DR4 0x034
  26. #define SVM_EXIT_WRITE_DR5 0x035
  27. #define SVM_EXIT_WRITE_DR6 0x036
  28. #define SVM_EXIT_WRITE_DR7 0x037
  29. #define SVM_EXIT_EXCP_BASE 0x040
  30. #define SVM_EXIT_INTR 0x060
  31. #define SVM_EXIT_NMI 0x061
  32. #define SVM_EXIT_SMI 0x062
  33. #define SVM_EXIT_INIT 0x063
  34. #define SVM_EXIT_VINTR 0x064
  35. #define SVM_EXIT_CR0_SEL_WRITE 0x065
  36. #define SVM_EXIT_IDTR_READ 0x066
  37. #define SVM_EXIT_GDTR_READ 0x067
  38. #define SVM_EXIT_LDTR_READ 0x068
  39. #define SVM_EXIT_TR_READ 0x069
  40. #define SVM_EXIT_IDTR_WRITE 0x06a
  41. #define SVM_EXIT_GDTR_WRITE 0x06b
  42. #define SVM_EXIT_LDTR_WRITE 0x06c
  43. #define SVM_EXIT_TR_WRITE 0x06d
  44. #define SVM_EXIT_RDTSC 0x06e
  45. #define SVM_EXIT_RDPMC 0x06f
  46. #define SVM_EXIT_PUSHF 0x070
  47. #define SVM_EXIT_POPF 0x071
  48. #define SVM_EXIT_CPUID 0x072
  49. #define SVM_EXIT_RSM 0x073
  50. #define SVM_EXIT_IRET 0x074
  51. #define SVM_EXIT_SWINT 0x075
  52. #define SVM_EXIT_INVD 0x076
  53. #define SVM_EXIT_PAUSE 0x077
  54. #define SVM_EXIT_HLT 0x078
  55. #define SVM_EXIT_INVLPG 0x079
  56. #define SVM_EXIT_INVLPGA 0x07a
  57. #define SVM_EXIT_IOIO 0x07b
  58. #define SVM_EXIT_MSR 0x07c
  59. #define SVM_EXIT_TASK_SWITCH 0x07d
  60. #define SVM_EXIT_FERR_FREEZE 0x07e
  61. #define SVM_EXIT_SHUTDOWN 0x07f
  62. #define SVM_EXIT_VMRUN 0x080
  63. #define SVM_EXIT_VMMCALL 0x081
  64. #define SVM_EXIT_VMLOAD 0x082
  65. #define SVM_EXIT_VMSAVE 0x083
  66. #define SVM_EXIT_STGI 0x084
  67. #define SVM_EXIT_CLGI 0x085
  68. #define SVM_EXIT_SKINIT 0x086
  69. #define SVM_EXIT_RDTSCP 0x087
  70. #define SVM_EXIT_ICEBP 0x088
  71. #define SVM_EXIT_WBINVD 0x089
  72. #define SVM_EXIT_MONITOR 0x08a
  73. #define SVM_EXIT_MWAIT 0x08b
  74. #define SVM_EXIT_MWAIT_COND 0x08c
  75. #define SVM_EXIT_XSETBV 0x08d
  76. #define SVM_EXIT_NPF 0x400
  77. #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401
  78. #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402
  79. #define SVM_EXIT_ERR -1
  80. #define SVM_EXIT_REASONS \
  81. { SVM_EXIT_READ_CR0, "read_cr0" }, \
  82. { SVM_EXIT_READ_CR2, "read_cr2" }, \
  83. { SVM_EXIT_READ_CR3, "read_cr3" }, \
  84. { SVM_EXIT_READ_CR4, "read_cr4" }, \
  85. { SVM_EXIT_READ_CR8, "read_cr8" }, \
  86. { SVM_EXIT_WRITE_CR0, "write_cr0" }, \
  87. { SVM_EXIT_WRITE_CR2, "write_cr2" }, \
  88. { SVM_EXIT_WRITE_CR3, "write_cr3" }, \
  89. { SVM_EXIT_WRITE_CR4, "write_cr4" }, \
  90. { SVM_EXIT_WRITE_CR8, "write_cr8" }, \
  91. { SVM_EXIT_READ_DR0, "read_dr0" }, \
  92. { SVM_EXIT_READ_DR1, "read_dr1" }, \
  93. { SVM_EXIT_READ_DR2, "read_dr2" }, \
  94. { SVM_EXIT_READ_DR3, "read_dr3" }, \
  95. { SVM_EXIT_READ_DR4, "read_dr4" }, \
  96. { SVM_EXIT_READ_DR5, "read_dr5" }, \
  97. { SVM_EXIT_READ_DR6, "read_dr6" }, \
  98. { SVM_EXIT_READ_DR7, "read_dr7" }, \
  99. { SVM_EXIT_WRITE_DR0, "write_dr0" }, \
  100. { SVM_EXIT_WRITE_DR1, "write_dr1" }, \
  101. { SVM_EXIT_WRITE_DR2, "write_dr2" }, \
  102. { SVM_EXIT_WRITE_DR3, "write_dr3" }, \
  103. { SVM_EXIT_WRITE_DR4, "write_dr4" }, \
  104. { SVM_EXIT_WRITE_DR5, "write_dr5" }, \
  105. { SVM_EXIT_WRITE_DR6, "write_dr6" }, \
  106. { SVM_EXIT_WRITE_DR7, "write_dr7" }, \
  107. { SVM_EXIT_EXCP_BASE + DE_VECTOR, "DE excp" }, \
  108. { SVM_EXIT_EXCP_BASE + DB_VECTOR, "DB excp" }, \
  109. { SVM_EXIT_EXCP_BASE + BP_VECTOR, "BP excp" }, \
  110. { SVM_EXIT_EXCP_BASE + OF_VECTOR, "OF excp" }, \
  111. { SVM_EXIT_EXCP_BASE + BR_VECTOR, "BR excp" }, \
  112. { SVM_EXIT_EXCP_BASE + UD_VECTOR, "UD excp" }, \
  113. { SVM_EXIT_EXCP_BASE + NM_VECTOR, "NM excp" }, \
  114. { SVM_EXIT_EXCP_BASE + DF_VECTOR, "DF excp" }, \
  115. { SVM_EXIT_EXCP_BASE + TS_VECTOR, "TS excp" }, \
  116. { SVM_EXIT_EXCP_BASE + NP_VECTOR, "NP excp" }, \
  117. { SVM_EXIT_EXCP_BASE + SS_VECTOR, "SS excp" }, \
  118. { SVM_EXIT_EXCP_BASE + GP_VECTOR, "GP excp" }, \
  119. { SVM_EXIT_EXCP_BASE + PF_VECTOR, "PF excp" }, \
  120. { SVM_EXIT_EXCP_BASE + MF_VECTOR, "MF excp" }, \
  121. { SVM_EXIT_EXCP_BASE + AC_VECTOR, "AC excp" }, \
  122. { SVM_EXIT_EXCP_BASE + MC_VECTOR, "MC excp" }, \
  123. { SVM_EXIT_EXCP_BASE + XM_VECTOR, "XF excp" }, \
  124. { SVM_EXIT_INTR, "interrupt" }, \
  125. { SVM_EXIT_NMI, "nmi" }, \
  126. { SVM_EXIT_SMI, "smi" }, \
  127. { SVM_EXIT_INIT, "init" }, \
  128. { SVM_EXIT_VINTR, "vintr" }, \
  129. { SVM_EXIT_CR0_SEL_WRITE, "cr0_sel_write" }, \
  130. { SVM_EXIT_IDTR_READ, "read_idtr" }, \
  131. { SVM_EXIT_GDTR_READ, "read_gdtr" }, \
  132. { SVM_EXIT_LDTR_READ, "read_ldtr" }, \
  133. { SVM_EXIT_TR_READ, "read_rt" }, \
  134. { SVM_EXIT_IDTR_WRITE, "write_idtr" }, \
  135. { SVM_EXIT_GDTR_WRITE, "write_gdtr" }, \
  136. { SVM_EXIT_LDTR_WRITE, "write_ldtr" }, \
  137. { SVM_EXIT_TR_WRITE, "write_rt" }, \
  138. { SVM_EXIT_RDTSC, "rdtsc" }, \
  139. { SVM_EXIT_RDPMC, "rdpmc" }, \
  140. { SVM_EXIT_PUSHF, "pushf" }, \
  141. { SVM_EXIT_POPF, "popf" }, \
  142. { SVM_EXIT_CPUID, "cpuid" }, \
  143. { SVM_EXIT_RSM, "rsm" }, \
  144. { SVM_EXIT_IRET, "iret" }, \
  145. { SVM_EXIT_SWINT, "swint" }, \
  146. { SVM_EXIT_INVD, "invd" }, \
  147. { SVM_EXIT_PAUSE, "pause" }, \
  148. { SVM_EXIT_HLT, "hlt" }, \
  149. { SVM_EXIT_INVLPG, "invlpg" }, \
  150. { SVM_EXIT_INVLPGA, "invlpga" }, \
  151. { SVM_EXIT_IOIO, "io" }, \
  152. { SVM_EXIT_MSR, "msr" }, \
  153. { SVM_EXIT_TASK_SWITCH, "task_switch" }, \
  154. { SVM_EXIT_FERR_FREEZE, "ferr_freeze" }, \
  155. { SVM_EXIT_SHUTDOWN, "shutdown" }, \
  156. { SVM_EXIT_VMRUN, "vmrun" }, \
  157. { SVM_EXIT_VMMCALL, "hypercall" }, \
  158. { SVM_EXIT_VMLOAD, "vmload" }, \
  159. { SVM_EXIT_VMSAVE, "vmsave" }, \
  160. { SVM_EXIT_STGI, "stgi" }, \
  161. { SVM_EXIT_CLGI, "clgi" }, \
  162. { SVM_EXIT_SKINIT, "skinit" }, \
  163. { SVM_EXIT_RDTSCP, "rdtscp" }, \
  164. { SVM_EXIT_ICEBP, "icebp" }, \
  165. { SVM_EXIT_WBINVD, "wbinvd" }, \
  166. { SVM_EXIT_MONITOR, "monitor" }, \
  167. { SVM_EXIT_MWAIT, "mwait" }, \
  168. { SVM_EXIT_XSETBV, "xsetbv" }, \
  169. { SVM_EXIT_NPF, "npf" }, \
  170. { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \
  171. { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \
  172. { SVM_EXIT_ERR, "invalid_guest_state" }
  173. #endif /* _UAPI__SVM_H */