On Tue, Jun 11, 2024, David Matlack wrote: > On 2024-06-03 11:13 AM, Sean Christopherson wrote: > > On Thu, May 09, 2024, David Matlack wrote: > > > diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c > > > index aaa2369a9479..2089d696e3c6 100644 > > > --- a/arch/x86/kvm/mmu/tdp_mmu.c > > > +++ b/arch/x86/kvm/mmu/tdp_mmu.c > > > @@ -1385,11 +1385,11 @@ bool kvm_tdp_mmu_wrprot_slot(struct kvm *kvm, > > > return spte_set; > > > } > > > > > > -static struct kvm_mmu_page *__tdp_mmu_alloc_sp_for_split(gfp_t gfp) > > > +static struct kvm_mmu_page *__tdp_mmu_alloc_sp_for_split(void) > > > { > > > + gfp_t gfp = GFP_KERNEL_ACCOUNT | __GFP_ZERO; > > > struct kvm_mmu_page *sp; > > > > > > - gfp |= __GFP_ZERO; > > > > > > sp = kmem_cache_alloc(mmu_page_header_cache, gfp); > > > > This can more simply and cleary be: > > > > sp = kmem_cache_zalloc(mmu_page_header_cache, GFP_KERNEL_ACCOUNT); > > Will do. And I assume you'd prefer get_zeroed_page(GFP_KERNEL_ACCOUNT) > as well below? Ah, yeah, good catch!