diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/book3s_64_mmu_host.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c index 41af12fb1260..5545c45ea57f 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_host.c +++ b/arch/powerpc/kvm/book3s_64_mmu_host.c | |||
@@ -231,10 +231,16 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte) | |||
231 | vcpu->arch.mmu.esid_to_vsid(vcpu, orig_pte->eaddr >> SID_SHIFT, &vsid); | 231 | vcpu->arch.mmu.esid_to_vsid(vcpu, orig_pte->eaddr >> SID_SHIFT, &vsid); |
232 | map = find_sid_vsid(vcpu, vsid); | 232 | map = find_sid_vsid(vcpu, vsid); |
233 | if (!map) { | 233 | if (!map) { |
234 | kvmppc_mmu_map_segment(vcpu, orig_pte->eaddr); | 234 | ret = kvmppc_mmu_map_segment(vcpu, orig_pte->eaddr); |
235 | WARN_ON(ret < 0); | ||
235 | map = find_sid_vsid(vcpu, vsid); | 236 | map = find_sid_vsid(vcpu, vsid); |
236 | } | 237 | } |
237 | BUG_ON(!map); | 238 | if (!map) { |
239 | printk(KERN_ERR "KVM: Segment map for 0x%llx (0x%lx) failed\n", | ||
240 | vsid, orig_pte->eaddr); | ||
241 | WARN_ON(true); | ||
242 | return -EINVAL; | ||
243 | } | ||
238 | 244 | ||
239 | vsid = map->host_vsid; | 245 | vsid = map->host_vsid; |
240 | va = hpt_va(orig_pte->eaddr, vsid, MMU_SEGSIZE_256M); | 246 | va = hpt_va(orig_pte->eaddr, vsid, MMU_SEGSIZE_256M); |