]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/kvm/svm.h
KVM: Portability: Move x86 instruction emulation code to x86.c
[linux-2.6-omap-h63xx.git] / drivers / kvm / svm.h
index df731c3fb58880dba3fad8b37f93f87c58e6da56..5fa277c0187cf5a4e066331c12f03a405eebc20a 100644 (file)
@@ -44,6 +44,9 @@ enum {
        INTERCEPT_RDTSCP,
        INTERCEPT_ICEBP,
        INTERCEPT_WBINVD,
+       INTERCEPT_MONITOR,
+       INTERCEPT_MWAIT,
+       INTERCEPT_MWAIT_COND,
 };
 
 
@@ -172,8 +175,11 @@ struct __attribute__ ((__packed__)) vmcb {
 #define SVM_CPUID_FUNC 0x8000000a
 
 #define MSR_EFER_SVME_MASK (1ULL << 12)
+#define MSR_VM_CR       0xc0010114
 #define MSR_VM_HSAVE_PA 0xc0010117ULL
 
+#define SVM_VM_CR_SVM_DISABLE 4
+
 #define SVM_SELECTOR_S_SHIFT 4
 #define SVM_SELECTOR_DPL_SHIFT 5
 #define SVM_SELECTOR_P_SHIFT 7
@@ -298,11 +304,14 @@ struct __attribute__ ((__packed__)) vmcb {
 #define SVM_EXIT_RDTSCP                0x087
 #define SVM_EXIT_ICEBP         0x088
 #define SVM_EXIT_WBINVD                0x089
+#define SVM_EXIT_MONITOR       0x08a
+#define SVM_EXIT_MWAIT         0x08b
+#define SVM_EXIT_MWAIT_COND    0x08c
 #define SVM_EXIT_NPF           0x400
 
 #define SVM_EXIT_ERR           -1
 
-#define SVM_CR0_SELECTIVE_MASK (1 << 3 | 1) // TS and MP
+#define SVM_CR0_SELECTIVE_MASK (1 << 3 | 1) /* TS and MP */
 
 #define SVM_VMLOAD ".byte 0x0f, 0x01, 0xda"
 #define SVM_VMRUN  ".byte 0x0f, 0x01, 0xd8"