aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Dakinevich <jan.dakinevich@gmail.com>2016-10-28 00:00:30 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2016-12-08 09:31:11 -0500
commit16c2aec6a295f8a4916dbcbaa5051cf5c78be56a (patch)
tree91d70a6b35e8682f05505d48bc8fda9e1fdc49df
parent1dc35dacc16b4f13547125c5df2d026d9e46ea01 (diff)
KVM: nVMX: invvpid handling improvements
- Expose all invalidation types to the L1 - Reject invvpid instruction, if L1 passed zero vpid value to single context invalidations Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/vmx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 7280a355737e..25d48380c312 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -139,6 +139,16 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO);
139 VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT) 139 VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT)
140 140
141/* 141/*
142 * Hyper-V requires all of these, so mark them as supported even though
143 * they are just treated the same as all-context.
144 */
145#define VMX_VPID_EXTENT_SUPPORTED_MASK \
146 (VMX_VPID_EXTENT_INDIVIDUAL_ADDR_BIT | \
147 VMX_VPID_EXTENT_SINGLE_CONTEXT_BIT | \
148 VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT | \
149 VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT)
150
151/*
142 * These 2 parameters are used to config the controls for Pause-Loop Exiting: 152 * These 2 parameters are used to config the controls for Pause-Loop Exiting:
143 * ple_gap: upper bound on the amount of time between two successive 153 * ple_gap: upper bound on the amount of time between two successive
144 * executions of PAUSE in a loop. Also indicate if ple enabled. 154 * executions of PAUSE in a loop. Also indicate if ple enabled.