Commit 9781e759 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

powerpc/kvm/book3s: Use find_kvm_host_pte in page fault handler

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200505071729.54912-14-aneesh.kumar@linux.ibm.com
parent 35528876
...@@ -602,12 +602,12 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu, ...@@ -602,12 +602,12 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
* Read the PTE from the process' radix tree and use that * Read the PTE from the process' radix tree and use that
* so we get the shift and attribute bits. * so we get the shift and attribute bits.
*/ */
local_irq_disable(); spin_lock(&kvm->mmu_lock);
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift); ptep = find_kvm_host_pte(kvm, mmu_seq, hva, &shift);
pte = __pte(0); pte = __pte(0);
if (ptep) if (ptep)
pte = *ptep; pte = READ_ONCE(*ptep);
local_irq_enable(); spin_unlock(&kvm->mmu_lock);
/* /*
* If the PTE disappeared temporarily due to a THP * If the PTE disappeared temporarily due to a THP
* collapse, just return and let the guest try again. * collapse, just return and let the guest try again.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment