dev001
2011-Feb-02 03:16 UTC
[Xen-users] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
my Dom0 host runs, uname -a Linux test 2.6.34.8-7-xen #1 SMP 2011-01-20 21:58:39 +0100 x86_64 x86_64 x86_64 GNU/Linux lsb_release -d Description: openSUSE 11.3 (x86_64) rpm -qa | grep -i Xen-4 xen-4.0.1_21326_02-0.3.1.x86_64 i''ve got 3 NICs, lspci | grep -i eth 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01) 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 20) 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02) where 04:00.0 is assigned as the internal-LAN/Bridge port, and 02:00.0 & 03:00.0 are PCIe cards that I intend to PCI-passthrough to a DomU guest. so far, I''ve: cat /boot/grub/menu.lst ... kernel /xen.gz ... iommu=verbose dom0_vcpus_pin=true sched=credit cpuidle=1 cpufreq=xen clocksource=acpi numa=on module /vmlinuz-xen ... elevator=cfq clocksource=xen mce=off nomodeset pciback.permissive pciback.hide=(0000:02:00.0)(0000:03:00.0) pci=resource_aligment=0000:02:00.0;0000:03:0.0 module /initrd-xen ... cat /etc/modprobe.d/99-local.conf options pciback hide=(0000:02:00.0)(0000:03:00.0) install sky2 /sbin/modprobe pciback ; /sbin/modprobe --first-time --ignore-install sky2 install r8169 /sbin/modprobe pciback ; /sbin/modprobe --first-time --ignore-install r8169 cat /etc/init.d/boot.local modprobe pciback hide=''(02:00.0)(03.00.0)'' echo -n 0000:02:00.0 > sys/bus/pci/drivers/pciback/permissive echo -n 0000:03:00.0 > sys/bus/pci/drivers/pciback/permissive @ Dom0 boot, i only see ONE card seized, dmesg | egrep -i seiz [ 2.081944] pciback 0000:03:00.0: seizing device and, of course as a result, for a guest, cat test.cfg ... extra = ''textmode=1 xencons=xvc0 elevator=noop iommu=soft'' pci = [ ''02:00.0'', ''03:00.0''] ... xm create test.cfg Error: pci: PCI Backend and pci-stub don''t own device 0000:02:00.0 if i simply replace the 04:00.0 Realtek card with a non-r8619 driver card, e.g., 04:00.0 Ethernet controller: Atheros Communications AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0) and repeat the experiment, then both cards are CORRECTLY seized, dmesg | egrep -i seiz [ 3.027654] pciback 0000:02:00.0: seizing device [ 3.321515] pciback 0000:03:00.0: seizing device and I can subsequently launch the DomU, with both cards successfully passed through. i.e., using two cards with the same driver type FAILS to allow one of the cards to be seized. i suspect this has to do with the driver not being unloadable at the time of device seizure, as it''s in use. if that''s the case -- how do i configure this so that the _same_ driver can be used for _both_ the Dom0 card instance, and then appropriately seized for the PCI-passthru target''d 2nd card? or, is this another issue & there''s addition/other config necessary? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Anish Patel
2011-Feb-02 05:02 UTC
Re: [Xen-users] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
hi, i think you need to unbind the device from the driver then bind it to the pciback driver see http://wiki.xensource.com/xenwiki/VTdHowTo thanks On 02/01/11 22:16, dev001 wrote:> my Dom0 host runs, > > uname -a > Linux test 2.6.34.8-7-xen #1 SMP 2011-01-20 21:58:39 +0100 > x86_64 x86_64 x86_64 GNU/Linux > lsb_release -d > Description: openSUSE 11.3 (x86_64) > rpm -qa | grep -i Xen-4 > xen-4.0.1_21326_02-0.3.1.x86_64 > > i''ve got 3 NICs, > > lspci | grep -i eth > 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01) > 03:00.0 Ethernet controller: Marvell Technology Group Ltd. > 88E8053 PCI-E Gigabit Ethernet Controller (rev 20) > 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02) > > where 04:00.0 is assigned as the internal-LAN/Bridge port, and 02:00.0& > 03:00.0 are PCIe cards that I intend to PCI-passthrough to a DomU guest. > > so far, I''ve: > > cat /boot/grub/menu.lst > ... > kernel /xen.gz ... iommu=verbose dom0_vcpus_pin=true sched=credit > cpuidle=1 cpufreq=xen clocksource=acpi numa=on > module /vmlinuz-xen ... elevator=cfq clocksource=xen mce=off > nomodeset pciback.permissive > pciback.hide=(0000:02:00.0)(0000:03:00.0) > pci=resource_aligment=0000:02:00.0;0000:03:0.0 > module /initrd-xen > ... > > cat /etc/modprobe.d/99-local.conf > options pciback hide=(0000:02:00.0)(0000:03:00.0) > install sky2 /sbin/modprobe pciback ; /sbin/modprobe > --first-time --ignore-install sky2 > install r8169 /sbin/modprobe pciback ; /sbin/modprobe > --first-time --ignore-install r8169 > > cat /etc/init.d/boot.local > modprobe pciback hide=''(02:00.0)(03.00.0)'' > echo -n 0000:02:00.0> sys/bus/pci/drivers/pciback/permissive > echo -n 0000:03:00.0> sys/bus/pci/drivers/pciback/permissive > > @ Dom0 boot, i only see ONE card seized, > > dmesg | egrep -i seiz > [ 2.081944] pciback 0000:03:00.0: seizing device > > and, of course as a result, for a guest, > > cat test.cfg > ... > extra = ''textmode=1 xencons=xvc0 elevator=noop iommu=soft'' > pci = [ ''02:00.0'', ''03:00.0''] > ... > > xm create test.cfg > Error: pci: PCI Backend and pci-stub don''t own device > 0000:02:00.0 > > > if i simply replace the 04:00.0 Realtek card with a non-r8619 driver > card, e.g., > > 04:00.0 Ethernet controller: Atheros Communications > AR8121/AR8113/AR8114 Gigabit or Fast Ethernet (rev b0) > > and repeat the experiment, then both cards are CORRECTLY seized, > > dmesg | egrep -i seiz > [ 3.027654] pciback 0000:02:00.0: seizing device > [ 3.321515] pciback 0000:03:00.0: seizing device > > and I can subsequently launch the DomU, with both cards successfully > passed through. > > i.e., using two cards with the same driver type FAILS to allow one of > the cards to be seized. > > i suspect this has to do with the driver not being unloadable at the > time of device seizure, as it''s in use. > > if that''s the case -- how do i configure this so that the _same_ driver > can be used for _both_ the Dom0 card instance, and then appropriately > seized for the PCI-passthru target''d 2nd card? > > or, is this another issue& there''s addition/other config necessary? > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
dev001
2011-Feb-02 05:12 UTC
Re: [Xen-users] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
hi, On Wed, 02 Feb 2011 00:02 -0500, "Anish Patel" <anish.mailing.list@gmail.com> wrote:> i think you need to unbind the device from the driver then bind it to > the pciback driver > see http://wiki.xensource.com/xenwiki/VTdHowTore-reading at that page, for PV, not HVM, the actual reference is, http://wiki.xensource.com/xenwiki/Assign_hardware_to_DomU_with_PCIBack_as_module where the ''method 2'' suggestion of making additions to modprobe.conf is what i believe i''ve already done ... to no avail. if that''s not what you intended, can you pls clarify your suggestion? thanks. On Wed, 02 Feb 2011 00:02 -0500, "Anish Patel" <anish.mailing.list@gmail.com> wrote:> hi, > i think you need to unbind the device from the driver then bind it to > the pciback driver > see http://wiki.xensource.com/xenwiki/VTdHowTo > > thanks_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
dev001
2011-Feb-02 06:09 UTC
[THREAD MOVED] Re: [Xen-users] how to PCI-passthrough 1 card to a DomU when another @ Dom0 uses the same driver?
-> http://lists.xensource.com/archives/html/xen-devel/2011-02/msg00091.html _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users