]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Return -EINVAL when signaling failure in pre-VM-Entry helpers
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Apr 2019 08:19:57 +0000 (10:19 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Apr 2019 13:39:05 +0000 (15:39 +0200)
commit9db14da6682a22889d0c729bce5927027575d297
treeec7d3679dcd52ccd979eea1d1648d1c26b6ac41b
parentcfd31aedadb147600a75be3fd9041e961644675f
KVM: nVMX: Return -EINVAL when signaling failure in pre-VM-Entry helpers

Convert all top-level nested VM-Enter consistency check functions to
return 0/-EINVAL instead of failure codes, since now they can only
ever return one failure code.

This also does not give the false impression that failure information is
always consumed and/or relevant, e.g. vmx_set_nested_state() only
cares whether or not the checks were successful.

nested_check_host_control_regs() can also now be inlined into its caller,
nested_vmx_check_host_state, since the two have effectively become the
same function.

Based on a patch by Sean Christopherson.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c