]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: protect TDP MMU pages only down to required level
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 Apr 2021 12:05:19 +0000 (08:05 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:31:04 +0000 (08:31 -0400)
commitf2eb89c6c48a814e1fc168c786e46d4fb77d7389
tree697cb3afcd09d2b28d9013a216fd301e7375d187
parent640c785157d6ab35afe1c22e67f7c4a430af4a07
KVM: MMU: protect TDP MMU pages only down to required level

When using manual protection of dirty pages, it is not necessary
to protect nested page tables down to the 4K level; instead KVM
can protect only hugepages in order to split them lazily, and
delay write protection at 4K-granularity until KVM_CLEAR_DIRTY_LOG.
This was overlooked in the TDP MMU, so do it there as well.

Fixes: c63f26e3339f8 ("kvm: x86/mmu: Support dirty logging for the TDP MMU")
Cc: Ben Gardon <bgardon@google.com>
Reviewed-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c