diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-03-15 12:26:18 +0100 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2011-03-16 17:11:05 -0300 |
commit | f2c1cc81c8229e8c1e26aae517d32aa534936a0c (patch) | |
tree | 64dc4e0eca74c41873a55d466e6358baa94e07ae /cpus.c | |
parent | fd28aa132362320f9f3a30b23f634bb14dee528e (diff) |
kvm: Add in-kernel irqchip awareness to cpu_thread_is_idle
With in-kernel irqchip support enabled, the vcpu threads sleep in kernel
space while halted. Account for this difference in cpu_thread_is_idle.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r-- | cpus.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -148,7 +148,8 @@ static bool cpu_thread_is_idle(CPUState *env) if (env->stopped || !vm_running) { return true; } - if (!env->halted || qemu_cpu_has_work(env)) { + if (!env->halted || qemu_cpu_has_work(env) || + (kvm_enabled() && kvm_irqchip_in_kernel())) { return false; } return true; |