From patchwork Mon Jun 18 20:42:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varun Sethi X-Patchwork-Id: 165608 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B76F6B708E for ; Tue, 19 Jun 2012 06:45:31 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752708Ab2FRUpa (ORCPT ); Mon, 18 Jun 2012 16:45:30 -0400 Received: from [216.32.180.11] ([216.32.180.11]:57308 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752475Ab2FRUpa (ORCPT ); Mon, 18 Jun 2012 16:45:30 -0400 Received: from mail172-va3-R.bigfish.com (10.7.14.240) by VA3EHSOBE009.bigfish.com (10.7.40.29) with Microsoft SMTP Server id 14.1.225.23; Mon, 18 Jun 2012 20:42:25 +0000 Received: from mail172-va3 (localhost [127.0.0.1]) by mail172-va3-R.bigfish.com (Postfix) with ESMTP id E73D61A03DC for ; Mon, 18 Jun 2012 20:42:24 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839he5bhf0ah) Received: from mail172-va3 (localhost.localdomain [127.0.0.1]) by mail172-va3 (MessageSwitch) id 1340052121991654_16304; Mon, 18 Jun 2012 20:42:01 +0000 (UTC) Received: from VA3EHSMHS023.bigfish.com (unknown [10.7.14.243]) by mail172-va3.bigfish.com (Postfix) with ESMTP id 5FD94220073 for ; Mon, 18 Jun 2012 20:41:56 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS023.bigfish.com (10.7.99.33) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 18 Jun 2012 20:41:54 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.298.5; Mon, 18 Jun 2012 15:43:11 -0500 Received: from nmglablinux27.ap.freescale.net ([10.213.130.145]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q5IKhA99009113 for ; Mon, 18 Jun 2012 13:43:11 -0700 Received: from nmglablinux27.zin33.ap.freescale.net (localhost [127.0.0.1]) by nmglablinux27.ap.freescale.net (8.14.4/8.14.4/Debian-2ubuntu1) with ESMTP id q5IKgamg001222; Tue, 19 Jun 2012 02:12:36 +0530 Received: (from varuns@localhost) by nmglablinux27.zin33.ap.freescale.net (8.14.4/8.14.4/Submit) id q5IKgatb001221; Tue, 19 Jun 2012 02:12:36 +0530 From: Varun Sethi To: CC: Varun Sethi Subject: [PATCH] KVM: PPC: bookehv64: Add support for std/ld emulation. Date: Tue, 19 Jun 2012 02:12:26 +0530 Message-ID: <1340052146-1172-1-git-send-email-Varun.Sethi@freescale.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-OriginatorOrg: freescale.net Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org Add support for std/ld emulation. Signed-off-by: Varun Sethi --- arch/powerpc/kvm/emulate.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index f90e86d..a04543a 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -59,11 +59,13 @@ #define OP_31_XOP_STHBRX 918 #define OP_LWZ 32 +#define OP_LD 58 #define OP_LWZU 33 #define OP_LBZ 34 #define OP_LBZU 35 #define OP_STW 36 #define OP_STWU 37 +#define OP_STD 62 #define OP_STB 38 #define OP_STBU 39 #define OP_LHZ 40 @@ -392,6 +394,11 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1); break; + case OP_LD: + rt = get_rt(inst); + emulated = kvmppc_handle_load(run, vcpu, rt, 8, 1); + break; + case OP_LWZU: emulated = kvmppc_handle_load(run, vcpu, rt, 4, 1); kvmppc_set_gpr(vcpu, ra, vcpu->arch.vaddr_accessed); @@ -412,6 +419,13 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) 4, 1); break; + case OP_STD: + rs = get_rs(inst); + emulated = kvmppc_handle_store(run, vcpu, + kvmppc_get_gpr(vcpu, rs), + 8, 1); + break; + case OP_STWU: emulated = kvmppc_handle_store(run, vcpu, kvmppc_get_gpr(vcpu, rs),