On Thu, Nov 15, 2018 at 10:08 AM, Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote: > If you're going to add a comment it should either be a "TODO" or explain > that KVM diverges from the SDM for an unknown reason, or better yet find > someone that can explain why KVM diverges :). My guess is it's > intentional as KVM is preventing WFS and Shutdown states, which also > diverges from the SDM. The SDM allows for the CPU to enumerate the supported non-active guest activity states in the IA32_VMX_MISC MSR. KVM does not currently enumerate support for shutdown or WFS. The code for the VM-entry check shouldn't implicitly know this, though, particularly since userspace can mask off supported VT-x features by modifying the default VMX capability MSRs. This code should check whether the vmcs12->guest_activity_state is either GUEST_ACTIVITY_ACTIVE or one of the supported states enumerated by vmx->nested.msrs.misc_low (bits 6, 7, and 8).