freebsd-dev/sys/x86
John Baldwin c6aba52e4f Revert r332735 and fix MSI-X to properly fail allocations when full.
The off-by-one errors in 332735 weren't actual errors and were
preventing the last MSI interrupt source from being used.  Instead,
the issue is that when all MSI interrupt sources were allocated, the
loop in msix_alloc() would terminate with 'msi' still set to non-null.
The only check for 'i' overflowing was in the 'msi' == NULL case, so
msix_alloc() would try to reuse the last MSI interrupt source instead
of failing.

Fix by moving the check for all sources being in use to just after the
loop.

Reviewed by:	kib, markj
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D17976
2018-11-14 18:45:33 +00:00
..
acpica Make it possible to disable NUMA support with a tunable. 2018-10-22 20:13:51 +00:00
bios sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
cpufreq cpufreq: Remove error-prone table terminators in favor of automatic sizing 2018-04-14 03:15:05 +00:00
include Apply fix to un-cripple max cpu id on BSP earlier. 2018-11-12 19:17:26 +00:00
iommu Add malloc_domainset(9) and _domainset variants to other allocator KPIs. 2018-10-30 18:26:34 +00:00
isa Fix a regression in r338360 when booting an x86 machine without APIC. 2018-09-17 17:18:54 +00:00
pci Add pci_early function to detect Intel stolen memory. 2018-10-31 23:17:00 +00:00
x86 Revert r332735 and fix MSI-X to properly fail allocations when full. 2018-11-14 18:45:33 +00:00
xen Provide string functions for use before ifuncs get resolved. 2018-10-11 23:28:04 +00:00