From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] kvm:x86/svm: enable SVM lock if host supports it Date: Wed, 17 Apr 2013 21:48:21 +0200 Message-ID: <20130417194821.GU6858@8bytes.org> References: <1366220013-2107-1-git-send-email-prasadjoshi.linux@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, mtosatti@redhat.com, gleb@redhat.com To: prasadjoshi.linux@gmail.com Return-path: Received: from 8bytes.org ([85.214.48.195]:47731 "EHLO mail.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758735Ab3DQTsY (ORCPT ); Wed, 17 Apr 2013 15:48:24 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.8bytes.org (Postfix) with SMTP id DB49712B0AF for ; Wed, 17 Apr 2013 21:48:22 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1366220013-2107-1-git-send-email-prasadjoshi.linux@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 17, 2013 at 11:03:33PM +0530, prasadjoshi.linux@gmail.com wrote: > 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; > + No. SVM lock is way more complex to emulate than just setting the CPUID bit. Joerg