aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-06-04 09:52:17 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:39:26 -0400
commit03116aa57e75b1bbe8b5e04f3cd21cdb6588c4ba (patch)
tree9b373610d23da5ff66d8cb7212213770e493bf73 /arch/x86/kvm/mmu.c
parent518c8aee5ca74fc03273fc6b4893cf456d65d545 (diff)
KVM: MMU: skip invalid sp when unprotect page
In kvm_mmu_unprotect_page(), the invalid sp can be skipped Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index d3cd102aee2..3ac51153bc4 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1629,7 +1629,7 @@ static int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn)
1629 bucket = &kvm->arch.mmu_page_hash[index]; 1629 bucket = &kvm->arch.mmu_page_hash[index];
1630restart: 1630restart:
1631 hlist_for_each_entry_safe(sp, node, n, bucket, hash_link) 1631 hlist_for_each_entry_safe(sp, node, n, bucket, hash_link)
1632 if (sp->gfn == gfn && !sp->role.direct) { 1632 if (sp->gfn == gfn && !sp->role.direct && !sp->role.invalid) {
1633 pgprintk("%s: gfn %lx role %x\n", __func__, gfn, 1633 pgprintk("%s: gfn %lx role %x\n", __func__, gfn,
1634 sp->role.word); 1634 sp->role.word);
1635 r = 1; 1635 r = 1;