aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/i8259.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-06-04 15:08:21 -0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:32:48 +0300
commit9f4cc12765ea48a40347449d6802a3322ced8709 (patch)
tree8b22c88af2cb593905a61998729563b1717a22bd /arch/x86/kvm/i8259.c
parent238adc77051ab19b35663e7f214f52eaf44ed7ef (diff)
KVM: Grab pic lock in kvm_pic_clear_isr_ack
isr_ack is protected by kvm_pic->lock. Signed-off-by: Marcelo Tosatti <mtosatti@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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 2520922282d..bf94a45f4f8 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -72,8 +72,10 @@ static void pic_clear_isr(struct kvm_kpic_state *s, int irq)
void kvm_pic_clear_isr_ack(struct kvm *kvm)
{
struct kvm_pic *s = pic_irqchip(kvm);
+ pic_lock(s);
s->pics[0].isr_ack = 0xff;
s->pics[1].isr_ack = 0xff;
+ pic_unlock(s);
}
/*