projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3552887
)
powerpc/kvm/book3s: Use find_kvm_host_pte in page fault handler
author
Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com>
Tue, 5 May 2020 07:17:20 +0000
(12:47 +0530)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Tue, 5 May 2020 11:20:15 +0000
(21:20 +1000)
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/20200505071729.54912-14-aneesh.kumar@linux.ibm.com
arch/powerpc/kvm/book3s_64_mmu_hv.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kvm/book3s_64_mmu_hv.c
b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 2b35f9bcf8928f8404d4b9781bcbb2d6c2503b62..8f9cd4c79044256bc00a05207abf536a6b63d130 100644
(file)
--- a/
arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/
arch/powerpc/kvm/book3s_64_mmu_hv.c
@@
-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
* so we get the shift and attribute bits.
*/
-
local_irq_disable(
);
- ptep =
__find_linux_pte(vcpu->arch.pgdir, hva, NULL
, &shift);
+
spin_lock(&kvm->mmu_lock
);
+ ptep =
find_kvm_host_pte(kvm, mmu_seq, hva
, &shift);
pte = __pte(0);
if (ptep)
- pte =
*ptep
;
-
local_irq_enable(
);
+ pte =
READ_ONCE(*ptep)
;
+
spin_unlock(&kvm->mmu_lock
);
/*
* If the PTE disappeared temporarily due to a THP
* collapse, just return and let the guest try again.