Lines Matching refs:hpte
203 __be64 *hpte; in kvmppc_do_h_enter() local
311 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
313 if ((be64_to_cpu(*hpte) & HPTE_V_VALID) == 0 && in kvmppc_do_h_enter()
314 try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
317 hpte += 2; in kvmppc_do_h_enter()
326 hpte -= 16; in kvmppc_do_h_enter()
329 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
331 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
334 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
335 hpte += 2; in kvmppc_do_h_enter()
342 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
343 if (!try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
348 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
350 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
352 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
393 hpte[1] = cpu_to_be64(ptel); in kvmppc_do_h_enter()
397 __unlock_hpte(hpte, pteh); in kvmppc_do_h_enter()
492 __be64 *hpte; in kvmppc_do_h_remove() local
501 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_remove()
502 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_remove()
504 pte = orig_pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_remove()
505 pte_r = be64_to_cpu(hpte[1]); in kvmppc_do_h_remove()
513 __unlock_hpte(hpte, orig_pte); in kvmppc_do_h_remove()
520 hpte[0] &= ~cpu_to_be64(HPTE_V_VALID); in kvmppc_do_h_remove()
533 be64_to_cpu(hpte[1])); in kvmppc_do_h_remove()
537 unlock_hpte(hpte, 0); in kvmppc_do_h_remove()
680 __be64 *hpte; in kvmppc_h_protect() local
690 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_protect()
691 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_protect()
693 v = pte_v = be64_to_cpu(hpte[0]); in kvmppc_h_protect()
695 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[1])); in kvmppc_h_protect()
698 __unlock_hpte(hpte, pte_v); in kvmppc_h_protect()
702 pte_r = be64_to_cpu(hpte[1]); in kvmppc_h_protect()
730 hpte[0] = cpu_to_be64((pte_v & ~HPTE_V_VALID) | in kvmppc_h_protect()
734 r |= be64_to_cpu(hpte[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_h_protect()
735 hpte[1] = cpu_to_be64(r); in kvmppc_h_protect()
738 unlock_hpte(hpte, pte_v & ~HPTE_V_HVLOCK); in kvmppc_h_protect()
750 __be64 *hpte; in kvmppc_h_read() local
765 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_read()
766 v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_h_read()
767 r = be64_to_cpu(hpte[1]); in kvmppc_h_read()
790 __be64 *hpte; in kvmppc_h_clear_ref() local
802 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_clear_ref()
803 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_clear_ref()
805 v = be64_to_cpu(hpte[0]); in kvmppc_h_clear_ref()
806 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_ref()
818 kvmppc_clear_ref_hpte(kvm, hpte, pte_index); in kvmppc_h_clear_ref()
830 unlock_hpte(hpte, v & ~HPTE_V_HVLOCK); in kvmppc_h_clear_ref()
838 __be64 *hpte; in kvmppc_h_clear_mod() local
849 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_clear_mod()
850 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_clear_mod()
852 v = be64_to_cpu(hpte[0]); in kvmppc_h_clear_mod()
853 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
864 hpte[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_h_clear_mod()
865 kvmppc_invalidate_hpte(kvm, hpte, pte_index); in kvmppc_h_clear_mod()
866 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
869 hpte[1] = cpu_to_be64(r & ~HPTE_R_C); in kvmppc_h_clear_mod()
877 unlock_hpte(hpte, v & ~HPTE_V_HVLOCK); in kvmppc_h_clear_mod()
1103 __be64 *hpte; in kvmppc_hv_find_lock_hpte() local
1135 hpte = (__be64 *)(kvm->arch.hpt.virt + (hash << 7)); in kvmppc_hv_find_lock_hpte()
1139 v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1141 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[i+1])); in kvmppc_hv_find_lock_hpte()
1148 while (!try_lock_hpte(&hpte[i], HPTE_V_HVLOCK)) in kvmppc_hv_find_lock_hpte()
1150 v = orig_v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1151 r = be64_to_cpu(hpte[i+1]); in kvmppc_hv_find_lock_hpte()
1165 __unlock_hpte(&hpte[i], orig_v); in kvmppc_hv_find_lock_hpte()
1194 __be64 *hpte; in kvmppc_hpte_hv_fault() local
1220 hpte = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_hpte_hv_fault()
1221 v = orig_v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_hpte_hv_fault()
1222 r = be64_to_cpu(hpte[1]); in kvmppc_hpte_hv_fault()
1230 unlock_hpte(hpte, orig_v); in kvmppc_hpte_hv_fault()