On 10/04/19 18:08, Sean Christopherson wrote: > Good point, though IMO it'd be better to go one step further and actually > consume the return value in nested_vmx_enter_non_root_mode(). For me, > having the exit reason in nested_vmx_check_vmentry_postreqs() is a nice > mental reminder that "postreqs" is referring to checks that happen once > the CPU has "committed" to VM-Enter. It's certainly better if you don't have to return VMX_EXIT_REASONS_FAILED_VMENTRY. However, I think it still complicates things a bit, after all the result is always EXIT_REASON_INVALID_STATE. The SDM says "VM-entry failure due to invalid guest state. A VM entry failed one of the checks identified in Section 26.3.1" so the bool (or 0/-EINVAL) return code is a nice reminder that the function covers a subset of 26.3.1. Paolo