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: 4371421 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 39F79BEEAA for ; Tue, 17 Jun 2014 22:14:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 61F82201B9 for ; Tue, 17 Jun 2014 22:14:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87836202F2 for ; Tue, 17 Jun 2014 22:14:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967071AbaFQWOO (ORCPT ); Tue, 17 Jun 2014 18:14:14 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:17417 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966780AbaFQWOL (ORCPT ); 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: CC: , Aurelien Jarno , Gleb Natapov , Paolo Bonzini , Sanjay Lal , James Hogan Subject: [PATCH v5 08/12] target-mips: Call kvm_mips_reset_vcpu() from mips_cpu_reset() 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] Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)