Can't PCI Passthrough

rarirureluis

Renowned Member
Jul 14, 2015
9
0
66
Hi.

I want to pci passthrough but doesn't work.

--- Error Message ---
kvm: -device vfio-pci,host=07:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to set iommu for container: Device or resource busy
kvm: -device vfio-pci,host=07:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to setup container for group 12
kvm: -device vfio-pci,host=07:00.0,id=hostpci0,bus=pci.0,addr=0x10: vfio: failed to get group 12
kvm: -device vfio-pci,host=07:00.0,id=hostpci0,bus=pci.0,addr=0x10: Device initialization failed
TASK ERROR: start failed: command '/usr/bin/kvm -id 103 -chardev 'socket,id=qmp,path=/var/run/qemu-server/103.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -pidfile /var/run/qemu-server/103.pid -daemonize -smbios 'type=1,uuid=38dbeb02-168a-4eae-a572-02d9570ef346' -name Chinachu -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -vnc unix:/var/run/qemu-server/103.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 2048 -k ja -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'vfio-pci,host=07:00.0,id=hostpci0,bus=pci.0,addr=0x10' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:5e5a29b4ae6' -drive 'file=/mnt/2.0TB/images/103/vm-103-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap103i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=36:31:38:30:61:39,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1
--- Fin ---

Of corse Intel IOMMU is enable.

--- dmesg | grep -e DMAR -e IOMMU ---
[ 0.000000] ACPI: DMAR 0x00000000DFEE8C40 000098 (v01 IntelR AWRDACPI 322E3030 DRWA 00000002)
[ 0.000000] DMAR: IOMMU enabled
[ 0.040464] DMAR-IR: This system BIOS has enabled interrupt remapping
[ 0.841198] DMAR: Host address width 36
[ 0.841200] DMAR: DRHD base: 0x000000fe710000 flags: 0x1
[ 0.841218] DMAR: dmar0: reg_base_addr fe710000 ver 1:0 cap c90780106f0462 ecap f020fe
[ 0.841220] DMAR: RMRR base: 0x000000dfef0000 end: 0x000000dfefffff
[ 0.841248] DMAR: No ATSR found
[ 0.841404] DMAR: dmar0: Using Queued invalidation
[ 0.841419] DMAR: Setting RMRR:
[ 0.841443] DMAR: Setting identity map for device 0000:00:1a.0 [0xdfef0000 - 0xdfefffff]
[ 0.841473] DMAR: Setting identity map for device 0000:00:1a.1 [0xdfef0000 - 0xdfefffff]
[ 0.841503] DMAR: Setting identity map for device 0000:00:1a.2 [0xdfef0000 - 0xdfefffff]
[ 0.841532] DMAR: Setting identity map for device 0000:00:1a.7 [0xdfef0000 - 0xdfefffff]
[ 0.841561] DMAR: Setting identity map for device 0000:00:1d.0 [0xdfef0000 - 0xdfefffff]
[ 0.841590] DMAR: Setting identity map for device 0000:00:1d.1 [0xdfef0000 - 0xdfefffff]
[ 0.841619] DMAR: Setting identity map for device 0000:00:1d.2 [0xdfef0000 - 0xdfefffff]
[ 0.841650] DMAR: Setting identity map for device 0000:00:1d.7 [0xdfef0000 - 0xdfefffff]
[ 0.841669] DMAR: Prepare 0-16MiB unity mapping for LPC
[ 0.841681] DMAR: Setting identity map for device 0000:00:1f.0 [0x0 - 0xffffff]
[ 0.841840] DMAR: Intel(R) Virtualization Technology for Directed I/O
[ 1.604788] DMAR: DRHD: handling fault status reg 2
[ 1.604840] DMAR: DMAR:[DMA Read] Request device [01:00.1] fault addr fff00000
DMAR:[fault reason 02] Present bit in context entry is clear
[ 51.729884] AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
[ 51.729887] AMD IOMMUv2 functionality not available on this system
--- Fin ---

pve-manager/4.2-17/e1400248 (running kernel: 4.4.15-1-pve)

Why VM can't pci passthrough...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!