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>
This commit is contained in:

committed by
Alexander Graf

parent
e51f8f32d6
commit
7cdd7a95c6
@@ -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__ */
|
||||
|
Reference in New Issue
Block a user