diff options
author | Josh Triplett <josh@joshtriplett.org> | 2012-03-21 02:33:51 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 07:03:12 -0400 |
commit | e9bda3b3d0ce775afe15eaf71922d342cc74991c (patch) | |
tree | 1da4ddbcad0085374bfa196979fb50e8f82cef7a /arch/x86 | |
parent | bbcc9c06695243ea23d30de36842df9200c33857 (diff) |
KVM: VMX: Auto-load on CPUs with VMX
Enable x86 feature-based autoloading for the kvm-intel module on CPUs
with X86_FEATURE_VMX.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Acked-By: Kay Sievers <kay@vrfy.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ad85adfef843..52f685635766 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/highmem.h> | 27 | #include <linux/highmem.h> |
28 | #include <linux/sched.h> | 28 | #include <linux/sched.h> |
29 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
30 | #include <linux/mod_devicetable.h> | ||
30 | #include <linux/ftrace_event.h> | 31 | #include <linux/ftrace_event.h> |
31 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
32 | #include <linux/tboot.h> | 33 | #include <linux/tboot.h> |
@@ -51,6 +52,12 @@ | |||
51 | MODULE_AUTHOR("Qumranet"); | 52 | MODULE_AUTHOR("Qumranet"); |
52 | MODULE_LICENSE("GPL"); | 53 | MODULE_LICENSE("GPL"); |
53 | 54 | ||
55 | static const struct x86_cpu_id vmx_cpu_id[] = { | ||
56 | X86_FEATURE_MATCH(X86_FEATURE_VMX), | ||
57 | {} | ||
58 | }; | ||
59 | MODULE_DEVICE_TABLE(x86cpu, vmx_cpu_id); | ||
60 | |||
54 | static bool __read_mostly enable_vpid = 1; | 61 | static bool __read_mostly enable_vpid = 1; |
55 | module_param_named(vpid, enable_vpid, bool, 0444); | 62 | module_param_named(vpid, enable_vpid, bool, 0444); |
56 | 63 | ||