]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target-mips/cpu.c
target-mips: implement R6 multi-threading
[mirror_qemu.git] / target-mips / cpu.c
index 0b3f130cf2e8f63792711e820cd1a58b22c925e3..7dc3a44a159778a73ee87be9acb54d0ba42c4613 100644 (file)
@@ -77,6 +77,15 @@ static bool mips_cpu_has_work(CPUState *cs)
             has_work = false;
         }
     }
+    /* MIPS Release 6 has the ability to halt the CPU.  */
+    if (env->CP0_Config5 & (1 << CP0C5_VP)) {
+        if (cs->interrupt_request & CPU_INTERRUPT_WAKE) {
+            has_work = true;
+        }
+        if (!mips_vp_active(env)) {
+            has_work = false;
+        }
+    }
     return has_work;
 }