From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Baptiste Favre Subject: Re: Xen PCI passthrough & OpenWRT domU Date: Wed, 29 Dec 2010 14:11:41 +0100 Message-ID: <4D1B338D.7080403@jbfavre.org> References: <4D1B15B1.5040900@jbfavre.org> <20101229120735.GT2754@reaktio.net> Reply-To: xen-devel@lists.xensource.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20101229120735.GT2754@reaktio.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hello Pasi, Le 29/12/2010 13:07, Pasi K=E4rkk=E4inen a =E9crit : > On Wed, Dec 29, 2010 at 12:04:17PM +0100, Jean Baptiste Favre wrote: >> Hello, >> I'm trying to make Openwrt running as domU with network cards PCI >> passthrough. >> >> First part is OK, OpenWRT runs fine as x86 PV domU, but not PCI passth= rough. >> >> Dom0 runs debian Xen packages. >> # cat /proc/cmdline >> placeholder root=3D/dev/mapper/system-root ro console=3Dtty0 console=3D= hvc0 >> console=3DttyS0,115200n8 xen-pciback.permissive xen-pciback.hide=3D(04= :00.0) >> pci=3Dresource_alignment=3D04:00.0 quiet >> >> # lspci >> ... >> 04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI= -E >> Gigabit Ethernet Controller (rev 12) >> >> # uname -a >> Linux remus 2.6.32-5-xen-amd64 #1 SMP Fri Dec 10 17:41:50 UTC 2010 >> x86_64 GNU/Linux >> >> OpenWRT uses upstream kernel 2.6.32.27 (but I also tested 2.6.35.9 >> without any changes). >> >=20 > Upstream Linux 2.6.32.27 doesn't have xen-pcifront driver. > Upstream 2.6.35.9 doesn't have it either. >=20 > xen-pcifront driver was merged to upcoming upstream 2.6.37 kernel. So, I'll try with 2.6.37 :) >> domU informations: >> # cat /proc/cmdline >> root=3D/dev/xvda2 rw swiotlb=3Dforce console=3Dhvc0 xencons=3Dtty >> >> # lspci >> [empty] >> >=20 > You should see the PCI device with lspci.=20 > I guess you don't have xen-pcifront driver in use. That's what I think, but do not know how to check xen-pcifront use >> # dmesg | grep -i pci >> Allocating PCI resources starting at 10000000 (gap: 10000000:f0000000) >> PCI: Fatal: No config space access function found >> PCI: System does not support PCI >> PCI: System does not support PCI >> PCI: CLS 0 bytes, default 128 >> XENBUS: Device with no driver: device/pci/0 >> >> # dmesg | grep -i xen >> Xen: 0000000000000000 - 00000000000a0000 (usable) >> Xen: 00000000000a0000 - 0000000000100000 (reserved) >> Xen: 0000000000100000 - 0000000010000000 (usable) >> #0 [00014c6000 - 00014d4000] XEN PAGETABLES =3D=3D> [00014c6000 - >> 00014d4000] >> #3 [0001483000 - 00014c6000] XEN START INFO =3D=3D> [0001483000 - >> 00014c6000] >> Booting paravirtualized kernel on Xen >> Xen version: 4.0.1 (preserve-AD) >> Xen: using vcpu_info placement >> Kernel command line: root=3D/dev/xvda2 rw swiotlb=3Dforce console=3Dhv= c0 >> xencons=3Dtty >> Xen: using vcpuop timer interface >> installing Xen timer for CPU 0 >> xen_balloon: Initialising balloon driver. >> Switching to clocksource xen >> Initialising Xen virtual ethernet driver. >> XENBUS: Device with no driver: device/pci/0 >> XENBUS: Device with no driver: device/console/0 >> >> So, it seems that domU sees PCI device (and sky2 module is loaded), bu= t >> do not recognize it. >> I have tried to compile PCI frontend driver, which is not by default, >> but not sure I succeeded. How can I check it ? >> >> Another question, are there any requirement in terms of kernel version >> regarding the version of Xen I use ? If yes, how can I check that too = ? >> >=20 > xen-pcifront driver is required in the domU kernel. >=20 >> Sorry for long email, but I also ask it on OpenWRT devel list without >> answer for now. >=20 > See: http://wiki.xensource.com/xenwiki/XenPCIpassthrough Already saw this page. This is my reference for these tries :) Thanks a lot for answer, JB