diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2019-05-07 12:17:56 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-06-18 11:47:42 +0200 |
commit | 2183f5645ae7e074ed1777f3de9a782dd23db248 (patch) | |
tree | 6643b8e5b7f221af98d4337ef111cf0a2d76105c /arch/x86/kvm/vmx/vmx.h | |
parent | c5f2c76643b612ffa47e4660c8f44deba619b068 (diff) | |
download | linux-stable-2183f5645ae7e074ed1777f3de9a782dd23db248.tar.gz linux-stable-2183f5645ae7e074ed1777f3de9a782dd23db248.tar.bz2 linux-stable-2183f5645ae7e074ed1777f3de9a782dd23db248.zip |
KVM: VMX: Shadow VMCS primary execution controls
Prepare to shadow all major control fields on a per-VMCS basis, which
allows KVM to avoid VMREADs when switching between vmcs01 and vmcs02,
and more importantly can eliminate costly VMWRITEs to controls when
preparing vmcs02.
Shadowing exec controls also saves a VMREAD when opening virtual
INTR/NMI windows, yay...
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.h')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h index 1cdcaf8a6d97..754cc52f2640 100644 --- a/arch/x86/kvm/vmx/vmx.h +++ b/arch/x86/kvm/vmx/vmx.h @@ -89,6 +89,7 @@ struct vmx_controls_shadow { u32 vm_entry; u32 vm_exit; u32 pin; + u32 exec; }; /* @@ -425,6 +426,7 @@ static inline void lname##_controls_clearbit(struct vcpu_vmx *vmx, u32 val) \ BUILD_CONTROLS_SHADOW(vm_entry, VM_ENTRY_CONTROLS) BUILD_CONTROLS_SHADOW(vm_exit, VM_EXIT_CONTROLS) BUILD_CONTROLS_SHADOW(pin, PIN_BASED_VM_EXEC_CONTROL) +BUILD_CONTROLS_SHADOW(exec, CPU_BASED_VM_EXEC_CONTROL) static inline void vmx_segment_cache_clear(struct vcpu_vmx *vmx) { |