]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Check kvm_rebooting in kvm_spurious_fault()
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 19 Jul 2019 20:41:06 +0000 (13:41 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 Sep 2019 13:23:33 +0000 (15:23 +0200)
commit9c2f388ec346178f847342b241615a5fdd0f5c8f
tree0bd8139ce3b40338e07c1e30b4f9e85fa08f6369
parent587c414843ff4c43dd34f8ddb68fedc8e3b3d7ba
KVM: x86: Check kvm_rebooting in kvm_spurious_fault()

Explicitly check kvm_rebooting in kvm_spurious_fault() prior to invoking
BUG(), as opposed to assuming the caller has already done so.  Letting
kvm_spurious_fault() be called "directly" will allow VMX to better
optimize its low level assembly flows.

As a happy side effect, kvm_spurious_fault() no longer needs to be
marked as a dead end since it doesn't unconditionally BUG().

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c
tools/objtool/check.c