summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-07-07 15:27:32 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:33:11 +0300
commitc7f0f24b1f82ec049fcfb8e6d4e1cee2815efbe5 (patch)
tree1e0bc486421e7e2f87418b186fbb338baceda9d2 /arch
parent1000ff8d893765d7b56e32fe16dbe4814f172588 (diff)
downloadblackbird-obmc-linux-c7f0f24b1f82ec049fcfb8e6d4e1cee2815efbe5.tar.gz
blackbird-obmc-linux-c7f0f24b1f82ec049fcfb8e6d4e1cee2815efbe5.zip
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')
-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;
OpenPOWER on IntegriCloud