diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2013-05-30 20:36:26 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-06-05 05:33:04 -0400 |
commit | 7f52af7412275c0d23becfc325331ec8b5ff2458 (patch) | |
tree | b5a1bfcf2d67856f29c4ba381ac554e35d0a0ed8 /arch/x86/kvm/mmu.c | |
parent | 35006126f024f68727c67001b9cb703c38f69268 (diff) |
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>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3fd060af5394..0880b9b425d7 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1875,6 +1875,9 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, | |||
1875 | role.quadrant = quadrant; | 1875 | role.quadrant = quadrant; |
1876 | } | 1876 | } |
1877 | for_each_gfn_sp(vcpu->kvm, sp, gfn) { | 1877 | for_each_gfn_sp(vcpu->kvm, sp, gfn) { |
1878 | if (is_obsolete_sp(vcpu->kvm, sp)) | ||
1879 | continue; | ||
1880 | |||
1878 | if (!need_sync && sp->unsync) | 1881 | if (!need_sync && sp->unsync) |
1879 | need_sync = true; | 1882 | need_sync = true; |
1880 | 1883 | ||