diff --git a/cpus.c b/cpus.c
index be3a4eb27aec203236c55987167b02e30910fb24..d1f16296de7ef526ca0d0ce403b3bc8e70d5679a 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1648,7 +1648,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
     /* process any pending work */
     cpu->exit_request = 1;
 
-    while (1) {
+    do {
         if (cpu_can_run(cpu)) {
             int r;
             qemu_mutex_unlock_iothread();