]> git.proxmox.com Git - qemu.git/commit
target-mips: fix host CPU consumption when guest is idle
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 25 Dec 2010 21:56:32 +0000 (22:56 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 26 Dec 2010 23:58:06 +0000 (00:58 +0100)
commit4cdc1cd137e0b98766916a7cdf2d5a9b3c6632fa
tree4634bbca8423124883394dcf88957a3ed52ce0b0
parent6c33286ad3a432627d763ee93aa42200cbb68269
target-mips: fix host CPU consumption when guest is idle

When the CPU is in wait state, do not wake-up if an interrupt can't be
taken. This avoid host CPU running at 100% if a device (e.g. timer) has
an interrupt line left enabled.

Also factorize code to check if interrupts are enabled in
cpu_mips_hw_interrupts_pending().

Based on a patch from Edgar E. Iglesias <edgar.iglesias@gmail.com>

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
cpu-exec.c
target-mips/cpu.h
target-mips/exec.h