PCI Passthrough "can't reset pci device"

charhunter

New Member
Nov 12, 2012
1
0
1
Hi,

I'm trying to add two PCI DVB-C cards to a VM (TerraTec Cinergy C PCI HD CI).

Code:
08:05.0 Multimedia controller: Twinhan Technology Co. Ltd Mantis DTV PCI Bridge Controller [Ver 1.0] (rev 01)    Subsystem: TERRATEC Electronic GmbH Device 1178
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 32 (2000ns min, 63750ns max)
    Interrupt: pin A routed to IRQ 10
    Region 0: Memory at fbfff000 (32-bit, prefetchable) [size=4K]
    Kernel driver in use: pci-stub


08:06.0 Multimedia controller: Twinhan Technology Co. Ltd Mantis DTV PCI Bridge Controller [Ver 1.0] (rev 01)
    Subsystem: TERRATEC Electronic GmbH Device 1178
    Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
    Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 32 (2000ns min, 63750ns max)
    Interrupt: pin A routed to IRQ 11
    Region 0: Memory at fbffe000 (32-bit, prefetchable) [size=4K]
    Kernel driver in use: pci-stub

After adding them to the VM

Code:
hostpci0: 08:05.0
hostpci1: 08:06.0

I can't start the VM anymore. The Webfrontend says "TASK ERROR: can't reset pci device '08:05.0'".

Syslog says:

Code:
Nov 12 00:37:16 proxmox pvedaemon[11642]: start VM 101: UPID:proxmox:00002D7A:0020DED8:50A036AC:qmstart:101:root@pam:Nov 12 00:37:16 proxmox pvedaemon[11642]: can't reset pci device '08:05.0'
Nov 12 00:37:16 proxmox pvedaemon[11080]: <root@pam> end task UPID:proxmox:00002D7A:0020DED8:50A036AC:qmstart:101:root@pam: can't reset pci device '08:05.0'

PCI Passthrough is working in another VM with a NIC.

Thanks in advance


My System:
Proxmox 2.2-24
Asrock 890FX Deluxe3
AMD Athlon II 240e
 
Having the same issue here with a lynx point sata hba in ahci mode. I tried to hotadd the device with

device_add pci-assign,host=01:00.0,id=mydevice

which seemingly worked fine after doing all the unbinding in /sys/bus/pci/*

Is there some problem with the unbinding process in proxmox?
 
First I just tried to add the device like that:

Code:
qm> device_add pci-assign,host=01:00.0,id=mydevice
PCI region 5 at address 0xf7c10000 has size 0x200, which is not a multiple of 4K.  You might experience some performance hit due to that.
Failed to assign device "mydevice" : Device or resource busy
*** The driver 'ahci' is occupying your device 0000:01:00.0.
***
*** You can try the following commands to free it:
***
*** $ echo "1b21 0612" > /sys/bus/pci/drivers/pci-stub/new_id
*** $ echo "0000:01:00.0" > /sys/bus/pci/drivers/ahci/unbind
*** $ echo "0000:01:00.0" > /sys/bus/pci/drivers/pci-stub/bind
*** $ echo "1b21 0612" > /sys/bus/pci/drivers/pci-stub/remove_id
***
Device 'kvm-pci-assign' could not be initialized
qm>

Ran the unbinding/binding commands as suggested:

Code:
root@proxmox:~# echo "1b21 0612" > /sys/bus/pci/drivers/pci-stub/new_id
root@proxmox:~# echo "0000:01:00.0" > /sys/bus/pci/drivers/ahci/unbind
root@proxmox:~# echo "0000:01:00.0" > /sys/bus/pci/drivers/pci-stub/bind
root@proxmox:~# echo "1b21 0612" > /sys/bus/pci/drivers/pci-stub/remove_id

And tried again and voilà:

Code:
qm> device_add pci-assign,host=01:00.0,id=mydevice
PCI region 5 at address 0xf7c10000 has size 0x200, which is not a multiple of 4K.  You might experience some performance hit due to that.
Host-side INTx sharing not supported, using MSI instead
Some devices do not work properly in this mode.
qm>
 
Last edited:
Could someone from the dev team look into this issue? Obviously something is wrong with the way this is handled automatically in Proxmox - manually passthrough works just fine.
 

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!