Skip to contentSkip to conversation

No need to kick cpu if not in a guest mode.

PATCH Applied Gleb Natapov 3 participants 3 messages Jul 7, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 No need to kick cpu if not in a guest mode.

This will save a couple of IPIs.

arch/x86/kvm/x86.c +1 -0
index efb0b68..1e30400 100644
@@ -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.

#1 lore raw

ACK

Quoted 17 lines · Gleb Natapov

This will save a couple of IPIs.

arch/x86/kvm/x86.c +1 -1
index efb0b68..1e30400 100644
@@ -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.

Applied
#2 lore raw
In reply to Gleb Natapov
Quoted 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