Re: [PATCH 5/6 v5][KVM nVMX]: nested_vmx_check_vmentry_postreqs() should return VMX_EXIT_REASONS_FAILED_VMENTRY | EXIT_REASON_INVALID_STATE for error conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux