From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v11 3/3] x86, apicv: add virtual interrupt delivery support Date: Mon, 21 Jan 2013 19:08:03 -0200 Message-ID: <20130121210803.GB7110@amt.cnet> References: <1358331672-32384-1-git-send-email-yang.z.zhang@intel.com> <1358331672-32384-4-git-send-email-yang.z.zhang@intel.com> <20130120125136.GA5119@redhat.com> <20130121050300.GA25818@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Zhang, Yang Z" , "kvm@vger.kernel.org" , "Shan, Haitao" , "Zhang, Xiantao" , "Tian, Kevin" To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:26046 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752766Ab3AUVJM (ORCPT ); Mon, 21 Jan 2013 16:09:12 -0500 Content-Disposition: inline In-Reply-To: <20130121050300.GA25818@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jan 21, 2013 at 07:03:00AM +0200, Gleb Natapov wrote: > > >> @@ -115,6 +116,42 @@ static void update_handled_vectors(struct kvm_ioapic > > > *ioapic) > > >> smp_wmb(); > > >> } > > >> +void set_eoi_exitmap(struct kvm_vcpu *vcpu) > > >> +{ > > > This function is exported from the file and need to have more unique > > > name. kvm_ioapic_calculate_eoi_exitmap() for instance. > > Ok. > > > > >> @@ -156,6 +193,7 @@ static void ioapic_write_indirect(struct kvm_ioapic > > > *ioapic, u32 val) > > >> if (e->fields.trig_mode == IOAPIC_LEVEL_TRIG > > >> && ioapic->irr & (1 << index)) > > >> ioapic_service(ioapic, index); > > >> + ioapic_update_eoi_exitmap(ioapic->kvm); > > > ioapic_write_indirect() is called under ioapic->lock, > > > ioapic_update_eoi_exitmap() takes the same lock. Have you tested the > > > code? > > ioapic_update_eoi_exitmap doesn't take any lock. > > > Sorry. You are correct. Confused between different functions. It needs a more descriptive name, then.