From: Simon Horman Subject: Re: [rfc 00/18] ioemu: use devfn instead of slots as the unit for passthrough Date: Thu, 19 Feb 2009 17:15:49 +1100 Message-ID: <20090219061546.GA25715@verge.net.au> References: <20090217090748.580007796@vergenet.net> <20090218120924.1C7B.27C06F64@necst.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20090218120924.1C7B.27C06F64@necst.nec.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yuji Shimada Cc: xen-devel@lists.xensource.com, Ian Jackson List-Id: xen-devel@lists.xenproject.org On Wed, Feb 18, 2009 at 12:12:27PM +0900, Yuji Shimada wrote: > On Tue, 17 Feb 2009 20:07:48 +1100 > Simon Horman wrote: > > > This series starts of with servaral cleanup patches. > > > > The meat of the changes start with the patch > > "ioemu: use devfn instead of slots as the unit for passthrough" > > > > This allows multi-function cards to be appear in guets as > > multi-function cards, with the restriction that function 0 must > > be passed through. Otherwise each function is allocated its own > > slot, as before. > > How do you guarantee that virtual gsi is not shared between > pass-throughed devices? Xen hypervisor does not support sharing > virtual gsi between pass-throughed devices. > > The function 0 always uses INTA. The function 1-7 might use INTB-INTD. > INTB-INTD will route to the same virtual gsi with other device's > INTA-INTD. > > Current interrupt routing in xen hypervisor is defined as follows. > > xen/include/asm-x86/hvm/irq.h > #define hvm_pci_intx_gsi(dev, intx) \ > (((((dev)<<2) + ((dev)>>3) + (intx)) & 31) + 16) To be honest I am a little confused about what the above maping is supposed to achive. -- Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en