From patchwork Fri Nov 6 18:39:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 37884 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9DB3BB70B3 for ; Sat, 7 Nov 2009 05:50:29 +1100 (EST) Received: from localhost ([127.0.0.1]:44951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6TtC-00034r-OY for incoming@patchwork.ozlabs.org; Fri, 06 Nov 2009 13:50:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6Tjg-00006W-EZ for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:40:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6TjZ-0008QG-JC for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:40:34 -0500 Received: from [199.232.76.173] (port=53309 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6TjY-0008P5-P1 for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:40:28 -0500 Received: from goliath.siemens.de ([192.35.17.28]:16753) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N6TjW-0003qZ-AQ for qemu-devel@nongnu.org; Fri, 06 Nov 2009 13:40:26 -0500 Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id nA6IeLjF008322; Fri, 6 Nov 2009 19:40:22 +0100 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id nA6IeLu9007848; Fri, 6 Nov 2009 19:40:21 +0100 Resent-From: Jan Kiszka Resent-To: Anthony Liguori Resent-Cc: qemu-devel , Avi Kivity , Marcelo Tosatti Resent-Date: Fri, 6 Nov 2009 19:40:21 +0100 Resent-Message-Id: <4AF46D95.2070007@siemens.com> Resent-User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 From: Jan Kiszka To: Anthony Liguori Date: Fri, 06 Nov 2009 19:39:24 +0100 Message-ID: <20091106183923.11700.78446.stgit@mchn012c.ww002.siemens.net> In-Reply-To: <20091106183923.11700.68845.stgit@mchn012c.ww002.siemens.net> References: <20091106183923.11700.68845.stgit@mchn012c.ww002.siemens.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Resent-Date: Fri, 06 Nov 2009 13:40:34 -0500 Cc: Marcelo Tosatti , qemu-devel@nongnu.org, Avi Kivity Subject: [Qemu-devel] [PATCH 2/5] kvm: Add arch reset handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Will be required by succeeding changes. Signed-off-by: Jan Kiszka --- kvm-all.c | 2 ++ kvm.h | 2 ++ target-i386/kvm.c | 4 ++++ target-ppc/kvm.c | 4 ++++ 4 files changed, 12 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 48ae26c..31bc2f8 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -150,6 +150,7 @@ static void kvm_reset_vcpu(void *opaque) { CPUState *env = opaque; + kvm_arch_reset_vcpu(env); if (kvm_arch_put_registers(env)) { fprintf(stderr, "Fatal: kvm vcpu reset failed\n"); abort(); @@ -201,6 +202,7 @@ int kvm_init_vcpu(CPUState *env) ret = kvm_arch_init_vcpu(env); if (ret == 0) { qemu_register_reset(kvm_reset_vcpu, env); + kvm_arch_reset_vcpu(env); ret = kvm_arch_put_registers(env); } err: diff --git a/kvm.h b/kvm.h index e7d5beb..6a82f6a 100644 --- a/kvm.h +++ b/kvm.h @@ -93,6 +93,8 @@ int kvm_arch_init(KVMState *s, int smp_cpus); int kvm_arch_init_vcpu(CPUState *env); +void kvm_arch_reset_vcpu(CPUState *env); + struct kvm_guest_debug; struct kvm_debug_exit_arch; diff --git a/target-i386/kvm.c b/target-i386/kvm.c index aa90eff..ca99cc7 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -221,6 +221,10 @@ int kvm_arch_init_vcpu(CPUState *env) return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data); } +void kvm_arch_reset_vcpu(CPUState *env) +{ +} + static int kvm_has_msr_star(CPUState *env) { static int has_msr_star; diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index b53d6e9..4e1c65f 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -53,6 +53,10 @@ int kvm_arch_init_vcpu(CPUState *cenv) return ret; } +void kvm_arch_reset_vcpu(CPUState *env) +{ +} + int kvm_arch_put_registers(CPUState *env) { struct kvm_regs regs;