]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: pkvm: Fix hyp_pool max order
authorQuentin Perret <qperret@google.com>
Wed, 8 Dec 2021 15:22:54 +0000 (15:22 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 15 Dec 2021 14:16:28 +0000 (14:16 +0000)
commitcbb3722918ad2d153c9f633eda995945b445678b
treeb2354d8ac484680e2e30389fe00480c365c2c456
parentff04131966d1a79c1b3cf26997a8e7d1433f1b7d
KVM: arm64: pkvm: Fix hyp_pool max order

The EL2 page allocator in protected mode maintains a per-pool max order
value to optimize allocations when the memory region it covers is small.
However, the max order value is currently under-estimated whenever the
number of pages in the region is a power of two. Fix the estimation.

Signed-off-by: Quentin Perret <qperret@google.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211208152300.2478542-2-qperret@google.com
arch/arm64/kvm/hyp/nvhe/page_alloc.c