No need to kick cpu if not in a guest mode.
PATCH 1/1 No need to kick cpu if not in a guest mode.
This will save a couple of IPIs.
Signed-off-by Gleb Natapov <[email protected]>
arch/x86/kvm/x86.c +1 -0
@@ -3498,6 +3498,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 ;
--
Gleb.
ACK
Quoted 17 lines · Gleb Natapov
This will save a couple of IPIs.
Signed-off-by Gleb Natapov <[email protected]>arch/x86/kvm/x86.c +1
-1@@ -3498,6 +3498,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 ; --Gleb.
Avi Kivity
AppliedQuoted 3 lines · Gleb Natapov
This will save a couple of IPIs.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function