提交 4601f7b0 编写于 作者: J Jan Kiszka 提交者: Marcelo Tosatti

kvm: x86: Do not leave halt if interrupts are disabled

When an external interrupt is pending but IF is cleared, we must not
leave the halt state prematurely.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
上级 f2c1cc81
......@@ -1590,7 +1590,9 @@ int kvm_arch_process_async_events(CPUState *env)
return 0;
}
if (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
if (((env->interrupt_request & CPU_INTERRUPT_HARD) &&
(env->eflags & IF_MASK)) ||
(env->interrupt_request & CPU_INTERRUPT_NMI)) {
env->halted = 0;
}
if (env->interrupt_request & CPU_INTERRUPT_INIT) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册