István HERCZEG
2010-Oct-30 13:37 UTC
[Xen-users] can not unbind pci device, xen kernel, openSUSE
Dear All, I can not unbind my PCI device. It is easy an and well know procedure how to unbind a PCI device: lspci | grep USB 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06) 00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06) lspci -k .. 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06) Subsystem: ASUSTeK Computer Inc. Device 8383 Kernel driver in use: ehci_hcd .. 00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06) Subsystem: ASUSTeK Computer Inc. Device 8383 Kernel driver in use: ehci_hcd ... then echo -n "domain:bus:slot:.role" > /sys/bus/pci.... at this point: echo -n "0000:1a.0" > /sys/bus/pci/drivers/ehci_hcd/unbind i get an error message: -bash: echo: write error: No such device my config: Linux linux-n0km 2.6.31.14-0.4-xen #1 SMP 2010-10-25 08:45:30 +0200 x86_64 x86_64 x86_64 GNU/Linux cat /etc/SuSE-release openSUSE 11.2 (x86_64) VERSION = 11.2 rpm -qa | grep xen xen-4.0.1_01-79.2.x86_64 xen-tools-4.0.1_01-79.2.x86_64 kernel-xen-2.6.31.14-0.4.1.x86_64 xen-libs-4.0.1_01-79.2.x86_64 Please help me, any help appreciated. Regards, advOPer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Richie
2010-Oct-30 14:15 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
On 10/30/2010 09:37 AM, István HERCZEG wrote:> lspci -k > .. > 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset > USB2 Enhanced Host Controller (rev 06) > Subsystem: ASUSTeK Computer Inc. Device 8383 > Kernel driver in use: ehci_hcd > .. > 00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset > USB2 Enhanced Host Controller (rev 06) > Subsystem: ASUSTeK Computer Inc. Device 8383 > Kernel driver in use: ehci_hcd > ... > > then echo -n "domain:bus:slot:.role" > /sys/bus/pci.... > > at this point: > echo -n "0000:1a.0" > /sys/bus/pci/drivers/ehci_hcd/unbind > > i get an error message: > -bash: echo: write error: No such device >I''m not expert on this but I think the format you want is 0000:XX:XX.X, so try "0000:00:1a.0" and see how that goes. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
István HERCZEG
2010-Oct-30 15:39 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
Hi, thank you for quick answer. You was right I missed the format. But I still have a problem. Continue the PCI unbind procedure the wiki says[1]: echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/new_slot and .. echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/bind_cat In my openSUSE 11.2 there are no /sys/bus/pci/drivers/pciback directory. OK. I have /sys/bus/pci/drivers/pci-stub maybe this would be nice[2]: continuing the procedure: echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/new_slot -bash: new_slot: No such file or directory echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/bindcat -bash: bindcat: No such file or directory I get these messages ... Regards, Istvan [1] http://wiki.xensource.com/xenwiki/Assign_hardware_to_DomU_with_PCIBack_as_module [2] http://markmail.org/message/jjjvj3my3rk7edrb 2010. október 30. 16:15 Richie írta, <listmail@triad.rr.com>:> On 10/30/2010 09:37 AM, István HERCZEG wrote: > >> lspci -k >> .. >> 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset >> USB2 Enhanced Host Controller (rev 06) >> Subsystem: ASUSTeK Computer Inc. Device 8383 >> Kernel driver in use: ehci_hcd >> .. >> 00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset >> USB2 Enhanced Host Controller (rev 06) >> Subsystem: ASUSTeK Computer Inc. Device 8383 >> Kernel driver in use: ehci_hcd >> ... >> >> then echo -n "domain:bus:slot:.role" > /sys/bus/pci.... >> >> at this point: >> echo -n "0000:1a.0" > /sys/bus/pci/drivers/ehci_hcd/unbind >> >> i get an error message: >> -bash: echo: write error: No such device >> >> I''m not expert on this but I think the format you want is 0000:XX:XX.X, > so try "0000:00:1a.0" and see how that goes. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Richie
2010-Oct-30 15:56 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
On 10/30/2010 11:39 AM, István HERCZEG wrote:> Hi, > > thank you for quick answer. You was right I missed the format. But I > still have a problem. Continue the PCI unbind procedure the wiki says[1]: > > echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/new_slot > > and .. > echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/bind_cat > > In my openSUSE 11.2 there are no /sys/bus/pci/drivers/pciback > directory. OK. I have /sys/bus/pci/drivers/pci-stub maybe this would > be nice[2]: > > continuing the procedure: > > echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/new_slot > -bash: new_slot: No such file or directory > echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/bindcat > -bash: bindcat: No such file or directory > > I get these messages ... > > Regards, > Istvan > >This is from some notes I have, but first find your device in lspci -n output Say I had a device as follows: 00:01.0 0604: 8086:29a1 (rev 02) I''d try: echo "8086 29a1" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:01.0" > /sys/bus/pci/devices/0000:00:01.0/driver/unbind echo "0000:00:01.0" > /sys/bus/pci/drivers/pci-stub/bind _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Richie
2010-Oct-30 16:03 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
On 10/30/2010 11:56 AM, Richie wrote:> On 10/30/2010 11:39 AM, István HERCZEG wrote: >> Hi, >> >> thank you for quick answer. You was right I missed the format. But I >> still have a problem. Continue the PCI unbind procedure the wiki >> says[1]: >> >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/new_slot >> >> and .. >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/bind_cat >> >> In my openSUSE 11.2 there are no /sys/bus/pci/drivers/pciback >> directory. OK. I have /sys/bus/pci/drivers/pci-stub maybe this would >> be nice[2]: >> >> continuing the procedure: >> >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/new_slot >> -bash: new_slot: No such file or directory >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/bindcat >> -bash: bindcat: No such file or directory >> >> I get these messages ... >> >> Regards, >> Istvan >> >> > > This is from some notes I have, but > first find your device in lspci -n output > > Say I had a device as follows: > 00:01.0 0604: 8086:29a1 (rev 02) > > I''d try: > echo "8086 29a1" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:00:01.0" > /sys/bus/pci/devices/0000:00:01.0/driver/unbind > echo "0000:00:01.0" > /sys/bus/pci/drivers/pci-stub/bind > >Additionally, I have some notes that pci-stub works only with hvm and not a xenified kernel and that pciback works with anything [i hope this is accurate, someone from the list can confirm]. You may want to look at either getting pciback built into your dom0 or make sure it is added to /etc/modules so that it gets loaded [if you already have it compiled as a module]. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
István HERCZEG
2010-Oct-30 16:05 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
I found the reason way I can''t find the ../pciback directory. The pciback module makes available ../pciback. After I did modprobe pciback then I can access /sys/bus/pci/drivers/pciback and wirte the new_slot and bind (instead of bindcat) doing: dmesg | grep -i seiz [ 1613.652339] pciback 0000:00:1a.0: seizing device [ 1700.984342] pciback 0000:00:1d.0: seizing device seems ok. but xm create windowsxp-2 pci=00:1a.0 pci=00:1d.0 Using config file "./windowsxp-2". Error: failed to assign device: maybe the platform doesn''t support VT-d, or VT-d isn''t enabled properly? :( failure again... 2010. október 30. 17:56 Richie írta, <listmail@triad.rr.com>:> On 10/30/2010 11:39 AM, István HERCZEG wrote: > >> Hi, >> >> thank you for quick answer. You was right I missed the format. But I still >> have a problem. Continue the PCI unbind procedure the wiki says[1]: >> >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/new_slot >> >> and .. >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/bind_cat >> >> In my openSUSE 11.2 there are no /sys/bus/pci/drivers/pciback directory. >> OK. I have /sys/bus/pci/drivers/pci-stub maybe this would be nice[2]: >> >> continuing the procedure: >> >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/new_slot >> -bash: new_slot: No such file or directory >> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/bindcat >> -bash: bindcat: No such file or directory >> >> I get these messages ... >> >> Regards, >> Istvan >> >> >> > This is from some notes I have, but > first find your device in lspci -n output > > Say I had a device as follows: > 00:01.0 0604: 8086:29a1 (rev 02) > > I''d try: > echo "8086 29a1" > /sys/bus/pci/drivers/pci-stub/new_id > echo "0000:00:01.0" > /sys/bus/pci/devices/0000:00:01.0/driver/unbind > echo "0000:00:01.0" > /sys/bus/pci/drivers/pci-stub/bind > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
István HERCZEG
2010-Oct-30 16:35 UTC
Re: [Xen-users] can not unbind pci device, xen kernel, openSUSE
... and finally I correct my last mistake. When I start my xen study on my machine I set up Intel VT-d support in my BIOS. Using openSUSE 11.3 and then openSUSE 11.2 I found some instability with this BIOS option. Later I turn off this option and system becomes more stable. Now I read carefully some instructions from turning on Intel VT-d and I did it (because xm create comply with me and VT-d). After cold boot the system works properly and xm create windows-xp2 has no error message. Which is more important I can access my USB directly in Windows XP guest. USB works fine I can use my MF printer/scanner. thank you for the ideas, reagrds Istvan 2010. október 30. 18:05 István HERCZEG írta, <advoper@gmail.com>:> I found the reason way I can''t find the ../pciback directory. The pciback > module makes available ../pciback. > After I did > modprobe pciback > then I can access /sys/bus/pci/drivers/pciback and wirte the new_slot and > bind (instead of bindcat) > > doing: > dmesg | grep -i seiz > [ 1613.652339] pciback 0000:00:1a.0: seizing device > [ 1700.984342] pciback 0000:00:1d.0: seizing device > > seems ok. > > but > xm create windowsxp-2 pci=00:1a.0 pci=00:1d.0 > Using config file "./windowsxp-2". > Error: failed to assign device: maybe the platform doesn''t support VT-d, or > VT-d isn''t enabled properly? > > :( failure again... > > > > 2010. október 30. 17:56 Richie írta, <listmail@triad.rr.com>: > > On 10/30/2010 11:39 AM, István HERCZEG wrote: >> >>> Hi, >>> >>> thank you for quick answer. You was right I missed the format. But I >>> still have a problem. Continue the PCI unbind procedure the wiki says[1]: >>> >>> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/new_slot >>> >>> and .. >>> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pciback/bind_cat >>> >>> In my openSUSE 11.2 there are no /sys/bus/pci/drivers/pciback directory. >>> OK. I have /sys/bus/pci/drivers/pci-stub maybe this would be nice[2]: >>> >>> continuing the procedure: >>> >>> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/new_slot >>> -bash: new_slot: No such file or directory >>> echo -n "0000:00:1a.0" /sys/bus/pci/drivers/pci-stub/bindcat >>> -bash: bindcat: No such file or directory >>> >>> I get these messages ... >>> >>> Regards, >>> Istvan >>> >>> >>> >> This is from some notes I have, but >> first find your device in lspci -n output >> >> Say I had a device as follows: >> 00:01.0 0604: 8086:29a1 (rev 02) >> >> I''d try: >> echo "8086 29a1" > /sys/bus/pci/drivers/pci-stub/new_id >> echo "0000:00:01.0" > /sys/bus/pci/devices/0000:00:01.0/driver/unbind >> echo "0000:00:01.0" > /sys/bus/pci/drivers/pci-stub/bind >> >> >> >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users