]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Clean up vmx_refresh_apicv_exec_ctrl()
authorZeng Guang <guang.zeng@intel.com>
Tue, 19 Apr 2022 15:36:04 +0000 (23:36 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:47:26 +0000 (04:47 -0400)
commit34dd212cd25a0f6572d7583e47f2bce70b1dc0c0
tree2fc9fc939a57ec7fbd1e8d3d6c0cdc53fd63e213
parent2198a5d9ab46b366d73c8ce8652456232831e173
KVM: VMX: Clean up vmx_refresh_apicv_exec_ctrl()

Remove the condition check cpu_has_secondary_exec_ctrls(). Calling
vmx_refresh_apicv_exec_ctrl() premises secondary controls activated
and VMCS fields related to APICv valid as well. If it's invoked in
wrong circumstance at the worst case, VMX operation will report
VMfailValid error without further harmful impact and just functions
as if all the secondary controls were 0.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Zeng Guang <guang.zeng@intel.com>
Message-Id: <20220419153604.11786-1-guang.zeng@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c