summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/kvm_ppc.h
diff options
context:
space:
mode:
authorMihai Caraman <mihai.caraman@freescale.com>2012-10-11 06:13:22 +0000
committerAlexander Graf <agraf@suse.de>2012-12-06 01:34:12 +0100
commit7cdd7a95c66a6309ae6156471033fb5375cbcfca (patch)
tree5a527c59bf4d162b46d3fc9cf6cab0baf5117b2b /arch/powerpc/include/asm/kvm_ppc.h
parente51f8f32d6b82f4a34dbb5781769c79b813e5694 (diff)
downloadblackbird-op-linux-7cdd7a95c66a6309ae6156471033fb5375cbcfca.tar.gz
blackbird-op-linux-7cdd7a95c66a6309ae6156471033fb5375cbcfca.zip
KVM: PPC: e500: Add emulation helper for getting instruction ea
Add emulation helper for getting instruction ea and refactor tlb instruction emulation to use it. Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com> [agraf: keep rt variable around] Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_ppc.h')
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 1ca31e92ee75..d55a2b28706e 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -295,4 +295,15 @@ static inline void kvmppc_lazy_ee_enable(void)
#endif
}
+static inline ulong kvmppc_get_ea_indexed(struct kvm_vcpu *vcpu, int ra, int rb)
+{
+ ulong ea;
+
+ ea = kvmppc_get_gpr(vcpu, rb);
+ if (ra)
+ ea += kvmppc_get_gpr(vcpu, ra);
+
+ return ea;
+}
+
#endif /* __POWERPC_KVM_PPC_H__ */
OpenPOWER on IntegriCloud