From patchwork Thu Jun 4 18:08:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 27988 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 n54IFsnT002204 for ; Thu, 4 Jun 2009 18:15:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753405AbZFDSMu (ORCPT ); Thu, 4 Jun 2009 14:12:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753456AbZFDSMt (ORCPT ); Thu, 4 Jun 2009 14:12:49 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50791 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbZFDSMs (ORCPT ); Thu, 4 Jun 2009 14:12:48 -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 n54ICouW019367 for ; Thu, 4 Jun 2009 14:12:50 -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 n54ICnkt002647; Thu, 4 Jun 2009 14:12:50 -0400 Received: from amt.cnet (vpn-10-27.str.redhat.com [10.32.10.27]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n54IClL9006167; Thu, 4 Jun 2009 14:12:48 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id CEA4A680155; Thu, 4 Jun 2009 15:11:49 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n54IBnBd014193; Thu, 4 Jun 2009 15:11:49 -0300 Message-Id: <20090604180938.836199363@localhost.localdomain> References: <20090604180820.644455695@localhost.localdomain> User-Agent: quilt/0.46-1 Date: Thu, 04 Jun 2009 15:08:21 -0300 From: Marcelo Tosatti To: avi@redhat.com, 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); } /*