aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/i8259.c10
-rw-r--r--arch/x86/kvm/irq.h1
2 files changed, 1 insertions, 10 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index daf4606b0293..d27320c8d464 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -43,11 +43,9 @@ static void pic_unlock(struct kvm_pic *s)
43{ 43{
44 struct kvm *kvm = s->kvm; 44 struct kvm *kvm = s->kvm;
45 unsigned acks = s->pending_acks; 45 unsigned acks = s->pending_acks;
46 bool wakeup = s->wakeup_needed;
47 struct kvm_vcpu *vcpu; 46 struct kvm_vcpu *vcpu;
48 47
49 s->pending_acks = 0; 48 s->pending_acks = 0;
50 s->wakeup_needed = false;
51 49
52 spin_unlock(&s->lock); 50 spin_unlock(&s->lock);
53 51
@@ -56,12 +54,6 @@ static void pic_unlock(struct kvm_pic *s)
56 __ffs(acks)); 54 __ffs(acks));
57 acks &= acks - 1; 55 acks &= acks - 1;
58 } 56 }
59
60 if (wakeup) {
61 vcpu = s->kvm->bsp_vcpu;
62 if (vcpu)
63 kvm_vcpu_kick(vcpu);
64 }
65} 57}
66 58
67static void pic_clear_isr(struct kvm_kpic_state *s, int irq) 59static void pic_clear_isr(struct kvm_kpic_state *s, int irq)
@@ -527,7 +519,7 @@ static void pic_irq_request(void *opaque, int level)
527 s->output = level; 519 s->output = level;
528 if (vcpu && level && (s->pics[0].isr_ack & (1 << irq))) { 520 if (vcpu && level && (s->pics[0].isr_ack & (1 << irq))) {
529 s->pics[0].isr_ack &= ~(1 << irq); 521 s->pics[0].isr_ack &= ~(1 << irq);
530 s->wakeup_needed = true; 522 kvm_vcpu_kick(vcpu);
531 } 523 }
532} 524}
533 525
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h
index 9f593188129e..7d6058a2fd38 100644
--- a/arch/x86/kvm/irq.h
+++ b/arch/x86/kvm/irq.h
@@ -63,7 +63,6 @@ struct kvm_kpic_state {
63 63
64struct kvm_pic { 64struct kvm_pic {
65 spinlock_t lock; 65 spinlock_t lock;
66 bool wakeup_needed;
67 unsigned pending_acks; 66 unsigned pending_acks;
68 struct kvm *kvm; 67 struct kvm *kvm;
69 struct kvm_kpic_state pics[2]; /* 0 is master pic, 1 is slave pic */ 68 struct kvm_kpic_state pics[2]; /* 0 is master pic, 1 is slave pic */