From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: PCI Passthru: fn0 exported but not fn1 Date: Mon, 27 Aug 2007 19:38:04 +0530 Message-ID: <46D2DAC4.5040502@netxen.com> References: <46D1A813.1030704@netxen.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <46D1A813.1030704@netxen.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: Jambunathan K Cc: xen-devel , Sanjeev Jorapur List-Id: xen-devel@lists.xenproject.org Jambunathan K wrote: > Keir Fraser wrote: >> Why did you not use VPCI? Does that not work for you? It should avoid the >> problem that is currently blocking your progress. >> >> -- Keir >> >> >> On 24/8/07 15:58, "Jambunathan K" wrote: >> >>> CONFIG_XEN_PCIDEV_FRONTEND=y >>> CONFIG_XEN_PCIDEV_FE_DEBUG=y >>> CONFIG_XEN_PCIDEV_BACKEND=y >>> # CONFIG_XEN_PCIDEV_BACKEND_VPCI is not set >>> CONFIG_XEN_PCIDEV_BACKEND_PASS=y >>> # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set >>> CONFIG_XEN_PCIDEV_BE_DEBUG=y >>> >>> I have overridden default VPCI with explicit BACKEND_PASS. Both Dom0 and >>> Dom1 run the same kernel binary. >>> >>> I had used the above configuration all along (on both Xen304 + Xen310) >>> and have seen fn1 exported 'as such' to Dom1. It is with my new box that >>> I have the above issue. >> >> > > I did some more experiments and here is what I find. > > I) In PASS mode, > a) Guest domain *cannot* see fn2 if *only* fn2 is exported. > b) Guest domain *can* see fn2 *only if* fn0 is also exported to it. > > II) In VPCI mode, > a) Guest domain *cannot* see fn2 if *only* fn2 is exported. > b) Guest domain *can* see fn2 *only if* fn0 is also exported to it. > > III) In SLOT mode, > a) Guest doamin can see fn2 even if *only* fn2 is exported. > > > A cursory look suggests that the difference in behaviour is due to the > way pcifront scans devices. It scans non-zero fns only if it actually > sees a device at *fn0*. > > Our device requires that the fn-no be preserved as such (even if other > PCI params change) for proper working. > > I am trying to export 4 PCI functions in our device to 4 different > domains. I am stuck at not being able to use *any* of the passthrough > methods. > > If behaviours (I) and (II) above is as intended may I know why this is > so?. If not, would you agree that this is a bug? > I confirming that this is a regression from xen304 to xen310. (I verified just the 'BACKEND_PASS' config) I had cursorily looked at pciback and pcifront code changes between xen304 to xen310. My not so discerning eye couldn't catch any differences that do matter. For now I have reverted my working tree to Xen-304. I would appreciate if you could provide a patch that addresses this issue in Xen310. Jambunathan K.