From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: [v2] Shared guest irq support Date: Thu, 16 Oct 2008 16:28:39 +0800 Message-ID: <200810161628.39861.sheng@linux.intel.com> References: <42DFA526FC41B1429CE7279EF83C6BDC01AFB25A@pdsmsx415.ccr.corp.intel.com> <42DFA526FC41B1429CE7279EF83C6BDC01B47EAC@pdsmsx415.ccr.corp.intel.com> <48F6F992.3020203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Zhang, Xiantao" , Amit Shah , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mga10.intel.com ([192.55.52.92]:17447 "EHLO fmsmga102.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753342AbYJPIaq convert rfc822-to-8bit (ORCPT ); Thu, 16 Oct 2008 04:30:46 -0400 In-Reply-To: <48F6F992.3020203@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Thursday 16 October 2008 16:21:38 Avi Kivity wrote: > Zhang, Xiantao wrote: > > Forget to modify the from item generated automatically by git. Mod= ified > > to Sheng Yang :) > > Xiantao > > > > From c0d1ad6327c01ba0584922022bef48c971bbf18a Mon Sep 17 00:00:00 2= 001 > > From: Sheng Yang > > Date: Wed, 15 Oct 2008 20:15:06 +0800 > > Subject: [PATCH] KVM: Fix guest shared interrupt with in-kernel irq= chip > > > > Every call of kvm_set_irq() should offer an irq_source_id, which is > > allocated by kvm_request_irq_source_id(). Based on irq_source_id, w= e > > identify the irq source and implement logical OR for shared level > > interrupts. > > > > The allocated irq_source_id can be freed by kvm_free_irq_source_id(= ). > > > > Currently, we support at most sizeof(unsigned long) different irq > > sources. > > > > > > > > +#define KVM_USERSPACE_IRQ_SOURCE_ID 1 << 0 > > + > > This is dangerous, if used in an expression together with a higher > precedence operator. I fixed it and applied. Thanks to all involved= =2E Wait a minute.... I think I reserved source id 0 to userspace, rather than 1<<0=3D1... It= 's=20 strange...=20 +=A0kvm->arch.irq_sources_bitmap =3D 1; What really should be addressed is here...=20 I will post a patch to fix it as soon as I saw the commit... -- regards Yang, Sheng