KVM: x86/mmu: Split out TDP MMU page fault handling
authorDavid Matlack <dmatlack@google.com>
Wed, 21 Sep 2022 17:35:44 +0000 (10:35 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:33:22 +0000 (15:33 -0500)
commit9aa8ab43b38146029de807a8ff2696f51e15b226
treee6b9d74ccabc1146d9ab720d55af13f36ab95e33
parente5e6f8d254a285e97b02180fdc75d02ffdf9f0ed
KVM: x86/mmu: Split out TDP MMU page fault handling

Split out the page fault handling for the TDP MMU to a separate
function.  This creates some duplicate code, but makes the TDP MMU fault
handler simpler to read by eliminating branches and will enable future
cleanups by allowing the TDP MMU and non-TDP MMU fault paths to diverge.

Only compile in the TDP MMU fault handler for 64-bit builds since
kvm_tdp_mmu_map() does not exist in 32-bit builds.

No functional change intended.

Signed-off-by: David Matlack <dmatlack@google.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220921173546.2674386-9-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c