summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-02-19 00:08:20 +0300
committerSean Christopherson <seanjc@google.com>2026-03-03 23:16:27 +0300
commitecb80629321306547f7ad13b0ca5ef9cf8cdbb77 (patch)
tree4d0fdf99d290ea82b080f6606b58e447b05a0a74
parent1450ab08108ccd825c8f9362475fadfc187942fc (diff)
downloadlinux-ecb80629321306547f7ad13b0ca5ef9cf8cdbb77.tar.xz
KVM: x86/mmu: Don't zero-allocate page table used for splitting a hugepage
When splitting hugepages in the TDP MMU, don't zero the new page table on allocation since tdp_mmu_split_huge_page() is guaranteed to write every entry and thus every byte. Unless someone peeks at the memory between allocating the page table and writing the child SPTEs, no functional change intended. Cc: Rick Edgecombe <rick.p.edgecombe@intel.com> Cc: Kai Huang <kai.huang@intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://patch.msgid.link/20260218210820.2828896-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
-rw-r--r--arch/x86/kvm/mmu/tdp_mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 9c26038f6b77..7b1102d26f9c 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -1507,7 +1507,7 @@ static struct kvm_mmu_page *tdp_mmu_alloc_sp_for_split(void)
if (!sp)
return NULL;
- sp->spt = (void *)get_zeroed_page(GFP_KERNEL_ACCOUNT);
+ sp->spt = (void *)__get_free_page(GFP_KERNEL_ACCOUNT);
if (!sp->spt) {
kmem_cache_free(mmu_page_header_cache, sp);
return NULL;