From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [PATCH][v2] Hybrid extension support in Xen Date: Tue, 2 Feb 2010 21:53:33 +0800 Message-ID: <201002022153.34005.sheng@linux.intel.com> References: <201002021616.19189.sheng@linux.intel.com> <1265118775.2965.23108.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1265118775.2965.23108.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On Tuesday 02 February 2010 21:52:55 Ian Campbell wrote: > On Tue, 2010-02-02 at 08:16 +0000, Sheng Yang wrote: > > diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c > > --- a/xen/arch/x86/hvm/irq.c > > +++ b/xen/arch/x86/hvm/irq.c > > @@ -46,8 +46,18 @@ static void __hvm_pci_intx_assert( > > if ( (hvm_irq->pci_link_assert_count[link]++ == 0) && isa_irq && > > (hvm_irq->gsi_assert_count[isa_irq]++ == 0) ) > > { > > - vioapic_irq_positive_edge(d, isa_irq); > > - vpic_irq_positive_edge(d, isa_irq); > > + if ( !is_hybrid_evtchn_enabled_domain(d) ) > > + { > > + vioapic_irq_positive_edge(d, isa_irq); > > + vpic_irq_positive_edge(d, isa_irq); > > + } > > + else > > + { > > + /* TODO fix the critical region here */ > > + spin_unlock(&d->arch.hvm_domain.irq_lock); > > + send_guest_global_virq(d, VIRQ_EMUL_PIN(isa_irq)); > > + spin_lock(&d->arch.hvm_domain.irq_lock); > > + } > > } > > } > > This can't be right, at least not without a big comment explaining why > it is safe to drop the lock here... ... Would address this in the next version. -- regards Yang, Sheng