From patchwork Mon May 18 16:56:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 24605 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 n4IHC6ww000633 for ; Mon, 18 May 2009 17:12:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbZERRLx (ORCPT ); Mon, 18 May 2009 13:11:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751656AbZERRLx (ORCPT ); Mon, 18 May 2009 13:11:53 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55604 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbZERRLu (ORCPT ); Mon, 18 May 2009 13:11:50 -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 n4IHBquu010274 for ; Mon, 18 May 2009 13:11:52 -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 n4IHBpWv018640; Mon, 18 May 2009 13:11:51 -0400 Received: from amt.cnet (vpn-10-172.str.redhat.com [10.32.10.172]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4IHBnE2017739; Mon, 18 May 2009 13:11:50 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 563BD274007; Mon, 18 May 2009 14:11:07 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n4IHB0Ed014680; Mon, 18 May 2009 14:11:00 -0300 Message-Id: <20090518170855.231169861@localhost.localdomain> References: <20090518165601.747763120@localhost.localdomain> User-Agent: quilt/0.46-1 Date: Mon, 18 May 2009 13:56:02 -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-lcok 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); } /*