genode/repos/base-nova/patches/syscall_msi.patch
Johannes Schlatow f55d06fd5c base-nova: allow MSI for non-PCI devices
DMA remapping hardware units use MSI for fault events. However, MSI
were bound to the presence of a PCI configuration space.

genodelabs/genode#5002
2023-11-28 19:35:16 +01:00

14 lines
749 B
Diff

diff --git a/src/syscall.cpp b/src/syscall.cpp
index 838bfee..5619293 100644
--- a/src/syscall.cpp
+++ b/src/syscall.cpp
@@ -1205,7 +1205,7 @@ void Ec::sys_assign_gsi()
sys_finish<Sys_regs::BAD_DEV>();
}
- if (EXPECT_FALSE (!Gsi::gsi_table[gsi].ioapic && (!Pd::current->Space_mem::lookup (r->dev(), phys) || ((rid = Pci::phys_to_rid (phys)) == ~0U && (rid = Hpet::phys_to_rid (phys)) == ~0U)))) {
+ if (EXPECT_FALSE (!Gsi::gsi_table[gsi].ioapic && r->dev() && (!Pd::current->Space_mem::lookup (r->dev(), phys) || ((rid = Pci::phys_to_rid (phys)) == ~0U && (rid = Hpet::phys_to_rid (phys)) == ~0U)))) {
trace (TRACE_ERROR, "%s: Non-DEV CAP (%#lx)", __func__, r->dev());
sys_finish<Sys_regs::BAD_DEV>();
}