From 9245ad426a7f0c8d46c4d1d5ad2ced1b5d41e21f Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 20 Jul 2026 18:52:34 +0900 Subject: [PATCH] irq: shared-IRQ re-arm bug-class sweep across base drivers + plan update Bump base fork to 28afc1fe: - ad40fffd ahcid: always re-arm the IRQ line, even for foreign interrupts (from the UAS workstream) - 92924224 e1000d/ihdad/vboxd/xhcid: unconditional ack - 28afc1fe sb16d/ac97d/rtl8139d/rtl8168d/ixgbed/ihdgd: unconditional ack - 54e89a33 fbcond: perform the display handoff open off the console loop (concurrent session's root-cause fix for the '-vga std' boot freeze) Bug class: kernel masks the IRQ line on delivery and only re-arms on the userspace write-back; conditional acks wedged shared INTx lines forever. Explains a class of 'works in QEMU, wedges on real hardware' failures. Full audit + unaffected-driver rationale recorded in the IRQ plan P3 section. --- ...D-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md | 31 +++++++++++++++++++ local/sources/base | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md b/local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md index 349d00cbd5..ae04e53e80 100644 --- a/local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md +++ b/local/docs/IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md @@ -571,6 +571,37 @@ Why third: This improves reliability without changing the underlying architecture. +### Shared-IRQ re-arm bug class — FIXED (2026-07-20) + +A systematic driver bug class was found and fixed across the base driver tree: +the kernel masks the IRQ line when it delivers an interrupt and only re-arms it +on the userspace write-back (irq scheme `write` → `acknowledge()` → +`pic_unmask()`/`ioapic_unmask()`). Drivers that acked only when the interrupt +was their own wedged the line permanently on the first foreign interrupt on a +shared INTx line — every later interrupt for the device was silently lost. + +This is exactly the "works in QEMU (dedicated MSI/INTx), wedges on real +hardware (shared INTx)" failure signature that P1/P6 hardware validation was +expected to hunt. + +Fixed (always ack, tick/process only when ours, device-level status cleared +before re-arm so no interrupt storm): + +- `ahcid` (`ad40fffd`, from the UAS workstream) +- `e1000d`, `ihdad`, `vboxd`, `xhcid` (`92924224`) +- `sb16d`, `ac97d`, `rtl8139d`, `rtl8168d`, `ixgbed`, `ihdgd` (`28afc1fe`) + +Audited, NOT affected: + +- `ided` — already acked unconditionally +- `nvmed` — the shared `executor` crate acks unconditionally for INTx; MSI + vectors are never shared so every delivery is ours by construction +- `virtio-core` consumers — MSI-X only, same reasoning +- `ps2d` — does not use the irq scheme fd path + +Both fix commits verified with `cargo check -Z build-std --target +x86_64-unknown-redox` for every touched crate — clean, no new warnings. + ## Priority 4 — input/controller runtime proof Goal: continue turning the existing input substrate into a well-proven low-level controller path. diff --git a/local/sources/base b/local/sources/base index fb421083e0..28afc1fefd 160000 --- a/local/sources/base +++ b/local/sources/base @@ -1 +1 @@ -Subproject commit fb421083e0bfa3b8f7ab25f923d087de5f0e117f +Subproject commit 28afc1fefdd1cd90dc117be735c7103b1fa1e56d