diff options
author | Wei Hu <whu@FreeBSD.org> | 2024-03-11 10:15:09 +0000 |
---|---|---|
committer | Wei Hu <whu@FreeBSD.org> | 2024-03-12 05:04:59 +0000 |
commit | e4b8828947b1135fba411f58cac123c85bb24093 (patch) | |
tree | 2fc5cae39e0605a604061c53d09b44c1a8e64626 /sys/x86 | |
parent | 6766a47c02117a4935c097dc8996c9faf7b42d4f (diff) |
Hyper-V: vPCI: limit 64 cpus for msi/msix interrupt handling
On older Hyper-V vPCI protocol version 1.1, only the first 64 cpus
are able to handle msi/msix. This is true on FreeBSD 13.x and earlier
releases. If MSI IRQ is assigned to cpu id greater than 63, it would
lead to missing interrupts. Add check in set_interrupt_apic_ids() to
only add first 64 cpus into the interrupt cpu set.
Reported by: NetApp
Tested by: NetApp
Reviewed by: kib
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D44297
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/x86/mp_x86.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 1f4caf07f979..56cf7e426076 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1184,6 +1184,13 @@ set_interrupt_apic_ids(void) !hyperthreading_intr_allowed) continue; + /* + * Currently Hyper-V only supports intr on first + * 64 cpus. + */ + if (vm_guest == VM_GUEST_HV && i > 63) + continue; + intr_add_cpu(i); } } |