From patchwork Thu May 28 04:45:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 26659 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 n4S4st9t009101 for ; Thu, 28 May 2009 04:54:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbZE1Eyw (ORCPT ); Thu, 28 May 2009 00:54:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751522AbZE1Eyv (ORCPT ); Thu, 28 May 2009 00:54:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]:35476 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750833AbZE1Eyt (ORCPT ); Thu, 28 May 2009 00:54:49 -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 n4S4spYb020734 for ; Thu, 28 May 2009 00:54:51 -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 n4S4sosa007299; Thu, 28 May 2009 00:54:51 -0400 Received: from amt.cnet (vpn-10-6.str.redhat.com [10.32.10.6]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4S4sn37020722; Thu, 28 May 2009 00:54:50 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id F3909558033; Thu, 28 May 2009 01:54:13 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n4S4sCEr011496; Thu, 28 May 2009 01:54:12 -0300 Message-Id: <20090528044808.079885404@localhost.localdomain> References: <20090528044552.151652861@localhost.localdomain> In-Reply-To: <4A19553F.1090903@redhat.com> User-Agent: quilt/0.46-1 Date: Thu, 28 May 2009 01:45:53 -0300 From: Marcelo Tosatti To: kvm@vger.kernel.org Cc: 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); } /*