summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2017-05-19 16:48:51 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-05-30 18:17:21 +0300
commitcbf712792b6e61317b93dd56dd5c0784363c9ac9 (patch)
tree9e3120f4bc4032961a5219b6aed54cbb28a9b03f /arch/x86/kvm/svm.c
parent52b5419016997f2960e9c8b6584c4acb3875d126 (diff)
downloadlinux-cbf712792b6e61317b93dd56dd5c0784363c9ac9.tar.xz
KVM: nVMX: fix nested_vmx_check_vmptr failure paths under debugging
kvm_skip_emulated_instruction() will return 0 if userspace is single-stepping the guest. kvm_skip_emulated_instruction() uses return status convention of exit handler: 0 means "exit to userspace" and 1 means "continue vm entries". The problem is that nested_vmx_check_vmptr() return status means something else: 0 is ok, 1 is error. This means we would continue executing after a failure. Static checker noticed it because vmptr was not initialized. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 6affcbedcac7 ("KVM: x86: Add kvm_skip_emulated_instruction and use it.") Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
0 files changed, 0 insertions, 0 deletions