From patchwork Tue Jun 17 22:10:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 361209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AD150140081 for ; Wed, 18 Jun 2014 08:17:11 +1000 (EST) Received: from localhost ([::1]:53844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx1gj-0004P0-Au for incoming@patchwork.ozlabs.org; Tue, 17 Jun 2014 18:17:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx1e4-0008RY-J2 for qemu-devel@nongnu.org; Tue, 17 Jun 2014 18:14:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wx1dr-00007R-OT for qemu-devel@nongnu.org; Tue, 17 Jun 2014 18:14:24 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:49927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wx1dr-000076-J5 for qemu-devel@nongnu.org; Tue, 17 Jun 2014 18:14:11 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id BD120660D7064; Tue, 17 Jun 2014 23:14:03 +0100 (IST) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.181.6; Tue, 17 Jun 2014 23:10:50 +0100 Received: from jhogan-linux.le.imgtec.org (192.168.154.101) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 17 Jun 2014 23:10:50 +0100 From: James Hogan To: Date: Tue, 17 Jun 2014 23:10:33 +0100 Message-ID: <1403043037-1271-9-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403043037-1271-1-git-send-email-james.hogan@imgtec.com> References: <1403043037-1271-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.154.101] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.59.15.196 Cc: James Hogan , kvm@vger.kernel.org, Gleb Natapov , Sanjay Lal , Paolo Bonzini , Aurelien Jarno Subject: [Qemu-devel] [PATCH v5 08/12] target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Cc: Aurelien Jarno Cc: Paolo Bonzini Cc: Gleb Natapov --- Changes in v5: - New patch, based on commit 50a2c6e55fa2 (kvm: reset state from the CPU's reset method). --- target-mips/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target-mips/cpu.c b/target-mips/cpu.c index dd954fc55a10..b3e0e6cce7b6 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)