Переглянути джерело

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

This will save a couple of IPIs.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Gleb Natapov 16 роки тому
батько
коміт
c7f0f24b1f
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      arch/x86/kvm/x86.c

+ 1 - 0
arch/x86/kvm/x86.c

@@ -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;