KVM: x86: Do not write protect huge page in initially-all-set mode
authorKeqian Zhu <zhukeqian1@huawei.com>
Thu, 29 Apr 2021 03:41:15 +0000 (11:41 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:25 +0000 (13:09 -0400)
commit8921291980db8184cdeb95987281c663f844b22c
tree522edea676027e5d9eae88a8ec2f05311500a393
parent3ad93562093d764bc22d6460e84ba60d0c57f7ab
KVM: x86: Do not write protect huge page in initially-all-set mode

Currently, when dirty logging is started in initially-all-set mode,
we write protect huge pages to prepare for splitting them into
4K pages, and leave normal pages untouched as the logging will
be enabled lazily as dirty bits are cleared.

However, enabling dirty logging lazily is also feasible for huge pages.
This not only reduces the time of start dirty logging, but it also
greatly reduces side-effect on guest when there is high dirty rate.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Message-Id: <20210429034115.35560-3-zhukeqian1@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/x86.c