From mboxrd@z Thu Jan 1 00:00:00 1970 From: prasadjoshi.linux@gmail.com Subject: [PATCH 1/2] kvm:x86/svm: enable SVM lock if host supports it Date: Sun, 21 Apr 2013 14:12:20 +0530 Message-ID: <1366533741-2091-1-git-send-email-prasadjoshi.linux@gmail.com> Cc: kvm@vger.kernel.org, joro@8bytes.org, mtosatti@redhat.com, gleb@redhat.com To: prasadjoshi.linux@gmail.com Return-path: Received: from mail-da0-f52.google.com ([209.85.210.52]:54868 "EHLO mail-da0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752550Ab3DUIma (ORCPT ); Sun, 21 Apr 2013 04:42:30 -0400 Received: by mail-da0-f52.google.com with SMTP id j17so285986dan.11 for ; Sun, 21 Apr 2013 01:42:30 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: From: Prasad Joshi SVM lock features allows software from preventing update to EFER.SVME. Enable the SVM lock in guest if it is supported on host machine. Signed-off-by: Prasad Joshi --- arch/x86/kvm/svm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e1b1ce2..fcdfdea 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -4031,6 +4031,10 @@ static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) if (boot_cpu_has(X86_FEATURE_NRIPS)) entry->edx |= SVM_FEATURE_NRIP; + /* support SVM Lock if host supports it */ + if (boot_cpu_has(X86_FEATURE_SVML)) + entry->edx |= SVM_FEATURE_SVML; + /* Support NPT for the guest if enabled */ if (npt_enabled) entry->edx |= SVM_FEATURE_NPT; -- 1.7.10.4