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 | |
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')
-rw-r--r-- | arch/x86/kvm/i8259.c | 10 | ||||
-rw-r--r-- | arch/x86/kvm/irq.h | 1 |
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 | ||
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 | ||
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 | ||
64 | struct kvm_pic { | 64 | struct 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 */ |