Lines Matching refs:hpte

190 	__be64 *hpte;  in kvmppc_do_h_enter()  local
307 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
309 if ((be64_to_cpu(*hpte) & HPTE_V_VALID) == 0 && in kvmppc_do_h_enter()
310 try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
313 hpte += 2; in kvmppc_do_h_enter()
322 hpte -= 16; in kvmppc_do_h_enter()
325 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
327 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
330 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
331 hpte += 2; in kvmppc_do_h_enter()
338 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
339 if (!try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
344 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
346 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
348 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
389 hpte[1] = cpu_to_be64(ptel); in kvmppc_do_h_enter()
393 __unlock_hpte(hpte, pteh); in kvmppc_do_h_enter()
489 __be64 *hpte; in kvmppc_do_h_remove() local
498 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_remove()
499 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_remove()
501 pte = orig_pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_remove()
502 pte_r = be64_to_cpu(hpte[1]); in kvmppc_do_h_remove()
510 __unlock_hpte(hpte, orig_pte); in kvmppc_do_h_remove()
517 hpte[0] &= ~cpu_to_be64(HPTE_V_VALID); in kvmppc_do_h_remove()
530 be64_to_cpu(hpte[1])); in kvmppc_do_h_remove()
534 unlock_hpte(hpte, 0); in kvmppc_do_h_remove()
678 __be64 *hpte; in kvmppc_h_protect() local
688 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_protect()
689 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_protect()
691 v = pte_v = be64_to_cpu(hpte[0]); in kvmppc_h_protect()
693 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[1])); in kvmppc_h_protect()
696 __unlock_hpte(hpte, pte_v); in kvmppc_h_protect()
700 pte_r = be64_to_cpu(hpte[1]); in kvmppc_h_protect()
728 hpte[0] = cpu_to_be64((pte_v & ~HPTE_V_VALID) | in kvmppc_h_protect()
732 r |= be64_to_cpu(hpte[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_h_protect()
733 hpte[1] = cpu_to_be64(r); in kvmppc_h_protect()
736 unlock_hpte(hpte, pte_v & ~HPTE_V_HVLOCK); in kvmppc_h_protect()
749 __be64 *hpte; in kvmppc_h_read() local
764 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_read()
765 v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_h_read()
766 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()
839 __be64 *hpte; in kvmppc_h_clear_mod() local
850 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_clear_mod()
851 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_clear_mod()
853 v = be64_to_cpu(hpte[0]); in kvmppc_h_clear_mod()
854 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
865 hpte[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_h_clear_mod()
866 kvmppc_invalidate_hpte(kvm, hpte, pte_index); in kvmppc_h_clear_mod()
867 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
870 hpte[1] = cpu_to_be64(r & ~HPTE_R_C); in kvmppc_h_clear_mod()
878 unlock_hpte(hpte, v & ~HPTE_V_HVLOCK); in kvmppc_h_clear_mod()
1105 __be64 *hpte; in kvmppc_hv_find_lock_hpte() local
1137 hpte = (__be64 *)(kvm->arch.hpt.virt + (hash << 7)); in kvmppc_hv_find_lock_hpte()
1141 v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1143 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[i+1])); in kvmppc_hv_find_lock_hpte()
1150 while (!try_lock_hpte(&hpte[i], HPTE_V_HVLOCK)) in kvmppc_hv_find_lock_hpte()
1152 v = orig_v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1153 r = be64_to_cpu(hpte[i+1]); in kvmppc_hv_find_lock_hpte()
1167 __unlock_hpte(&hpte[i], orig_v); in kvmppc_hv_find_lock_hpte()
1196 __be64 *hpte; in kvmppc_hpte_hv_fault() local
1222 hpte = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_hpte_hv_fault()
1223 v = orig_v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_hpte_hv_fault()
1224 r = be64_to_cpu(hpte[1]); in kvmppc_hpte_hv_fault()
1232 unlock_hpte(hpte, orig_v); in kvmppc_hpte_hv_fault()