PCI Pass trough - parallel card

tmo-nid

New Member
Nov 25, 2011
4
0
1
Hi all,

I search to install a PCI parallel card on a KVM based virtual machine. But without success...

I followed different Howto and post (http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM)

I added amd_iommu=on to my grub.

Code:
dmesg | grep AMD-Vi
AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40
AMD-Vi: Initialized for Passthrough Mode
AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40

My parallel card :
Code:
lspci -nn
01:00.0 Parallel controller [0701]: NetMos Technology Device [9710:9900]

and
Code:
echo "9710 9900" > /sys/bus/pci/drivers/pci-stub/new_id 
echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind 
echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/bind

I tried several solutions as use the following command in guest command interface : device_add pci-assign,host=01:00.0,id=mydevice

and also directly in my configuration file by adding :
- hostpci: 01:00.0 or args: -pcidevice host=01:00.0

In all cases, I have an error

Code:
Device 'pci-assign' could not be initialized

Code:
Dec 21 10:24:24 nidvm07 qm[33301]: VM 101 start
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0xf (was 0x100, writing 0x10e)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x9 (was 0x0, writing 0xefcff000)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x6 (was 0x0, writing 0xefcfe000)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x5 (was 0x1, writing 0xfcf9)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x4 (was 0x1, writing 0xfcf1)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x10)
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
Dec 21 10:24:24 nidvm07 kernel: device tap101i11d0 entered promiscuous mode
Dec 21 10:24:24 nidvm07 kernel: vmbr11: port 2(tap101i11d0) entering forwarding state
Dec 21 10:24:24 nidvm07 kernel: pci-stub 0000:01:00.0: PCI INT A -> Link[LN24] -> GSI 24 (level, high) -> IRQ 24
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0xf (was 0x100, writing 0x10e)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x9 (was 0x0, writing 0xefcff000)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x6 (was 0x0, writing 0xefcfe000)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x5 (was 0x1, writing 0xfcf9)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x4 (was 0x1, writing 0xfcf1)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x3 (was 0x0, writing 0x10)
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: restoring config space at offset 0x1 (was 0x100000, writing 0x100003)
Dec 21 10:24:25 nidvm07 kernel: kvm_iommu_map_guest: No interrupt remapping support, disallowing device assignment.  Re-enble with "allow_unsafe_assigned_interrupts=1" module option.
Dec 21 10:24:25 nidvm07 kernel: pci-stub 0000:01:00.0: PCI INT A disabled
Dec 21 10:24:25 nidvm07 qm[33301]: VM 101 start failed: command '/usr/bin/kvm -monitor unix:/var/run/qemu-server/101.mon,server,nowait -vnc unix:/var/run/qemu-server/101.vnc,password -pidfile /var/run/qemu-server/101.pid -daemonize -usbdevice tablet -device pci-assign,host=01:00.0 -name W2K -smp sockets=1,cores=1 -nodefaults -boot menu=on,order=dc -vga cirrus -tdf -localtime -rtc-td-hack -k fr -drive file=/dev/drbdvg/vm-101-disk-1,if=ide,index=0,cache=none,boot=on -drive file=/var/lib/vz/template/iso/IOCARD10B.iso,if=ide,index=2,media=cdrom -m 1024 -netdev type=tap,id=vlan11d0,ifname=tap101i11d0,script=/var/lib/qemu-server/bridge-vlan -device rtl8139,romfile=,mac=56:BE:3E:CA:87:A4,netdev=vlan11d0 -id 101 -cpuunits 1000' failed with exit code 1

I have no more ideas... :(
I think I missed something but I don't know what :confused: Help is welcom :)