HomeFreeBSD

Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()

Description

Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi()

The msi address contains apic id. The code in vmbus_pcib_map_msi()
treats it as cpu id, which could cause mis-configuration of msix
IRQs, leading to missing interrupts for SRIOV devices. This happens
when apic id is not the same as cpu id on certain large VM sizes
with multiple numa domains in Azure. Fix this issue by correctly
mapping apic ids to cpu ids.

On vPCI version before 1.4, it only supports up to 64 vcpus
for msi/msix interrupt. This change also adds a check and returns
error if the vcpu_id is greater than 63.

Reported by: NetApp
Tested by: whu
MFC after: 1 week

Details

Provenance
whuAuthored on Mar 8 2024, 10:00 AM
Parents
rG96ad640178ea: TCP LRO: add dtrace probe points
Branches
Unknown
Tags
Unknown