mirror of
https://github.com/sp00nznet/xboxrecomp.git
synced 2026-12-05 18:13:13 +00:00
2fb0b4461d
With the gate on, a lower from a device IRQL to DISPATCH kept the gate and ran no safe point: the thunk's safe point comes before the bridge, still at the old level, so an interrupt posted while the thread was above DISPATCH waited for its next kernel call, and a guest that went on at DISPATCH with no kernel call left it posted. The console takes it at the lower; KfLowerIrql now does too. Without the gate nothing is ever posted and the added safe point returns on its first load. tests/irq_progress measures interrupt service and DPC completion with the gate and RECOMP_GUEST_LOCK on and one guest thread, so no hand-off can be what makes progress, and checks the guest CPU counted no turn, switch or preemption. Its kernel calls go through the thunk dispatch, and a timer stand-in runs the timer thread's drain (xbox_DpcDrainTimer, a seam over kernel_drain_dpcs). It covers a spin at PASSIVE with no kernel call (ISR at once off the guest thread, DPC on the timer thread while the guest spins), a spin at DISPATCH with kernel calls (ISR at the next call, DPC held until the lower), a spin at DISPATCH on back edges only (posted, logged past RECOMP_IRQ_SAFE_MS, run at the first kernel call; RECOMP_IRQ_SAFE_FORCE delivers beside the holder), and IRQL 26 (refused safe points, run at the lower to DISPATCH). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>