]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Fast invalidation for TDP MMU
authorBen Gardon <bgardon@google.com>
Thu, 1 Apr 2021 23:37:35 +0000 (16:37 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 19 Apr 2021 22:04:35 +0000 (18:04 -0400)
commit3b77c1a0cbfe9ff1f0f64b16eca94501909d6250
treecca804018c641265147a28cc9e12ecc627c285c0
parentcb8ac7877ca022a059f980df506cb22668c64f5f
KVM: x86/mmu: Fast invalidation for TDP MMU

Provide a real mechanism for fast invalidation by marking roots as
invalid so that their reference count will quickly fall to zero
and they will be torn down.

One negative side affect of this approach is that a vCPU thread will
likely drop the last reference to a root and be saddled with the work of
tearing down an entire paging structure. This issue will be resolved in
a later commit.

Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210401233736.638171-13-bgardon@google.com>
[Move the loop to tdp_mmu.c, otherwise compilation fails on 32-bit. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/mmu/tdp_mmu.h