aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2009-01-03 17:23:11 -0500
committerAvi Kivity <avi@redhat.com>2009-03-24 05:02:59 -0400
commitb52a638c391c5c7b013180f5374274698b8535c8 (patch)
treebc0e5ed5f177e2c58c61a8ac5254d9072e885a12 /arch/powerpc/kvm
parentbc8080cbcc8870178f0910edd537d0cb5706d703 (diff)
KVM: ppc: Add kvmppc_mmu_dtlb/itlb_miss for booke
When itlb or dtlb miss happens, E500 needs to update some mmu registers. So that the auto-load mechanism can work on E500 when write a tlb entry. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/44x_tlb.c8
-rw-r--r--arch/powerpc/kvm/booke.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
index e67b7313ffc3..4a16f472cc18 100644
--- a/arch/powerpc/kvm/44x_tlb.c
+++ b/arch/powerpc/kvm/44x_tlb.c
@@ -232,6 +232,14 @@ int kvmppc_mmu_dtlb_index(struct kvm_vcpu *vcpu, gva_t eaddr)
232 return kvmppc_44x_tlb_index(vcpu, eaddr, vcpu->arch.pid, as); 232 return kvmppc_44x_tlb_index(vcpu, eaddr, vcpu->arch.pid, as);
233} 233}
234 234
235void kvmppc_mmu_itlb_miss(struct kvm_vcpu *vcpu)
236{
237}
238
239void kvmppc_mmu_dtlb_miss(struct kvm_vcpu *vcpu)
240{
241}
242
235static void kvmppc_44x_shadow_release(struct kvmppc_vcpu_44x *vcpu_44x, 243static void kvmppc_44x_shadow_release(struct kvmppc_vcpu_44x *vcpu_44x,
236 unsigned int stlb_index) 244 unsigned int stlb_index)
237{ 245{
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index a73b3959e41c..933c406c7915 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -295,6 +295,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
295 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_DTLB_MISS); 295 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_DTLB_MISS);
296 vcpu->arch.dear = vcpu->arch.fault_dear; 296 vcpu->arch.dear = vcpu->arch.fault_dear;
297 vcpu->arch.esr = vcpu->arch.fault_esr; 297 vcpu->arch.esr = vcpu->arch.fault_esr;
298 kvmppc_mmu_dtlb_miss(vcpu);
298 kvmppc_account_exit(vcpu, DTLB_REAL_MISS_EXITS); 299 kvmppc_account_exit(vcpu, DTLB_REAL_MISS_EXITS);
299 r = RESUME_GUEST; 300 r = RESUME_GUEST;
300 break; 301 break;
@@ -337,6 +338,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
337 if (gtlb_index < 0) { 338 if (gtlb_index < 0) {
338 /* The guest didn't have a mapping for it. */ 339 /* The guest didn't have a mapping for it. */
339 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_ITLB_MISS); 340 kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_ITLB_MISS);
341 kvmppc_mmu_itlb_miss(vcpu);
340 kvmppc_account_exit(vcpu, ITLB_REAL_MISS_EXITS); 342 kvmppc_account_exit(vcpu, ITLB_REAL_MISS_EXITS);
341 break; 343 break;
342 } 344 }