Commit f2b8d76d authored by Michael Ellerman's avatar Michael Ellerman

Merge tag 'kvm-ppc-fixes-5.7-1' into topic/ppc-kvm

This brings in a fix from the kvm-ppc tree that was merged to mainline
after rc2, and so isn't in the base of our topic branch. We'd like it
in the topic branch because it interacts with patches we plan to carry
in this branch.
parents ae83d0b4 ae49deda
...@@ -604,18 +604,19 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu, ...@@ -604,18 +604,19 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
*/ */
local_irq_disable(); local_irq_disable();
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift); ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
pte = __pte(0);
if (ptep)
pte = *ptep;
local_irq_enable();
/* /*
* 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.
*/ */
if (!ptep) { if (!pte_present(pte)) {
local_irq_enable();
if (page) if (page)
put_page(page); put_page(page);
return RESUME_GUEST; return RESUME_GUEST;
} }
pte = *ptep;
local_irq_enable();
hpa = pte_pfn(pte) << PAGE_SHIFT; hpa = pte_pfn(pte) << PAGE_SHIFT;
pte_size = PAGE_SIZE; pte_size = PAGE_SIZE;
if (shift) if (shift)
......
...@@ -815,18 +815,19 @@ int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu, ...@@ -815,18 +815,19 @@ int kvmppc_book3s_instantiate_page(struct kvm_vcpu *vcpu,
*/ */
local_irq_disable(); local_irq_disable();
ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift); ptep = __find_linux_pte(vcpu->arch.pgdir, hva, NULL, &shift);
pte = __pte(0);
if (ptep)
pte = *ptep;
local_irq_enable();
/* /*
* 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.
*/ */
if (!ptep) { if (!pte_present(pte)) {
local_irq_enable();
if (page) if (page)
put_page(page); put_page(page);
return RESUME_GUEST; return RESUME_GUEST;
} }
pte = *ptep;
local_irq_enable();
/* If we're logging dirty pages, always map single pages */ /* If we're logging dirty pages, always map single pages */
large_enable = !(memslot->flags & KVM_MEM_LOG_DIRTY_PAGES); large_enable = !(memslot->flags & KVM_MEM_LOG_DIRTY_PAGES);
......
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