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: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
f2c1cc81c8
commit
4601f7b04c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user