KVM: MMU: do not reuse the obsolete page

The obsolete page will be zapped soon, do not reuse it to
reduce future page fault

Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
This commit is contained in:
Xiao Guangrong 2013-05-31 08:36:26 +08:00 committed by Gleb Natapov
parent 35006126f0
commit 7f52af7412

View File

@ -1875,6 +1875,9 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
role.quadrant = quadrant; role.quadrant = quadrant;
} }
for_each_gfn_sp(vcpu->kvm, sp, gfn) { for_each_gfn_sp(vcpu->kvm, sp, gfn) {
if (is_obsolete_sp(vcpu->kvm, sp))
continue;
if (!need_sync && sp->unsync) if (!need_sync && sp->unsync)
need_sync = true; need_sync = true;