From patchwork Wed May 20 18:48:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 25071 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4KIt985026875 for ; Wed, 20 May 2009 18:55:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755940AbZETSzA (ORCPT ); Wed, 20 May 2009 14:55:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755660AbZETSy7 (ORCPT ); Wed, 20 May 2009 14:54:59 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50264 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755110AbZETSy6 (ORCPT ); Wed, 20 May 2009 14:54:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4KIswum009802; Wed, 20 May 2009 14:54:58 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4KIsvtW019068; Wed, 20 May 2009 14:54:57 -0400 Received: from amt.cnet (vpn-10-28.str.redhat.com [10.32.10.28]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4KIstsR021848; Wed, 20 May 2009 14:54:56 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 499C3274E5C; Wed, 20 May 2009 15:54:20 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n4KIsI8M028783; Wed, 20 May 2009 15:54:18 -0300 Message-Id: <20090520185134.527194535@localhost.localdomain> References: <20090520184841.954066003@localhost.localdomain> User-Agent: quilt/0.46-1 Date: Wed, 20 May 2009 15:48:42 -0300 From: Marcelo Tosatti To: Avi Kivity , kvm@vger.kernel.org Cc: Gregory Haskins , Marcelo Tosatti Subject: [patch 1/4] KVM: x86: grab pic lock in kvm_pic_clear_isr_ack Content-Disposition: inline; filename=pic-clear-isr-lock X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org isr_ack is protected by kvm_pic->lock Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/i8259.c =================================================================== --- kvm.orig/arch/x86/kvm/i8259.c +++ kvm/arch/x86/kvm/i8259.c @@ -72,8 +72,10 @@ static void pic_clear_isr(struct kvm_kpi 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); } /*