diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2007-06-22 05:29:50 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-16 05:05:49 -0400 |
commit | 6031a61c2ef4cf22b69ef5494aefa54b84a27d2f (patch) | |
tree | 2e0ccd861da726e76785a0a68a46da06951f1eb0 /drivers/kvm/svm.h | |
parent | 796fd1b23e463e98b3e2fc86ed571db06dc945bb (diff) |
KVM: SVM: Reliably detect if SVM was disabled by BIOS
This patch adds an implementation to the svm is_disabled function to
detect reliably if the BIOS disabled the SVM feature in the CPU. This
fixes the issues with kernel panics when loading the kvm-amd module on
machines where SVM is available but disabled.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.h')
-rw-r--r-- | drivers/kvm/svm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/svm.h b/drivers/kvm/svm.h index 5e93814400ce..3b1b0f35b6cb 100644 --- a/drivers/kvm/svm.h +++ b/drivers/kvm/svm.h | |||
@@ -175,8 +175,11 @@ struct __attribute__ ((__packed__)) vmcb { | |||
175 | #define SVM_CPUID_FUNC 0x8000000a | 175 | #define SVM_CPUID_FUNC 0x8000000a |
176 | 176 | ||
177 | #define MSR_EFER_SVME_MASK (1ULL << 12) | 177 | #define MSR_EFER_SVME_MASK (1ULL << 12) |
178 | #define MSR_VM_CR 0xc0010114 | ||
178 | #define MSR_VM_HSAVE_PA 0xc0010117ULL | 179 | #define MSR_VM_HSAVE_PA 0xc0010117ULL |
179 | 180 | ||
181 | #define SVM_VM_CR_SVM_DISABLE 4 | ||
182 | |||
180 | #define SVM_SELECTOR_S_SHIFT 4 | 183 | #define SVM_SELECTOR_S_SHIFT 4 |
181 | #define SVM_SELECTOR_DPL_SHIFT 5 | 184 | #define SVM_SELECTOR_DPL_SHIFT 5 |
182 | #define SVM_SELECTOR_P_SHIFT 7 | 185 | #define SVM_SELECTOR_P_SHIFT 7 |