]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit74de2235dca93d3ab7c64bb86476e3944fd19246
tree522edea676027e5d9eae88a8ec2f05311500a393
parent0abc680e11848c70e2c3efc057da84ed22a46ec7
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