]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: vmx: Fix entry number check for add_atomic_switch_msr()
authorXiaoyao Li <xiaoyao.li@linux.intel.com>
Thu, 14 Feb 2019 04:08:58 +0000 (12:08 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Feb 2019 15:22:20 +0000 (16:22 +0100)
commit7a25dbd2ce54e698c5dc9b5ddb5244bd3b9ad1d3
tree1a076c69b46dafb9794282646d61de91d5622d82
parent47f2b2467019a9e88345e5095c2c5379d323f86c
kvm: vmx: Fix entry number check for add_atomic_switch_msr()

Commit f3bb4e8bdf758c8aa287 ("x86/KVM/VMX: Add find_msr() helper function")
introduces the helper function find_msr(), which returns -ENOENT when
not find the msr in vmx->msr_autoload.guest/host. Correct checking contion
of no more available entry in vmx->msr_autoload.

Fixes: f3bb4e8bdf75 ("x86/KVM/VMX: Add find_msr() helper function")
Cc: stable@vger.kernel.org
Signed-off-by: Xiaoyao Li <xiaoyao.li@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c