public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: prasadjoshi.linux@gmail.com
To: prasadjoshi.linux@gmail.com
Cc: kvm@vger.kernel.org, joro@8bytes.org, mtosatti@redhat.com,
	gleb@redhat.com
Subject: [PATCH] kvm:x86/svm: enable SVM lock if host supports it
Date: Wed, 17 Apr 2013 23:03:33 +0530	[thread overview]
Message-ID: <1366220013-2107-1-git-send-email-prasadjoshi.linux@gmail.com> (raw)

From: Prasad Joshi <prasadjoshi.linux@gmail.com>

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 <prasadjoshi.linux@gmail.com>
---
 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


             reply	other threads:[~2013-04-17 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 17:33 prasadjoshi.linux [this message]
2013-04-17 19:48 ` [PATCH] kvm:x86/svm: enable SVM lock if host supports it Joerg Roedel
2013-04-21  8:49   ` Prasad Joshi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366220013-2107-1-git-send-email-prasadjoshi.linux@gmail.com \
    --to=prasadjoshi.linux@gmail.com \
    --cc=gleb@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox