summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-07-07 15:27:32 +0300
committerAvi Kivity <avi@redhat.com>2009-07-07 18:36:34 +0300
commitbe5ef0d26ae68aa6825630cdfc2d0f93a36e3ac1 (patch)
tree29282dac75f84d90eae3e0fbd8e6143db2b29ef2
parent2466cddde0efa92196d7f0e93b3047ee3a2ab36e (diff)
KVM: No need to kick cpu if not in a guest mode.kvm-88rc3kvm-88rc2kvm-88rc1
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>
-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)
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;