Commit e9bda3b3 authored by Josh Triplett's avatar Josh Triplett Committed by Avi Kivity

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: default avatarJosh Triplett <josh@joshtriplett.org>
Acked-By: default avatarKay Sievers <kay@vrfy.org>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent bbcc9c06
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/mod_devicetable.h>
#include <linux/ftrace_event.h> #include <linux/ftrace_event.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/tboot.h> #include <linux/tboot.h>
...@@ -51,6 +52,12 @@ ...@@ -51,6 +52,12 @@
MODULE_AUTHOR("Qumranet"); MODULE_AUTHOR("Qumranet");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static const struct x86_cpu_id vmx_cpu_id[] = {
X86_FEATURE_MATCH(X86_FEATURE_VMX),
{}
};
MODULE_DEVICE_TABLE(x86cpu, vmx_cpu_id);
static bool __read_mostly enable_vpid = 1; static bool __read_mostly enable_vpid = 1;
module_param_named(vpid, enable_vpid, bool, 0444); module_param_named(vpid, enable_vpid, bool, 0444);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment