diff options
author | Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> | 2013-05-31 08:36:26 +0800 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-06-05 12:33:04 +0300 |
commit | 7f52af7412275c0d23becfc325331ec8b5ff2458 (patch) | |
tree | b5a1bfcf2d67856f29c4ba381ac554e35d0a0ed8 /arch/x86 | |
parent | 35006126f024f68727c67001b9cb703c38f69268 (diff) | |
download | linux-7f52af7412275c0d23becfc325331ec8b5ff2458.tar.gz linux-7f52af7412275c0d23becfc325331ec8b5ff2458.tar.bz2 linux-7f52af7412275c0d23becfc325331ec8b5ff2458.zip |
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')
-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, role.quadrant = quadrant; } for_each_gfn_sp(vcpu->kvm, sp, gfn) { + if (is_obsolete_sp(vcpu->kvm, sp)) + continue; + if (!need_sync && sp->unsync) need_sync = true; |