]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86/tdp_mmu: Extract root invalid check from tdx_mmu_next_root()
authorIsaku Yamahata <isaku.yamahata@intel.com>
Thu, 18 Jul 2024 21:12:21 +0000 (14:12 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 23 Dec 2024 13:31:54 +0000 (08:31 -0500)
commite84b8e4e4430d2a81a3464be8ebe5959da9a6d4a
tree6c10abb0739ead541561e515c79031e35bf64b51
parent3fc3f71851129f9d7c6b8b192b6a81604a1cb2e3
KVM: x86/tdp_mmu: Extract root invalid check from tdx_mmu_next_root()

Extract tdp_mmu_root_match() to check if the root has given types and use
it for the root page table iterator.  It checks only_invalid now.

TDX KVM operates on a shared page table only (Shared-EPT), a mirrored page
table only (Secure-EPT), or both based on the operation.  KVM MMU notifier
operations only on shared page table.  KVM guest_memfd invalidation
operations only on mirrored page table, and so on.  Introduce a centralized
matching function instead of open coding matching logic in the iterator.
The next step is to extend the function to check whether the page is shared
or private

Link: https://lore.kernel.org/kvm/ZivazWQw1oCU8VBC@google.com/
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Message-ID: <20240718211230.1492011-10-rick.p.edgecombe@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c