public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kay Sievers <kay.sievers@vrfy.org>
Subject: [PATCH] kvm-amd: Auto-load on CPUs with SVM.
Date: Wed, 28 Mar 2012 11:32:28 -0700	[thread overview]
Message-ID: <20120328183228.GA24889@leaf> (raw)
In-Reply-To: <4F72F549.6060407@redhat.com>

Enable x86 feature-based autoloading for the kvm-amd module on CPUs
with X86_FEATURE_SVM.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---

On Wed, Mar 28, 2012 at 01:26:01PM +0200, Avi Kivity wrote:
> On 03/21/2012 08:33 AM, Josh Triplett wrote:
> > Enable x86 feature-based autoloading for the kvm-intel module on CPUs
> > with X86_FEATURE_VMX.
> 
> Thanks, applied.

As promised, the corresponding patch for kvm-amd.

 arch/x86/kvm/svm.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index e385214..cd95ea7 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -22,6 +22,7 @@
 #include "x86.h"
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/highmem.h>
@@ -42,6 +43,12 @@
 MODULE_AUTHOR("Qumranet");
 MODULE_LICENSE("GPL");
 
+static const struct x86_cpu_id svm_cpu_id[] = {
+	X86_FEATURE_MATCH(X86_FEATURE_SVM),
+	{}
+};
+MODULE_DEVICE_TABLE(x86cpu, svm_cpu_id);
+
 #define IOPM_ALLOC_ORDER 2
 #define MSRPM_ALLOC_ORDER 1
 

  reply	other threads:[~2012-03-28 18:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21  6:33 [PATCH] kvm-intel: Auto-load on CPUs with VMX Josh Triplett
2012-03-21 13:41 ` Avi Kivity
2012-03-27 12:25   ` Kay Sievers
2012-03-28 11:26 ` Avi Kivity
2012-03-28 18:32   ` Josh Triplett [this message]
2012-03-29  6:33     ` [PATCH] kvm-amd: Auto-load on CPUs with SVM Michael Tokarev
2012-03-29  7:03       ` Josh Triplett
2012-04-12  1:15     ` Marcelo Tosatti

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=20120328183228.GA24889@leaf \
    --to=josh@joshtriplett.org \
    --cc=avi@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kay.sievers@vrfy.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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