target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset()
authorJames Hogan <james.hogan@imgtec.com>
Tue, 17 Jun 2014 22:10:33 +0000 (23:10 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Jun 2014 14:59:05 +0000 (16:59 +0200)
When KVM is enabled call kvm_mips_reset_vcpu() from mips_cpu_reset() as
done for other targets since commit 50a2c6e55fa2 (kvm: reset state from
the CPU's reset method).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-mips/cpu.c

index dd954fc55a10e5a4ce05703a9fa2ca4a14267b4d..b3e0e6cce7b6d6a606c4ff05585e01cbe9fc7cfd 100644 (file)
@@ -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)