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

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

KVM: No need to kick cpu if not in a guest mode



This will save a couple of IPIs.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Acked-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 1000ff8d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3506,6 +3506,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
	smp_mb__after_clear_bit();

	if (vcpu->requests || need_resched() || signal_pending(current)) {
		set_bit(KVM_REQ_KICK, &vcpu->requests);
		local_irq_enable();
		preempt_enable();
		r = 1;