Lines Matching refs:hptep

348 	__be64 *hptep;  in kvmppc_mmu_book3s_64_hv_xlate()  local
374 hptep = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_mmu_book3s_64_hv_xlate()
375 v = orig_v = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK; in kvmppc_mmu_book3s_64_hv_xlate()
377 v = hpte_new_to_old_v(v, be64_to_cpu(hptep[1])); in kvmppc_mmu_book3s_64_hv_xlate()
380 unlock_hpte(hptep, orig_v); in kvmppc_mmu_book3s_64_hv_xlate()
511 __be64 *hptep; in kvmppc_book3s_hv_page_fault() local
553 hptep = (__be64 *)(kvm->arch.hpt.virt + (index << 4)); in kvmppc_book3s_hv_page_fault()
556 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in kvmppc_book3s_hv_page_fault()
558 hpte[0] = be64_to_cpu(hptep[0]) & ~HPTE_V_HVLOCK; in kvmppc_book3s_hv_page_fault()
559 hpte[1] = be64_to_cpu(hptep[1]); in kvmppc_book3s_hv_page_fault()
561 unlock_hpte(hptep, hpte[0]); in kvmppc_book3s_hv_page_fault()
680 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in kvmppc_book3s_hv_page_fault()
682 hnow_v = be64_to_cpu(hptep[0]); in kvmppc_book3s_hv_page_fault()
683 hnow_r = be64_to_cpu(hptep[1]); in kvmppc_book3s_hv_page_fault()
719 if (be64_to_cpu(hptep[0]) & HPTE_V_VALID) { in kvmppc_book3s_hv_page_fault()
722 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_book3s_hv_page_fault()
723 kvmppc_invalidate_hpte(kvm, hptep, index); in kvmppc_book3s_hv_page_fault()
725 r |= be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_book3s_hv_page_fault()
734 hptep[1] = cpu_to_be64(r); in kvmppc_book3s_hv_page_fault()
736 __unlock_hpte(hptep, hpte[0]); in kvmppc_book3s_hv_page_fault()
750 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvmppc_book3s_hv_page_fault()
782 __be64 *hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvmppc_unmap_hpte() local
802 psize = kvmppc_actual_pgsz(be64_to_cpu(hptep[0]), ptel); in kvmppc_unmap_hpte()
803 if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) && in kvmppc_unmap_hpte()
805 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvmppc_unmap_hpte()
806 kvmppc_invalidate_hpte(kvm, hptep, i); in kvmppc_unmap_hpte()
807 hptep[1] &= ~cpu_to_be64(HPTE_R_KEY_HI | HPTE_R_KEY_LO); in kvmppc_unmap_hpte()
809 rcbits = be64_to_cpu(hptep[1]) & (HPTE_R_R | HPTE_R_C); in kvmppc_unmap_hpte()
824 __be64 *hptep; in kvm_unmap_rmapp() local
841 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_unmap_rmapp()
842 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_unmap_rmapp()
845 while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK) in kvm_unmap_rmapp()
852 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_unmap_rmapp()
903 __be64 *hptep; in kvm_age_rmapp() local
921 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_age_rmapp()
925 if (!(be64_to_cpu(hptep[1]) & HPTE_R_R)) in kvm_age_rmapp()
928 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_age_rmapp()
931 while (be64_to_cpu(hptep[0]) & HPTE_V_HVLOCK) in kvm_age_rmapp()
937 if ((be64_to_cpu(hptep[0]) & HPTE_V_VALID) && in kvm_age_rmapp()
938 (be64_to_cpu(hptep[1]) & HPTE_R_R)) { in kvm_age_rmapp()
939 kvmppc_clear_ref_hpte(kvm, hptep, i); in kvm_age_rmapp()
946 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_age_rmapp()
1039 __be64 *hptep; in kvm_test_clear_dirty_npages() local
1052 hptep = (__be64 *) (kvm->arch.hpt.virt + (i << 4)); in kvm_test_clear_dirty_npages()
1069 hptep1 = be64_to_cpu(hptep[1]); in kvm_test_clear_dirty_npages()
1074 if (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) { in kvm_test_clear_dirty_npages()
1077 while (hptep[0] & cpu_to_be64(HPTE_V_HVLOCK)) in kvm_test_clear_dirty_npages()
1083 if (!(hptep[0] & cpu_to_be64(HPTE_V_VALID))) { in kvm_test_clear_dirty_npages()
1084 __unlock_hpte(hptep, be64_to_cpu(hptep[0])); in kvm_test_clear_dirty_npages()
1089 hptep[0] |= cpu_to_be64(HPTE_V_ABSENT); in kvm_test_clear_dirty_npages()
1090 kvmppc_invalidate_hpte(kvm, hptep, i); in kvm_test_clear_dirty_npages()
1091 v = be64_to_cpu(hptep[0]); in kvm_test_clear_dirty_npages()
1092 r = be64_to_cpu(hptep[1]); in kvm_test_clear_dirty_npages()
1094 hptep[1] = cpu_to_be64(r & ~HPTE_R_C); in kvm_test_clear_dirty_npages()
1107 __unlock_hpte(hptep, v); in kvm_test_clear_dirty_npages()
1233 __be64 *hptep, *new_hptep; in resize_hpt_rehash_hpte() local
1241 hptep = (__be64 *)(old->virt + (idx << 4)); in resize_hpt_rehash_hpte()
1246 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1250 while (!try_lock_hpte(hptep, HPTE_V_HVLOCK)) in resize_hpt_rehash_hpte()
1253 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1261 rpte = be64_to_cpu(hptep[1]); in resize_hpt_rehash_hpte()
1293 vpte = be64_to_cpu(hptep[0]); in resize_hpt_rehash_hpte()
1301 rpte = be64_to_cpu(hptep[1]); in resize_hpt_rehash_hpte()
1376 unlock_hpte(hptep, vpte); in resize_hpt_rehash_hpte()