]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KVM: nVMX: invvpid handling improvements
authorJan Dakinevich <jan.dakinevich@gmail.com>
Fri, 28 Oct 2016 04:00:30 +0000 (07:00 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Dec 2016 14:31:11 +0000 (15:31 +0100)
 - 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>
arch/x86/kvm/vmx.c

index 7280a355737e347815569862acd135ef3a1d5319..25d48380c3127a68965c577b3f9acb41f07aed5a 100644 (file)
@@ -138,6 +138,16 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO);
        VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT |    \
        VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT)
 
+/*
+ * Hyper-V requires all of these, so mark them as supported even though
+ * they are just treated the same as all-context.
+ */
+#define VMX_VPID_EXTENT_SUPPORTED_MASK         \
+       (VMX_VPID_EXTENT_INDIVIDUAL_ADDR_BIT |  \
+       VMX_VPID_EXTENT_SINGLE_CONTEXT_BIT |    \
+       VMX_VPID_EXTENT_GLOBAL_CONTEXT_BIT |    \
+       VMX_VPID_EXTENT_SINGLE_NON_GLOBAL_BIT)
+
 /*
  * These 2 parameters are used to config the controls for Pause-Loop Exiting:
  * ple_gap:    upper bound on the amount of time between two successive