Workaround for QEMU BUG that causes CI to hang

This commit is contained in:
Ruihan Li 2023-12-11 10:25:14 +08:00 committed by Tate, Hongliang Tian
parent f1a7c767d2
commit af81741f23
1 changed files with 4 additions and 0 deletions

View File

@ -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() {