KVM: x86/mmu: Avoid unnecessary flush on eager page split
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Jun 2022 19:27:10 +0000 (15:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Jun 2022 08:52:01 +0000 (04:52 -0400)
commit0378739401cfc2fd2a50a2a337a4f394e8493008
tree2a1be98c1951d49bdbbb94650a6e321b687fb844
parentada51a9de7375ef8933fcaa1af9cb61a7fe0ceef
KVM: x86/mmu: Avoid unnecessary flush on eager page split

The TLB flush before installing the newly-populated lower level
page table is unnecessary if the lower-level page table maps
the huge page identically.  KVM knows it is if it did not reuse
an existing shadow page table, tell drop_large_spte() to skip
the flush in that case.

Extracted from a patch by David Matlack.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c