]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: preserve SECONDARY_EXEC_DESC without UMIP
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 31 Jan 2018 17:12:50 +0000 (18:12 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 24 Feb 2018 00:43:35 +0000 (01:43 +0100)
commitfb3bab2e516f4028eebd8ab69664d7e91b787ed5
tree612cfc939f2a86c094ab3472eda085120b0bd135
parent6d95e39db9136419d05bb86f2656f42a19aa17ee
KVM: nVMX: preserve SECONDARY_EXEC_DESC without UMIP

L1 might want to use SECONDARY_EXEC_DESC, so we must not clear the VMCS
bit if UMIP is not being emulated.

We must still set the bit when emulating UMIP as the feature can be
passed to L2 where L0 will do the emulation and because L2 can change
CR4 without a VM exit, we should clear the bit if UMIP is disabled.

Fixes: f9d109515d81 ("KVM: vmx: add support for emulating UMIP")
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c