aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-07-07 08:27:32 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:11 -0400
commitc7f0f24b1f82ec049fcfb8e6d4e1cee2815efbe5 (patch)
tree1e0bc486421e7e2f87418b186fbb338baceda9d2 /arch/x86/kvm/x86.c
parent1000ff8d893765d7b56e32fe16dbe4814f172588 (diff)
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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 95fa45c0f16e..e3d9040f2156 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3506,6 +3506,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
3506 smp_mb__after_clear_bit(); 3506 smp_mb__after_clear_bit();
3507 3507
3508 if (vcpu->requests || need_resched() || signal_pending(current)) { 3508 if (vcpu->requests || need_resched() || signal_pending(current)) {
3509 set_bit(KVM_REQ_KICK, &vcpu->requests);
3509 local_irq_enable(); 3510 local_irq_enable();
3510 preempt_enable(); 3511 preempt_enable();
3511 r = 1; 3512 r = 1;