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
Sponsored by: Microsoft

(cherry picked from commit 999174ba03642fa63c9654752993a62db461afc9)

Details

Provenance
whuAuthored on Mar 8 2024, 10:00 AM
Parents
rGf9e317a7b41b: pcm.4: Fix lint warnings
Branches
Unknown
Tags
Unknown