Kernel: Disable MSI interrupts when IOAPIC is disabled

MSI interrupts require the IOAPIC to be enabled, trying to run with
`enable_ioapic=off` would cause a kernel panic.
This commit is contained in:
Undefine authored and Sönke Holz committed 2026-10-18 14:02:20 +02:00
1 parent 91a350318c
commit c45f5c6e2a
1 file changed
+15
+15
View File
@@ -7,6 +7,9 @@
#include <AK/AnyOf.h>
#include <Kernel/Arch/Interrupts.h>
#include <Kernel/Arch/PCIMSI.h>
#if ARCH(X86_64)
# include <Kernel/Arch/x86_64/Interrupts/APIC.h>
#endif
#include <Kernel/Bus/PCI/API.h>
#include <Kernel/Bus/PCI/BarMapping.h>
#include <Kernel/Bus/PCI/Device.h>
@@ -24,21 +27,33 @@ Device::Device(DeviceIdentifier const& pci_identifier)
bool Device::is_msi_capable() const
{
// FIXME: Move those checks to a better place
// FIXME: Support MSI on aarch64 and riscv64
#if ARCH(AARCH64) || ARCH(RISCV64)
return false;
#endif
#if ARCH(X86_64)
if (!APIC::initialized())
return false;
#endif
return m_pci_identifier->is_msi_capable();
}
bool Device::is_msix_capable() const
{
// FIXME: Move those checks to a better place
// FIXME: Support MSIx on aarch64 and riscv64
#if ARCH(AARCH64) || ARCH(RISCV64)
return false;
#endif
#if ARCH(X86_64)
if (!APIC::initialized())
return false;
#endif
return m_pci_identifier->is_msix_capable();
}