Commit 2c4fd91d authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: VMX: Expose various module param vars via capabilities.h

Expose the variables associated with various module params that are
needed by the nested VMX code.  There is no ulterior logic for what
variables are/aren't exposed, this is purely "what's needed by the
nested code".

Note that @nested is intentionally not exposed.
Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 3077c191
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
#include "lapic.h" #include "lapic.h"
extern bool __read_mostly enable_vpid;
extern bool __read_mostly flexpriority_enabled;
extern bool __read_mostly enable_ept;
extern bool __read_mostly enable_unrestricted_guest;
extern bool __read_mostly enable_ept_ad_bits;
extern bool __read_mostly enable_pml;
struct nested_vmx_msrs { struct nested_vmx_msrs {
/* /*
* We only store the "true" versions of the VMX capability MSRs. We * We only store the "true" versions of the VMX capability MSRs. We
......
...@@ -73,23 +73,23 @@ static const struct x86_cpu_id vmx_cpu_id[] = { ...@@ -73,23 +73,23 @@ static const struct x86_cpu_id vmx_cpu_id[] = {
}; };
MODULE_DEVICE_TABLE(x86cpu, vmx_cpu_id); MODULE_DEVICE_TABLE(x86cpu, vmx_cpu_id);
static bool __read_mostly enable_vpid = 1; bool __read_mostly enable_vpid = 1;
module_param_named(vpid, enable_vpid, bool, 0444); module_param_named(vpid, enable_vpid, bool, 0444);
static bool __read_mostly enable_vnmi = 1; static bool __read_mostly enable_vnmi = 1;
module_param_named(vnmi, enable_vnmi, bool, S_IRUGO); module_param_named(vnmi, enable_vnmi, bool, S_IRUGO);
static bool __read_mostly flexpriority_enabled = 1; bool __read_mostly flexpriority_enabled = 1;
module_param_named(flexpriority, flexpriority_enabled, bool, S_IRUGO); module_param_named(flexpriority, flexpriority_enabled, bool, S_IRUGO);
static bool __read_mostly enable_ept = 1; bool __read_mostly enable_ept = 1;
module_param_named(ept, enable_ept, bool, S_IRUGO); module_param_named(ept, enable_ept, bool, S_IRUGO);
static bool __read_mostly enable_unrestricted_guest = 1; bool __read_mostly enable_unrestricted_guest = 1;
module_param_named(unrestricted_guest, module_param_named(unrestricted_guest,
enable_unrestricted_guest, bool, S_IRUGO); enable_unrestricted_guest, bool, S_IRUGO);
static bool __read_mostly enable_ept_ad_bits = 1; bool __read_mostly enable_ept_ad_bits = 1;
module_param_named(eptad, enable_ept_ad_bits, bool, S_IRUGO); module_param_named(eptad, enable_ept_ad_bits, bool, S_IRUGO);
static bool __read_mostly emulate_invalid_guest_state = true; static bool __read_mostly emulate_invalid_guest_state = true;
...@@ -116,7 +116,7 @@ module_param(nested_early_check, bool, S_IRUGO); ...@@ -116,7 +116,7 @@ module_param(nested_early_check, bool, S_IRUGO);
static u64 __read_mostly host_xss; static u64 __read_mostly host_xss;
static bool __read_mostly enable_pml = 1; bool __read_mostly enable_pml = 1;
module_param_named(pml, enable_pml, bool, S_IRUGO); module_param_named(pml, enable_pml, bool, S_IRUGO);
#define MSR_TYPE_R 1 #define MSR_TYPE_R 1
......
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