mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT
For consistency with the rest of the stage-2 page-table page allocations (performing using a kvm_mmu_memory_cache), ensure that __GFP_ACCOUNT is included in the GFP flags for the PGD pages. Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Quentin Perret <qperret@google.com> Link: https://lore.kernel.org/r/20201026144423.24683-1-will@kernel.org
This commit is contained in:
		
							parent
							
								
									d2782505fb
								
							
						
					
					
						commit
						7efe8ef274
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -846,7 +846,7 @@ int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, struct kvm *kvm)
 | 
				
			||||||
	u32 start_level = VTCR_EL2_TGRAN_SL0_BASE - sl0;
 | 
						u32 start_level = VTCR_EL2_TGRAN_SL0_BASE - sl0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pgd_sz = kvm_pgd_pages(ia_bits, start_level) * PAGE_SIZE;
 | 
						pgd_sz = kvm_pgd_pages(ia_bits, start_level) * PAGE_SIZE;
 | 
				
			||||||
	pgt->pgd = alloc_pages_exact(pgd_sz, GFP_KERNEL | __GFP_ZERO);
 | 
						pgt->pgd = alloc_pages_exact(pgd_sz, GFP_KERNEL_ACCOUNT | __GFP_ZERO);
 | 
				
			||||||
	if (!pgt->pgd)
 | 
						if (!pgt->pgd)
 | 
				
			||||||
		return -ENOMEM;
 | 
							return -ENOMEM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue