aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-mips/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-mips/cpu.c b/target-mips/cpu.c
index dd954fc55a..b3e0e6cce7 100644
--- a/target-mips/cpu.c
+++ b/target-mips/cpu.c
@@ -19,7 +19,9 @@
*/
#include "cpu.h"
+#include "kvm_mips.h"
#include "qemu-common.h"
+#include "sysemu/kvm.h"
static void mips_cpu_set_pc(CPUState *cs, vaddr value)
@@ -87,6 +89,12 @@ static void mips_cpu_reset(CPUState *s)
tlb_flush(s, 1);
cpu_state_reset(env);
+
+#ifndef CONFIG_USER_ONLY
+ if (kvm_enabled()) {
+ kvm_mips_reset_vcpu(cpu);
+ }
+#endif
}
static void mips_cpu_realizefn(DeviceState *dev, Error **errp)