Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af2152f5 authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity
Browse files

KVM: don't enter guest after SIPI was received by a CPU



The vcpu should process pending SIPI message before entering guest mode again.
kvm_arch_vcpu_runnable() returns true if the vcpu is in SIPI state, so
we can't call it here.

Signed-off-by: default avatarGleb Natapov <gleb@qumranet.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 9ea1de4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3233,7 +3233,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)


	r = 1;
	r = 1;
	while (r > 0) {
	while (r > 0) {
		if (kvm_arch_vcpu_runnable(vcpu))
		if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE)
			r = vcpu_enter_guest(vcpu, kvm_run);
			r = vcpu_enter_guest(vcpu, kvm_run);
		else {
		else {
			up_read(&vcpu->kvm->slots_lock);
			up_read(&vcpu->kvm->slots_lock);