mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 21:21:47 +00:00
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>
This commit is contained in:
parent
518c8aee5c
commit
03116aa57e
@ -1629,7 +1629,7 @@ static int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn)
|
||||
bucket = &kvm->arch.mmu_page_hash[index];
|
||||
restart:
|
||||
hlist_for_each_entry_safe(sp, node, n, bucket, hash_link)
|
||||
if (sp->gfn == gfn && !sp->role.direct) {
|
||||
if (sp->gfn == gfn && !sp->role.direct && !sp->role.invalid) {
|
||||
pgprintk("%s: gfn %lx role %x\n", __func__, gfn,
|
||||
sp->role.word);
|
||||
r = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user