Re: KVM PCI Passthrough IRQ issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

Thanks for the good information.  Tried forcing MSI in windows; didn’t work but the nointxmask worked like a charm.

Not sure why; I didn’t see any shared inrterrupt in lspci….  And moving to another PCIe slot seems to be less and less posible as motherboard manufacturers are replacing them with NVME slots.  You have to spend a lot of money to get a workstation motherboard if you want more than 1 usable PCIe slot; my motherboard has 2 but the second one is for SLI only and won’t work by its own (tried to put the card in, PC won’t boot).

Thanks again for the help!


Best regards,
Norm

Sent from my ENIAC

> On Jul 28, 2023, at 12:50 PM, Alex Williamson <alex.williamson@xxxxxxxxxx> wrote:
> 
> On Fri, 28 Jul 2023 06:20:36 -0400
> Normand Leclerc <leclercnorm@xxxxxxxxxxxx> wrote:
> 
>> Hi,
>> 
>> I have a CameraLink capture card of which I do not have Linux
>> drivers.  I wanted to used it in Windows 11 under KVM.
>> 
>> I have managed to have the card recognized in the OS, installed
>> drivers and the system does see the clock and data valid; great!  But
>> this doesn’t happen without hickups; KVM has to be started twice.
>> The first time KVM starts, the driver tells me that there is not
>> enough ressources for the API.
>> 
>> Even though the card seems to be working well, I cannot capture
>> anything.  The software is not able to fully use the card.
>> 
>> The system is:
>> AMD Ryzen 7950x3d
>> ASROCK Steel Legend x670e
>> Teledyne XTIUM-CL MX4 (capture card)
>> Archlinux system (Linux omega 6.4.6-artix1-1 #1 SMP PREEMPT_DYNAMIC
>> Wed, 26 Jul 2023 13:47:50 +0000 x86_64 GNU/Linux)
>> 
>> lspci after boot for the card:
>> 
>> 01:00.0 Memory controller [0580]: Coreco Inc Device [11ec:f81b]
>>        Flags: fast devsel, IRQ 255, IOMMU group 12
>>        Memory at fb000000 (32-bit, non-prefetchable) [disabled]
>> [size=16M] Capabilities: [80] Power Management version 3
>>        Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
>>        Capabilities: [c0] Express Endpoint, MSI 00
>>        Capabilities: [100] Advanced Error Reporting
>>        Capabilities: [150] Device Serial Number
>> 00-00-00-00-00-00-00-00 Capabilities: [300] Secondary PCI Express
>> 
>> 
>> After vfio driver assignment:
>> 
>> 01:00.0 Memory controller [0580]: Coreco Inc Device [11ec:f81b]
>>        Flags: fast devsel, IRQ 255, IOMMU group 12
>>        Memory at fb000000 (32-bit, non-prefetchable) [disabled]
>> [size=16M] Capabilities: [80] Power Management version 3
>>        Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
>>        Capabilities: [c0] Express Endpoint, MSI 00
>>        Capabilities: [100] Advanced Error Reporting
>>        Capabilities: [150] Device Serial Number
>> 00-00-00-00-00-00-00-00 Capabilities: [300] Secondary PCI Express
>>        Kernel driver in use: vfio-pci
>> 
>> Starting KVM first time (second time is the same):
>> 
>> 01:00.0 Memory controller [0580]: Coreco Inc Device [11ec:f81b]
>>        Flags: fast devsel, IRQ 135, IOMMU group 12
>>        Memory at fb000000 (32-bit, non-prefetchable) [disabled]
>> [size=16M] Capabilities: [80] Power Management version 3
>>        Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit+
>>        Capabilities: [c0] Express Endpoint, MSI 00
>>        Capabilities: [100] Advanced Error Reporting
>>        Capabilities: [150] Device Serial Number
>> 00-00-00-00-00-00-00-00 Capabilities: [300] Secondary PCI Express
>>        Kernel driver in use: vfio-pci
>> 
>> First time KVM starts, lsirq does not show IRQ 135; second time, it
>> does.
>> 
>> If kernel has not been started with irqpoll, I get the infamous
>> “nobody cared” message and irq135 gets disabled.  Running kernel with
>> irqpoll, lsirq shows a whole bunch on interrupts (probably at each
>> frame the grabber sees).
>> 
>> It is as if the interrupt assigned to the card is not what KVM is
>> using to pass down to the guest Windows machine.  The interrupt does
>> not get to the capture card’s software and it fails.
> 
> The "irqpoll" option the kernel suggests for spurious interrupts really
> doesn't work with device assignment.  It sounds like INTx disable
> and/or status reporting is broken on this device.  The device supports
> MSI, but clearly doesn't seem to be using it.  You can read a bit about
> how vfio interrupts work and how you might make Windows use MSI here:
> 
> http://vfio.blogspot.com/2014/09/vfio-interrupts-and-how-to-coax-windows.html
> 
> Another option is to use the nointxmask=1 option of the vfio-pci module
> which will register the legacy INTx interrupt of the device as
> exclusive.  This removes our dependency on working INTx disable and
> status reporting, but it comes at the cost of sometimes being very
> difficult to configure.  You might need to install the card into a
> different slot or potentially even disable other drivers for devices
> that try to share the interrupt line with this device.  Thanks,
> 
> Alex
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux