Lines Matching refs:hpte
182 __be64 *hpte; in kvmppc_do_h_enter() local
300 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
302 if ((be64_to_cpu(*hpte) & HPTE_V_VALID) == 0 && in kvmppc_do_h_enter()
303 try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
306 hpte += 2; in kvmppc_do_h_enter()
315 hpte -= 16; in kvmppc_do_h_enter()
318 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
320 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
323 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
324 hpte += 2; in kvmppc_do_h_enter()
331 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_enter()
332 if (!try_lock_hpte(hpte, HPTE_V_HVLOCK | HPTE_V_VALID | in kvmppc_do_h_enter()
337 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_enter()
339 pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_enter()
341 __unlock_hpte(hpte, pte); in kvmppc_do_h_enter()
382 hpte[1] = cpu_to_be64(ptel); in kvmppc_do_h_enter()
386 __unlock_hpte(hpte, pteh); in kvmppc_do_h_enter()
501 __be64 *hpte; in kvmppc_do_h_remove() local
510 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_do_h_remove()
511 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_do_h_remove()
513 pte = orig_pte = be64_to_cpu(hpte[0]); in kvmppc_do_h_remove()
514 pte_r = be64_to_cpu(hpte[1]); in kvmppc_do_h_remove()
522 __unlock_hpte(hpte, orig_pte); in kvmppc_do_h_remove()
529 hpte[0] &= ~cpu_to_be64(HPTE_V_VALID); in kvmppc_do_h_remove()
542 be64_to_cpu(hpte[1])); in kvmppc_do_h_remove()
546 unlock_hpte(hpte, 0); in kvmppc_do_h_remove()
689 __be64 *hpte; in kvmppc_h_protect() local
699 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_protect()
700 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_protect()
702 v = pte_v = be64_to_cpu(hpte[0]); in kvmppc_h_protect()
704 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[1])); in kvmppc_h_protect()
707 __unlock_hpte(hpte, pte_v); in kvmppc_h_protect()
711 pte_r = be64_to_cpu(hpte[1]); in kvmppc_h_protect()
739 hpte[0] = cpu_to_be64((pte_v & ~HPTE_V_VALID) | in kvmppc_h_protect()
744 r |= be64_to_cpu(hpte[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_h_protect()
745 hpte[1] = cpu_to_be64(r); in kvmppc_h_protect()
748 unlock_hpte(hpte, pte_v & ~HPTE_V_HVLOCK); in kvmppc_h_protect()
760 __be64 *hpte; in kvmppc_h_read() local
775 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_read()
776 v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_h_read()
777 r = be64_to_cpu(hpte[1]); in kvmppc_h_read()
800 __be64 *hpte; in kvmppc_h_clear_ref() local
812 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_clear_ref()
813 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_clear_ref()
815 v = be64_to_cpu(hpte[0]); in kvmppc_h_clear_ref()
816 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_ref()
828 kvmppc_clear_ref_hpte(kvm, hpte, pte_index); in kvmppc_h_clear_ref()
840 unlock_hpte(hpte, v & ~HPTE_V_HVLOCK); in kvmppc_h_clear_ref()
848 __be64 *hpte; in kvmppc_h_clear_mod() local
860 hpte = (__be64 *)(kvm->arch.hpt.virt + (pte_index << 4)); in kvmppc_h_clear_mod()
861 while (!try_lock_hpte(hpte, HPTE_V_HVLOCK)) in kvmppc_h_clear_mod()
863 v = be64_to_cpu(hpte[0]); in kvmppc_h_clear_mod()
864 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
875 hpte[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_h_clear_mod()
876 kvmppc_invalidate_hpte(kvm, hpte, pte_index); in kvmppc_h_clear_mod()
877 r = be64_to_cpu(hpte[1]); in kvmppc_h_clear_mod()
881 hpte[1] = cpu_to_be64(r & ~HPTE_R_C); in kvmppc_h_clear_mod()
895 unlock_hpte(hpte, v & ~HPTE_V_HVLOCK); in kvmppc_h_clear_mod()
988 __be64 *hpte; in kvmppc_hv_find_lock_hpte() local
1020 hpte = (__be64 *)(kvm->arch.hpt.virt + (hash << 7)); in kvmppc_hv_find_lock_hpte()
1024 v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1026 v = hpte_new_to_old_v(v, be64_to_cpu(hpte[i+1])); in kvmppc_hv_find_lock_hpte()
1033 while (!try_lock_hpte(&hpte[i], HPTE_V_HVLOCK)) in kvmppc_hv_find_lock_hpte()
1035 v = orig_v = be64_to_cpu(hpte[i]) & ~HPTE_V_HVLOCK; in kvmppc_hv_find_lock_hpte()
1036 r = be64_to_cpu(hpte[i+1]); in kvmppc_hv_find_lock_hpte()
1050 __unlock_hpte(&hpte[i], orig_v); in kvmppc_hv_find_lock_hpte()
1079 __be64 *hpte; in kvmppc_hpte_hv_fault() local
1105 hpte = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_hpte_hv_fault()
1106 v = orig_v = be64_to_cpu(hpte[0]) & ~HPTE_V_HVLOCK; in kvmppc_hpte_hv_fault()
1107 r = be64_to_cpu(hpte[1]); in kvmppc_hpte_hv_fault()
1115 unlock_hpte(hpte, orig_v); in kvmppc_hpte_hv_fault()