|
@@ -11197,7 +11197,12 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- if (vmcs12->guest_activity_state == GUEST_ACTIVITY_HLT)
|
|
|
+ /*
|
|
|
+ * If we're entering a halted L2 vcpu and the L2 vcpu won't be woken
|
|
|
+ * by event injection, halt vcpu.
|
|
|
+ */
|
|
|
+ if ((vmcs12->guest_activity_state == GUEST_ACTIVITY_HLT) &&
|
|
|
+ !(vmcs12->vm_entry_intr_info_field & INTR_INFO_VALID_MASK))
|
|
|
return kvm_vcpu_halt(vcpu);
|
|
|
|
|
|
vmx->nested.nested_run_pending = 1;
|