Skip to content

Commit 13d66fd

Browse files
sean-jcbonzini
authored andcommitted
KVM: MIPS: Mark "struct page" pfns accessed prior to dropping mmu_lock
Mark pages accessed before dropping mmu_lock when faulting in guest memory so that MIPS can convert to kvm_release_faultin_page() without tripping its lockdep assertion on mmu_lock being held. Signed-off-by: Sean Christopherson <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-ID: <[email protected]>
1 parent 4d75f14 commit 13d66fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/mips/kvm/mmu.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,9 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
634634

635635
if (writeable)
636636
kvm_set_pfn_dirty(pfn);
637+
kvm_release_pfn_clean(pfn);
637638

638639
spin_unlock(&kvm->mmu_lock);
639-
kvm_release_pfn_clean(pfn);
640-
kvm_set_pfn_accessed(pfn);
641640
out:
642641
srcu_read_unlock(&kvm->srcu, srcu_idx);
643642
return err;

0 commit comments

Comments
 (0)