[PATCH 9/9] Allow setting the SVME bit v2

Alexander Graf
2008-09-05T07:51:28Z

Normally setting the SVME bit in EFER is not allowed, as we did
not support SVM. Not since we do, we should also allow enabling
SVM mode.

v2 comes as last patch, so we don't enable half-ready code

Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/x86/kvm/svm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 8318a63..d37329e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -460,6 +460,8 @@ static __init int svm_hardware_setup(void)
if (boot_cpu_has(X86_FEATURE_NX))
kvm_enable_efer_bits(EFER_NX);

+ kvm_enable_efer_bits(MSR_EFER_SVME_MASK);
+
for_each_online_cpu(cpu) {
r = svm_cpu_init(cpu);
if (r)
--
1.5.6