kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT
authorJim Mattson <jmattson@google.com>
Mon, 26 Nov 2018 19:22:32 +0000 (11:22 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Dec 2018 10:28:24 +0000 (11:28 +0100)
commit9ebdfe5230f2e50e3ba05c57723a06e90946815a
tree180641b4eacb2939d3c1ea6691fe80ccd564b727
parente081354d6aa7b67c6d0ef51ff8c428b6c261a6fe
kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT

According to the SDM, "NMI-window exiting" VM-exits wake a logical
processor from the same inactive states as would an NMI and
"interrupt-window exiting" VM-exits wake a logical processor from the
same inactive states as would an external interrupt. Specifically, they
wake a logical processor from the shutdown state and from the states
entered using the HLT and MWAIT instructions.

Fixes: 6dfacadd5858 ("KVM: nVMX: Add support for activity state HLT")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
[Squashed comments of two Jim's patches and used the simplified code
 hunk provided by Sean. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx/nested.c