mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
KVM: MMU: use kvm_sync_page in kvm_sync_pages
If the last argument is true, kvm_unlink_unsync_page is called anyway in __kvm_sync_page (either by kvm_mmu_prepare_zap_page or by __kvm_sync_page itself). Therefore, kvm_sync_pages can just call kvm_sync_page, instead of going through kvm_unlink_unsync_page+__kvm_sync_page. Reviewed-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
35a70510ee
commit
df748f864a
1 changed files with 1 additions and 2 deletions
|
@ -1987,8 +1987,7 @@ static void kvm_sync_pages(struct kvm_vcpu *vcpu, gfn_t gfn)
|
|||
continue;
|
||||
|
||||
WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL);
|
||||
kvm_unlink_unsync_page(vcpu->kvm, s);
|
||||
if (!__kvm_sync_page(vcpu, s, &invalid_list, false))
|
||||
if (!kvm_sync_page(vcpu, s, &invalid_list))
|
||||
flush = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue