From: David Hildenbrand Date: Thu, 24 Aug 2017 18:51:28 +0000 (+0200) Subject: KVM: VMX: drop enable_ept check from ept_sync_context() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0e1252dc46b9c9a805d704cf3a123132ebb0f8cf;p=openwrt%2Fstaging%2Fblogic.git KVM: VMX: drop enable_ept check from ept_sync_context() This function is only called with enable_ept. Reviewed-by: Radim Krčmář Signed-off-by: David Hildenbrand Signed-off-by: Radim Krčmář --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ecac113fd0db..c757070a32a7 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1604,12 +1604,10 @@ static inline void ept_sync_global(void) static inline void ept_sync_context(u64 eptp) { - if (enable_ept) { - if (cpu_has_vmx_invept_context()) - __invept(VMX_EPT_EXTENT_CONTEXT, eptp, 0); - else - ept_sync_global(); - } + if (cpu_has_vmx_invept_context()) + __invept(VMX_EPT_EXTENT_CONTEXT, eptp, 0); + else + ept_sync_global(); } static __always_inline void vmcs_check16(unsigned long field)