diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2009-01-03 16:23:02 -0600 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-03-24 11:02:56 +0200 |
commit | be8d1cae07d5acf4a61046d7def5eda40f0981e1 (patch) | |
tree | 32560487e3fd05bb6c64c394016e9461c70b2227 /arch/powerpc/kvm/44x_tlb.c | |
parent | 58a96214a306fc7fc66105097eea9c4f3bfa35bc (diff) | |
download | talos-op-linux-be8d1cae07d5acf4a61046d7def5eda40f0981e1.tar.gz talos-op-linux-be8d1cae07d5acf4a61046d7def5eda40f0981e1.zip |
KVM: ppc: turn tlb_xlate() into a per-core hook (and give it a better name)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/44x_tlb.c')
-rw-r--r-- | arch/powerpc/kvm/44x_tlb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c index e8ed22f28eae..2f14671e8a15 100644 --- a/arch/powerpc/kvm/44x_tlb.c +++ b/arch/powerpc/kvm/44x_tlb.c @@ -208,6 +208,16 @@ int kvmppc_44x_tlb_index(struct kvm_vcpu *vcpu, gva_t eaddr, unsigned int pid, return -1; } +gpa_t kvmppc_mmu_xlate(struct kvm_vcpu *vcpu, unsigned int gtlb_index, + gva_t eaddr) +{ + struct kvmppc_vcpu_44x *vcpu_44x = to_44x(vcpu); + struct kvmppc_44x_tlbe *gtlbe = &vcpu_44x->guest_tlb[gtlb_index]; + unsigned int pgmask = get_tlb_bytes(gtlbe) - 1; + + return get_tlb_raddr(gtlbe) | (eaddr & pgmask); +} + int kvmppc_44x_itlb_index(struct kvm_vcpu *vcpu, gva_t eaddr) { unsigned int as = !!(vcpu->arch.msr & MSR_IS); |