linux-stable/arch/x86
Saurabh Sengar e6676de778 x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
[ Upstream commit 5af507bef9 ]

arch_dynirq_lower_bound() is invoked by the core interrupt code to
retrieve the lowest possible Linux interrupt number for dynamically
allocated interrupts like MSI.

The x86 implementation uses this to exclude the IO/APIC GSI space.
This works correctly as long as there is an IO/APIC registered, but
returns 0 if not. This has been observed in VMs where the BIOS does
not advertise an IO/APIC.

0 is an invalid interrupt number except for the legacy timer interrupt
on x86. The return value is unchecked in the core code, so it ends up
to allocate interrupt number 0 which is subsequently considered to be
invalid by the caller, e.g. the MSI allocation code.

The function has already a check for 0 in the case that an IO/APIC is
registered, as ioapic_dynirq_base is 0 in case of device tree setups.

Consolidate this and zero check for both ioapic_dynirq_base and gsi_top,
which is used in the case that no IO/APIC is registered.

Fixes: 3e5bedc2c2 ("x86/apic: Fix arch_dynirq_lower_bound() bug for DT enabled machines")
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/1679988604-20308-1-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:11:06 +09:00
..
boot x86/sev: Add SEV-SNP guest feature negotiation support 2023-01-19 17:29:58 +01:00
coco x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type 2023-01-03 18:46:06 +01:00
configs
crypto crypto: x86/ghash - fix unaligned access in ghash_setkey() 2023-03-10 09:28:04 +01:00
entry - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
events perf/x86/amd/core: Always clear status for idx 2023-03-30 12:51:24 +02:00
hyperv
ia32
include x86/cpu: Add model number for Intel Arrow Lake processor 2023-05-11 23:10:48 +09:00
kernel x86/ioapic: Don't return 0 from arch_dynirq_lower_bound() 2023-05-11 23:11:06 +09:00
kvm KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted 2023-05-11 23:10:52 +09:00
lib x86/insn: Avoid namespace clash by separating instruction decoder MMIO type from MMIO trace type 2023-01-03 18:46:06 +01:00
math-emu
mm x86/mm: Do not shuffle CPU entry areas without KASLR 2023-03-30 12:51:32 +02:00
net - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
pci x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot 2023-04-20 12:36:59 +02:00
platform pci-v6.2-changes 2022-12-14 09:54:10 -08:00
power - Add the call depth tracking mitigation for Retbleed which has 2022-12-14 15:03:00 -08:00
purgatory purgatory: fix disabling debug info 2023-04-26 14:30:07 +02:00
ras
realmode
tools
um x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list 2023-03-11 13:50:27 +01:00
video
virt/vmx/tdx
xen x86/PVH: avoid 32-bit build warning when obtaining VGA console info 2023-04-06 12:12:48 +02:00
.gitignore
Kbuild
Kconfig powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile x86/build: Move '-mindirect-branch-cs-prefix' out of GCC-only block 2023-01-22 11:36:45 +01:00
Makefile.um um: Only disable SSE on clang to work around old GCC bugs 2023-05-01 08:29:22 +09:00
Makefile_32.cpu