Lines Matching refs:hptep
349 __be64 *hptep; in kvmppc_mmu_book3s_64_hv_xlate() local
375 hptep = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_mmu_book3s_64_hv_xlate()
376 v = orig_v = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK; in kvmppc_mmu_book3s_64_hv_xlate()
378 v = hpte_new_to_old_v(v, be64_to_cpu(hptep[1])); in kvmppc_mmu_book3s_64_hv_xlate()
381 unlock_hpte(hptep, orig_v); in kvmppc_mmu_book3s_64_hv_xlate()
512 __be64 *hptep; in kvmppc_book3s_hv_page_fault() local
554 hptep = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_book3s_hv_page_fault()
557 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in kvmppc_book3s_hv_page_fault()
559 hpte[0] = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK; in kvmppc_book3s_hv_page_fault()
560 hpte[1] = be64_to_cpu(hptep[1]); in kvmppc_book3s_hv_page_fault()
562 unlock_hpte(hptep, hpte[0]); in kvmppc_book3s_hv_page_fault()
681 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in kvmppc_book3s_hv_page_fault()
683 hnow_v = be64_to_cpu(hptep[0]); in kvmppc_book3s_hv_page_fault()
684 hnow_r = be64_to_cpu(hptep[1]); in kvmppc_book3s_hv_page_fault()
720 if (be64_to_cpu(hptep[0]) & HPTE_V_VALID) { in kvmppc_book3s_hv_page_fault()
723 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_book3s_hv_page_fault()
724 kvmppc_invalidate_hpte(kvm, hptep, index); in kvmppc_book3s_hv_page_fault()
726 r |= be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_book3s_hv_page_fault()
735 hptep[1] = cpu_to_be64(r); in kvmppc_book3s_hv_page_fault()
737 __unlock_hpte(hptep, hpte[0]); in kvmppc_book3s_hv_page_fault()
751 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvmppc_book3s_hv_page_fault()
783 __be64 *hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvmppc_unmap_hpte() local
803 psize = kvmppc_actual_pgsz(be64_to_cpu(hptep[0]), ptel); in kvmppc_unmap_hpte()
804 if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) && in kvmppc_unmap_hpte()
806 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_unmap_hpte()
807 kvmppc_invalidate_hpte(kvm, hptep, i); in kvmppc_unmap_hpte()
808 hptep[1] &= ~cpu_to_be64(HPTE_R_KEY_HI | HPTE_R_KEY_LO); in kvmppc_unmap_hpte()
810 rcbits = be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_unmap_hpte()
825 __be64 *hptep; in kvm_unmap_rmapp() local
842 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_unmap_rmapp()
843 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_unmap_rmapp()
846 while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK) in kvm_unmap_rmapp()
853 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_unmap_rmapp()
904 __be64 *hptep; in kvm_age_rmapp() local
922 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_age_rmapp()
926 if (!(be64_to_cpu(hptep[1]) & HPTE_R_R)) in kvm_age_rmapp()
929 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_age_rmapp()
932 while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK) in kvm_age_rmapp()
938 if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) && in kvm_age_rmapp()
939 (be64_to_cpu(hptep[1]) & HPTE_R_R)) { in kvm_age_rmapp()
940 kvmppc_clear_ref_hpte(kvm, hptep, i); in kvm_age_rmapp()
947 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_age_rmapp()
1040 __be64 *hptep; in kvm_test_clear_dirty_npages() local
1053 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_test_clear_dirty_npages()
1070 hptep1 = be64_to_cpu(hptep[1]); in kvm_test_clear_dirty_npages()
1075 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_test_clear_dirty_npages()
1078 while (hptep[0] & cpu_to_be64(HPTE_V_HVLOCK)) in kvm_test_clear_dirty_npages()
1084 if (!(hptep[0] & cpu_to_be64(HPTE_V_VALID))) { in kvm_test_clear_dirty_npages()
1085 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_test_clear_dirty_npages()
1090 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvm_test_clear_dirty_npages()
1091 kvmppc_invalidate_hpte(kvm, hptep, i); in kvm_test_clear_dirty_npages()
1092 v = be64_to_cpu(hptep[0]); in kvm_test_clear_dirty_npages()
1093 r = be64_to_cpu(hptep[1]); in kvm_test_clear_dirty_npages()
1095 hptep[1] = cpu_to_be64(r & ~HPTE_R_C); in kvm_test_clear_dirty_npages()
1108 __unlock_hpte(hptep, v); in kvm_test_clear_dirty_npages()
1234 __be64 *hptep, *new_hptep; in resize_hpt_rehash_hpte() local
1242 hptep = (__be64 *)(old->virt + (idx << 4)); in resize_hpt_rehash_hpte()
1247 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1251 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in resize_hpt_rehash_hpte()
1254 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1262 rpte = be64_to_cpu(hptep[1]); in resize_hpt_rehash_hpte()
1294 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1302 rpte = be64_to_cpu(hptep[1]); in resize_hpt_rehash_hpte()
1377 unlock_hpte(hptep, vpte); in resize_hpt_rehash_hpte()