From: "Nick Couchman" Subject: Re: PCI Passthrough Problems/Questions Date: Mon, 25 Oct 2010 13:45:45 -0600 Message-ID: <4CC58A0902000099000BA709@collaborate.seakr.com> References: <4CC55D5C02000099000BA698@collaborate.seakr.com> <20101025174033.GA5766@dumpdata.com> <4CC5790502000099000BA6DC@collaborate.seakr.com> <20101025184818.GA6259@dumpdata.com> <4CC57D2102000099000BA6E6@collaborate.seakr.com> <20101025190752.GB6452@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20101025190752.GB6452@dumpdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: konrad.wilk@Oracle.Com Cc: xen-devel@lists.xensource.com, weidong.han@intel.com List-Id: xen-devel@lists.xenproject.org On Mon, 2010-10-25 at 15:07 -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Oct 25, 2010 at 12:50:41PM -0600, Nick Couchman wrote: > > On Mon, 2010-10-25 at 14:48 -0400, Konrad Rzeszutek Wilk wrote: > > > On Mon, Oct 25, 2010 at 12:33:09PM -0600, Nick Couchman wrote: > > > > On Mon, 2010-10-25 at 13:40 -0400, Konrad Rzeszutek Wilk wrote: > > > >=20 > > > > >=20 > > > > > What do you see on your Xen serial output? I presume you cranke= d up logging: > > > > > loglevel=3Dall guest_lvl=3Dall iommu=3Dverbose on your Xen comm= and line. > > > > >=20 > > > > > Is there anything that shows up when you get the 'Failed to ass= ign.." ? > > > > >=20 > > > >=20 > > > > The only messages I get on the serial console after setting those > > > > parameters on the xen.gz kernel line in grub (and rebooting, of c= ourse) > > > > are the following: > > > >=20 > > > > (XEN) [VT-D]iommu.c:1496: d0:PCI: unmap bdf =3D 2:0.0 > > > > (XEN) [VT-D]iommu.c:1364: d1:PCI: map bdf =3D 2:0.0 > > > > (XEN) domctl.c:848:d0 XEN_DOMCTL_assign_device: assign device (2:= 0.0) > > > > failed > > > > (XEN) event_channel.c:192:d0 EVTCHNOP failure: domain 1, error -2= 2 > > >=20 > > > So, -EINVAL. How comfortable are you sticking a bunch of > > > dprintk(VTDPREFIX, " in the drivers/passthrough/vtd/iommu.c file? B= asically > > > you need to figure which of the functions that are past line 1364 > > > are being called and return -EINVAL.=20 > >=20 > > I'm happy to give it a shot...it'll take a while to get the devel > > environment configured, as I'm using packages right now and I don't e= ven > > think I have a compiler on this system. I'll report back once I get > > that done and give that a try. >=20 > Excellent. You might also want to CC Weidong (weidong.han@intel.com) in= the future > who is right now on travel and he might have better suggestions. CC-ing= him on this e-mail. Okay, I've traced it down to this section of code in iommu.c: /* * Devices behind PCIe-to-PCI/PCIx bridge may generate * different requester-id. It may originate from devfn=3D0 * on the secondary bus behind the bridge. Map that id * as well. */ ret =3D domain_context_mapping_one(domain, drhd->iommu, secbus, 0); dprintk(XENLOG_ERR VTDPREFIX, "domain_conext_mapping_one ret: %d\n", ret); I guess that shouldn't surprise me, given this device is behind a PCIe-to-PCI bridge. On to the domain_context_mapping_one function. -Nick --------=0D This e-mail may contain confidential and privileged material for the sole= use of the intended recipient. If this email is not intended for you, o= r you are not responsible for the delivery of this message to the intende= d recipient, please note that this message may contain SEAKR Engineering = (SEAKR) Privileged/Proprietary Information. In such a case, you are stri= ctly prohibited from downloading, photocopying, distributing or otherwise= using this message, its contents or attachments in any way. If you have= received this message in error, please notify us immediately by replying= to this e-mail and delete the message from your mailbox. Information co= ntained in this message that does not relate to the business of SEAKR is = neither endorsed by nor attributable to SEAKR.