]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: vmx: update sec exec controls for UMIP iff emulating UMIP
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 30 Apr 2018 17:01:06 +0000 (10:01 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 May 2018 09:21:13 +0000 (11:21 +0200)
commit7485dc5e0707e4215159f971d434df2bc0eae79f
treebd19f53cf661297dacc895066697f26aec342b94
parent7f27a31dc3823c4d75f110e12786561419ddeb81
KVM: vmx: update sec exec controls for UMIP iff emulating UMIP

Update SECONDARY_EXEC_DESC for UMIP emulation if and only UMIP
is actually being emulated.  Skipping the VMCS update eliminates
unnecessary VMREAD/VMWRITE when UMIP is supported in hardware,
and on platforms that don't have SECONDARY_VM_EXEC_CONTROL.  The
latter case resolves a bug where KVM would fill the kernel log
with warnings due to failed VMWRITEs on older platforms.

Fixes: f9d109515d81 ("KVM: vmx: add support for emulating UMIP")
Cc: stable@vger.kernel.org #4.16
Reported-by: Paolo Zeppegno <pzeppegno@gmail.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Suggested-by: Radim KrÄmář <rkrcmar@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c