V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
liyongjun0803
V2EX  ›  问与答

x86 服务器处理 MSI-X 中断出错

  •  
  •   liyongjun0803 · Aug 25, 2024 · 1542 views
    This topic created in 614 days ago, the information mentioned may be changed or developed.

    在 x86 服务器上,驱动程序使用 pci_alloc_irq_vectors() 和 pci_irq_vector() 为 EP 申请了 32 个 MSI-X 中断,并分配了 msi_addr 和 msi_data ,这里的 msi_data 为 0xef (不知道这个值是否属于正常范围),等到 EP 端向 msi_addr 写入 msi_data ( 0xef )来触发中断时,服务器报下面这行错误

    [96961.176617] Spurious interrupt (vector 0xef) on CPU#0. Acked

    请问这是什么原因?如何解决?

    一个对比样例:同样的驱动代码在 x86 工控机上,RC 为 msi_data 分配的值为 0x0,且不会报上述错误,功能正常。服务器和工控机 Linux 系统相同( CentOS 7.9 )、内核版本相同(6.1.12),使用的是同一款 EP 外设,驱动程序也是同一份。

    Supplement 1  ·  Aug 26, 2024
    补充一下
    msi-x table 中的地址也不正确,32 个 msi-x 条目中的地址都为 0xfee00000 。
    说明 RC 枚举并分配 msi-x table 有问题?
    1 replies    2024-08-27 12:29:36 +08:00
    liyongjun0803
        1
    liyongjun0803  
    OP
       Aug 27, 2024
    已解决,BIOS 要开启 IOMMU 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2754 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:05 · PVG 22:05 · LAX 07:05 · JFK 10:05
    ♥ Do have faith in what you're doing.