diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-08-04 08:30:27 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:21 -0400 |
commit | 956f97cf665dc8c8ce2d5138bb38c022673b12d7 (patch) | |
tree | 0d907c09659b8bd9226e3024996e15b3ea9a2bd0 /arch/x86/kvm/i8259.c | |
parent | 3a34a8810b2ed316bfe58fa53640e8d30de3f6c2 (diff) |
KVM: Call kvm_vcpu_kick() inside pic spinlock
d5ecfdd25 moved it out because back than it was impossible to
call it inside spinlock. This restriction no longer exists.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8259.c')
-rw-r--r-- | arch/x86/kvm/i8259.c | 10 |
1 files changed, 1 insertions, 9 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 | ||
67 | static void pic_clear_isr(struct kvm_kpic_state *s, int irq) | 59 | static 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 | ||