aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_host.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c
index 25bd4ede722c..a01e9c5a3fc7 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_host.c
@@ -270,6 +270,13 @@ map_again:
270 (rflags & HPTE_R_N) ? '-' : 'x', 270 (rflags & HPTE_R_N) ? '-' : 'x',
271 orig_pte->eaddr, hpteg, va, orig_pte->vpage, hpaddr); 271 orig_pte->eaddr, hpteg, va, orig_pte->vpage, hpaddr);
272 272
273 /* The ppc_md code may give us a secondary entry even though we
274 asked for a primary. Fix up. */
275 if ((ret & _PTEIDX_SECONDARY) && !(vflags & HPTE_V_SECONDARY)) {
276 hash = ~hash;
277 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
278 }
279
273 pte->slot = hpteg + (ret & 7); 280 pte->slot = hpteg + (ret & 7);
274 pte->host_va = va; 281 pte->host_va = va;
275 pte->pte = *orig_pte; 282 pte->pte = *orig_pte;