aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_64_mmu_hv.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_mmu_hv.c')
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_hv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 5880dfb31074..710d31317d81 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -675,6 +675,7 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
675 } 675 }
676 /* if the guest wants write access, see if that is OK */ 676 /* if the guest wants write access, see if that is OK */
677 if (!writing && hpte_is_writable(r)) { 677 if (!writing && hpte_is_writable(r)) {
678 unsigned int hugepage_shift;
678 pte_t *ptep, pte; 679 pte_t *ptep, pte;
679 680
680 /* 681 /*
@@ -683,9 +684,10 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
683 */ 684 */
684 rcu_read_lock_sched(); 685 rcu_read_lock_sched();
685 ptep = find_linux_pte_or_hugepte(current->mm->pgd, 686 ptep = find_linux_pte_or_hugepte(current->mm->pgd,
686 hva, NULL); 687 hva, &hugepage_shift);
687 if (ptep && pte_present(*ptep)) { 688 if (ptep) {
688 pte = kvmppc_read_update_linux_pte(ptep, 1); 689 pte = kvmppc_read_update_linux_pte(ptep, 1,
690 hugepage_shift);
689 if (pte_write(pte)) 691 if (pte_write(pte))
690 write_ok = 1; 692 write_ok = 1;
691 } 693 }