diff --git a/framework/jinux-frame/src/arch/x86/irq.rs b/framework/jinux-frame/src/arch/x86/irq.rs index 4fcc83d50..2a54aa670 100644 --- a/framework/jinux-frame/src/arch/x86/irq.rs +++ b/framework/jinux-frame/src/arch/x86/irq.rs @@ -27,6 +27,10 @@ pub(crate) fn init() { pub(crate) fn enable_local() { x86_64::instructions::interrupts::enable(); + // When emulated with QEMU, interrupts may not be delivered if a STI instruction is immediately + // followed by a RET instruction. It is a BUG of QEMU, see the following patch for details. + // https://lore.kernel.org/qemu-devel/20231210190147.129734-2-lrh2000@pku.edu.cn/ + x86_64::instructions::nop(); } pub(crate) fn disable_local() {