Align with qemu-kvm and prepare for IO exit fix: There is no need to run
kvm_arch_process_irqchip_events in the inner VCPU loop. Any state change
this service processes will first cause an exit from kvm_cpu_exec
anyway. And we will have to reenter the kernel on IO exits
unconditionally, something that the current logic prevents.
Signed-off-by: Jan Kiszka<address@hidden>
---
kvm-all.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 5bfa8c0..46ecc1c 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -892,6 +892,12 @@ int kvm_cpu_exec(CPUState *env)
DPRINTF("kvm_cpu_exec()\n");
+ if (kvm_arch_process_irqchip_events(env)) {
+ env->exit_request = 0;
+ env->exception_index = EXCP_HLT;
+ return 0;
+ }
+
do {
#ifndef CONFIG_IOTHREAD
if (env->exit_request) {
@@ -901,11 +907,6 @@ int kvm_cpu_exec(CPUState *env)
}