bhyve 'Can't get IRQ 0' on a PCIe card passed through Bhyve

Hello,

I have this card pushed into my server:

It is known to work on Linux:

If I make both PCIe devices 'passthru':
Code:
# vm passthru | grep Yes
ppt0       5/0/0        Yes          CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb
ppt1       6/0/0        Yes          CX23887/8 PCIe Broadcast Audio and Video Decoder with 3D Comb

Linux kernel mostly properly detects the hardware, but fails during IRQ allocation for the device(s):
Code:
[    4.798570] mc: Linux media interface: v0.10                                                               
...                                                                                                           
[    4.859647] videodev: Linux video capture interface: v2.00                                                 
[    4.967876] cx23885: cx23885 driver version 0.0.4 loaded                                                   
[    4.972445] cx23885: CORE cx23885[0]: subsystem: 0070:6a28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]                                                                                                     
...                                                                                                           
[    5.330201] tveeprom: Hauppauge model 166100, rev B4I6, serial# 4036127955                                 
[    5.330208] tveeprom: MAC address is 00:0d:fe:92:6c:d3                                                     
[    5.330210] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)                                       
[    5.330213] tveeprom: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)  
[    5.330215] tveeprom: audio processor is CX23888 (idx 40)                                                  
[    5.330216] tveeprom: decoder processor is CX23888 (idx 34)                                                
[    5.330218] tveeprom: has no radio, has IR receiver, has no IR transmitter                                 
[    5.330220] cx23885: cx23885[0]: hauppauge eeprom: model=166100                                            
[    5.365338] cx25840 2-0044: cx23888 A/V decoder found @ 0x88 (cx23885[0])                                  
[    5.383828] cx25840 2-0044: firmware: direct-loading firmware v4l-cx23885-avcore-01.fw                     
[    6.213838] cx25840 2-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)                         
[    6.311945] cx23885: cx23885[0]: registered device video0 [v4l2]                                           
[    6.312248] cx23885: cx23885[0]: registered device vbi0                                                    
[    6.313245] cx23885: cx23885[0]: alsa: registered ALSA audio device                                        
[    6.313250] cx23885: cx23885_dvb_register() allocating 1 frontend(s)                                       
[    6.313254] cx23885: cx23885[0]: cx23885 based dvb card                                                    
[    6.313261] cx23885: dvb_register(): board=56 port=1                                                       
[    6.333142] i2c i2c-0: Added multiplexed i2c bus 3                                                         
[    6.333150] si2168 0-0064: Silicon Labs Si2168-B40 successfully identified                                 
[    6.333153] si2168 0-0064: firmware version: B 4.0.2                                                       
[    6.348346] si2157 1-0060: Silicon Labs Si2147/2148/2157/2158 successfully attached                        
[    6.348378] cx23885: dvb_register(): QUADHD_DVB analog setup                                               
[    6.348384] dvbdev: DVB: registering new adapter (cx23885[0])                                              
[    6.348392] cx23885 0000:00:06.0: DVB: registering adapter 0 frontend 0 (Silicon Labs Si2168)...           
[    6.350503] cx23885: cx23885_dvb_register() allocating 1 frontend(s)                                       
[    6.350507] cx23885: cx23885[0]: cx23885 based dvb card                                                    
[    6.350516] cx23885: dvb_register(): board=56 port=2                                                       
[    6.361996] i2c i2c-0: Added multiplexed i2c bus 4                                                         
[    6.362002] si2168 0-0066: Silicon Labs Si2168-B40 successfully identified                                 
[    6.362005] si2168 0-0066: firmware version: B 4.0.2                                                       
[    6.367879] si2157 1-0062: Silicon Labs Si2147/2148/2157/2158 successfully attached                        
[    6.367911] dvbdev: DVB: registering new adapter (cx23885[0])                                              
[    6.367919] cx23885 0000:00:06.0: DVB: registering adapter 1 frontend 0 (Silicon Labs Si2168)...           
[    6.370053] cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0                                  
[    6.370104] cx23885: cx23885[0]/0: found at 0000:00:06.0, rev: 4, irq: 0, latency: 0, mmio: 0xc0000000     
[    6.370188] genirq: Flags mismatch irq 0. 00000080 (cx23885[0]) vs. 00015a00 (timer)                       
[    6.373434] cx23885: cx23885[0]: can't get IRQ 0                                                           
[    6.382088] cx23885: probe of 0000:00:06.0 failed with error -16                                           
[    6.382328] cx23885: CORE cx23885[1]: subsystem: 0070:6b28, board: Hauppauge WinTV-QuadHD-DVB [card=56,autodetected]                                                                                                     
[    6.739470] tveeprom: Hauppauge model 166101, rev B4I6, serial# 4036127955                                 
[    6.739476] tveeprom: MAC address is 00:0d:fe:92:6c:d3                                                     
[    6.739478] tveeprom: tuner model is SiLabs Si2157 (idx 186, type 4)                                       
[    6.739480] tveeprom: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)  
[    6.739481] tveeprom: audio processor is CX23888 (idx 40)                                                  
[    6.739482] tveeprom: decoder processor is CX23888 (idx 34)                                                
[    6.739483] tveeprom: has no radio                                                                         
[    6.739485] cx23885: cx23885[1]: hauppauge eeprom: model=166101                                            
[    6.745004] cx25840 2-0044: cx23888 A/V decoder found @ 0x88 (cx23885[1])                                  
[    6.753819] cx25840 2-0044: firmware: direct-loading firmware v4l-cx23885-avcore-01.fw                     
[    7.451198] cx25840 2-0044: loaded v4l-cx23885-avcore-01.fw firmware (16382 bytes)                         
[    7.547582] cx23885: cx23885[1]: registered device video0 [v4l2]                                           
[    7.548344] cx23885: cx23885[1]: registered device vbi0                                                    
[    7.548831] cx23885: cx23885[1]: alsa: registered ALSA audio device                                        
[    7.548833] cx23885: cx23885_dvb_register() allocating 1 frontend(s)                                       
[    7.548835] cx23885: cx23885[1]: cx23885 based dvb card                                                    
[    7.548839] cx23885: dvb_register(): board=56 port=1                                                       
[    7.557587] i2c i2c-0: Added multiplexed i2c bus 3                                                         
[    7.557591] si2168 0-0064: Silicon Labs Si2168-B40 successfully identified                                 
[    7.557592] si2168 0-0064: firmware version: B 4.0.2                                                       
[    7.560898] si2157 1-0060: Silicon Labs Si2147/2148/2157/2158 successfully attached                        
[    7.560917] cx23885: dvb_register(): QUADHD_DVB analog setup                                               
[    7.560920] dvbdev: DVB: registering new adapter (cx23885[1])                                              
[    7.560925] cx23885 0000:00:07.0: DVB: registering adapter 0 frontend 0 (Silicon Labs Si2168)...           
[    7.563565] cx23885: cx23885_dvb_register() allocating 1 frontend(s)                                       
[    7.563567] cx23885: cx23885[1]: cx23885 based dvb card                                                    
[    7.563570] cx23885: dvb_register(): board=56 port=2                                                       
[    7.571554] i2c i2c-0: Added multiplexed i2c bus 4                                                         
[    7.571557] si2168 0-0066: Silicon Labs Si2168-B40 successfully identified                                 
[    7.571559] si2168 0-0066: firmware version: B 4.0.2                                                       
[    7.574782] si2157 1-0062: Silicon Labs Si2147/2148/2157/2158 successfully attached                        
[    7.574811] dvbdev: DVB: registering new adapter (cx23885[1])                                              
[    7.574815] cx23885 0000:00:07.0: DVB: registering adapter 1 frontend 0 (Silicon Labs Si2168)...           
[    7.576048] cx23885: cx23885_dev_checkrevision() Hardware revision = 0xd0                                  
[    7.576078] cx23885: cx23885[1]/0: found at 0000:00:07.0, rev: 4, irq: 0, latency: 0, mmio: 0xc0200000     
[    7.576136] genirq: Flags mismatch irq 0. 00000080 (cx23885[1]) vs. 00015a00 (timer)                       
[    7.578167] cx23885: cx23885[1]: can't get IRQ 0                                                           
[    7.582631] cx23885: probe of 0000:00:07.0 failed with error -16

This is what FreeBSD thinks about the card:
Code:
# pciconf -lc                                                                                                 
...                                                                                                           
ppt0@pci0:5:0:0:        class=0x040000 rev=0x04 hdr=0x00 vendor=0x14f1 device=0x8880 subvendor=0x0070 subdevice=0x6a28                                                                                                      
    cap 10[40] = PCI-Express 1 endpoint max data 128(128) NS                                                  
                 max read 512                                                                                 
                 link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1)                                             
    cap 01[80] = powerspec 3  supports D0 D1 D2 D3  current D0                                                
    cap 03[90] = VPD                                                                                          
    cap 05[a0] = MSI supports 1 message, 64 bit                                                               
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected                                                    
    ecap 0002[200] = VC 1 max VC1 lowpri VC0-VC1                                                              
ppt1@pci0:6:0:0:        class=0x040000 rev=0x04 hdr=0x00 vendor=0x14f1 device=0x8880 subvendor=0x0070 subdevice=0x6b28                                                                                                      
    cap 10[40] = PCI-Express 1 endpoint max data 128(128) NS                                                  
                 max read 512                                                                                 
                 link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1)                                             
    cap 01[80] = powerspec 3  supports D0 D1 D2 D3  current D0                                                
    cap 03[90] = VPD                                                                                          
    cap 05[a0] = MSI supports 1 message, 64 bit                                                               
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected                                                    
    ecap 0002[200] = VC 1 max VC1 lowpri VC0-VC1

This is bhyve-log.txt for the vm:
Code:
Sep 19 18:42:10: initialising                                                                                 
Sep 19 18:42:10:  [loader: grub]                                                                              
Sep 19 18:42:10:  [cpu: 2]                                                                                    
Sep 19 18:42:10:  [memory: 2G]                                                                                
Sep 19 18:42:10:  [hostbridge: standard]                                                                      
Sep 19 18:42:10:  [com ports: com1]                                                                           
Sep 19 18:42:10:  [uuid: e79c7e88-b867-11eb-8c69-901b0e09fb46]                                                
Sep 19 18:42:10:  [debug mode: no]                                                                            
Sep 19 18:42:10:  [primary disk: disk0.img]                                                                   
Sep 19 18:42:10:  [primary disk dev: file]                                                                    
Sep 19 18:42:10: initialising network device tap0                                                             
Sep 19 18:42:10: adding tap0 -> vm-public (public addm)                                                       
Sep 19 18:42:10: bring up tap0 -> vm-public (public addm)                                                     
Sep 19 18:42:11: booting                                                                                      
Sep 19 18:42:11: create file /vm/tv/device.map                                                                
Sep 19 18:42:11:  -> (hd0) /vm/tv/disk0.img                                                                   
Sep 19 18:42:11:  -> (hd1) tv=/m/movie/tv                                                                     
Sep 19 18:42:11: /usr/local/sbin/grub-bhyve -c /dev/nmdm-tv.1A -S -m /vm/tv/device.map -M 2G -r hd0,1 -d /boot/grub tv                                                                                                      
Sep 19 18:42:15:  [bhyve options: -c 2 -m 2G -AHP -U e79c7e88-b867-11eb-8c69-901b0e09fb46 -u -S]              
Sep 19 18:42:15:  [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,ahci-hd,/vm/tv/disk0.img -s 4:1,virtio-9p,tv=/m/movie/tv -s 5:0,virtio-net,tap0,mac=58:9c:fc:02:3e:07 -s 6:0,passthru,5/0/0 -s 7:0,passthru,6/0/0]       
Sep 19 18:42:15:  [bhyve console: -l com1,/dev/nmdm-tv.1A]                                                    
Sep 19 18:42:15: starting bhyve (run 1)

Could you help me debug the issue, please?

Complete dmesg attached.

Thank you for any advice.
m.
 

Attachments

Back
Top