KVM: SVM: Auto-load on CPUs with SVM
authorJosh Triplett <josh@joshtriplett.org>
Wed, 28 Mar 2012 18:32:28 +0000 (11:32 -0700)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 16 Apr 2012 23:35:04 +0000 (20:35 -0300)
Enable x86 feature-based autoloading for the kvm-amd module on CPUs
with X86_FEATURE_SVM.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/svm.c

index f316720..f75af40 100644 (file)
@@ -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>
 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