From patchwork Fri Jan 22 10:50:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Yu-B13201 X-Patchwork-Id: 74598 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0MAxF33021867 for ; Fri, 22 Jan 2010 10:59:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753919Ab0AVK7N (ORCPT ); Fri, 22 Jan 2010 05:59:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753886Ab0AVK7N (ORCPT ); Fri, 22 Jan 2010 05:59:13 -0500 Received: from az33egw02.freescale.net ([192.88.158.103]:36937 "EHLO az33egw02.freescale.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011Ab0AVK7L (ORCPT ); Fri, 22 Jan 2010 05:59:11 -0500 Received: from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151]) by az33egw02.freescale.net (8.14.3/az33egw02) with ESMTP id o0MAx3t6015614; Fri, 22 Jan 2010 03:59:03 -0700 (MST) Received: from zch01exm26.fsl.freescale.net (zch01exm26.ap.freescale.net [10.192.129.221]) by de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id o0MB5c4F021801; Fri, 22 Jan 2010 05:05:42 -0600 (CST) Received: from localhost ([10.193.20.106]) by zch01exm26.fsl.freescale.net with Microsoft SMTPSVC(6.0.3790.3959); Fri, 22 Jan 2010 18:58:57 +0800 From: Liu Yu To: kvm-ppc@vger.kernel.org, agraf@suse.de, kvm@vger.kernel.org Cc: Liu Yu Subject: [PATCH v2 2/3] kvmppc/e500: Add PVR/PIR init for E500 Date: Fri, 22 Jan 2010 18:50:30 +0800 Message-Id: <1264157431-16396-3-git-send-email-yu.liu@freescale.com> X-Mailer: git-send-email 1.6.4 In-Reply-To: <1264157431-16396-2-git-send-email-yu.liu@freescale.com> References: <1264157431-16396-1-git-send-email-yu.liu@freescale.com> <1264157431-16396-2-git-send-email-yu.liu@freescale.com> X-OriginalArrivalTime: 22 Jan 2010 10:58:58.0149 (UTC) FILETIME=[E5AD8150:01CA9B51] Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/powerpc/kvm/e500.c b/arch/powerpc/kvm/e500.c index 64949ee..efa1198 100644 --- a/arch/powerpc/kvm/e500.c +++ b/arch/powerpc/kvm/e500.c @@ -60,6 +60,12 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) kvmppc_e500_tlb_setup(vcpu_e500); + /* Registers init */ + vcpu->arch.pvr = mfspr(SPRN_PVR); + + /* Since booke kvm only support one core, update all vcpus' PIR to 0 */ + vcpu->vcpu_id = 0; + return 0; }