aboutsummaryrefslogtreecommitdiff
path: root/target-mips/cpu.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-06-17 23:10:33 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-06-18 16:59:05 +0200
commit14c03ab97594d0700d73aedc254579a57b8aeec1 (patch)
tree2401874ebd61b4f3f7ac2b309d427ffe37d4a1f5 /target-mips/cpu.c
parente2132e0bba7751be7af7e3ebcd6f39e77f76d05e (diff)
downloadqemu-14c03ab97594d0700d73aedc254579a57b8aeec1.zip
qemu-14c03ab97594d0700d73aedc254579a57b8aeec1.tar.gz
qemu-14c03ab97594d0700d73aedc254579a57b8aeec1.tar.bz2
target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset()
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>
Diffstat (limited to 'target-mips/cpu.c')
-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 dd954fc..b3e0e6c 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)