diff options
author | Josh Triplett <josh@joshtriplett.org> | 2012-03-28 11:32:28 -0700 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-04-16 20:35:04 -0300 |
commit | ae75954457eee0a608072368c5b477e40f378d7b (patch) | |
tree | c1302a9e2fa73fc0c6a03dc4f2e37309f5bd274e /arch | |
parent | 9de6fe91afcdc38efe398a9d42014a7c920a64db (diff) | |
download | op-kernel-dev-ae75954457eee0a608072368c5b477e40f378d7b.zip op-kernel-dev-ae75954457eee0a608072368c5b477e40f378d7b.tar.gz |
KVM: SVM: Auto-load on CPUs with SVM
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>
Diffstat (limited to 'arch')
-rw-r--r-- | 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 f316720..f75af40 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 |