[PATCH] KVM: arm64: Drop sort_memblock_regions()

Will Deacon will at kernel.org
Thu Mar 13 04:26:59 PDT 2025


On Tue, Mar 11, 2025 at 02:37:18PM +1000, Gavin Shan wrote:
> Drop sort_memblock_regions() and avoid sorting the copied memory
> regions to be ascending order on their base addresses, because the
> source memory regions should have been sorted correctly when they
> are added by memblock_add() or its variants.
> 
> This is generally reverting commit a14307f5310c ("KVM: arm64: Sort
> the hypervisor memblocks"). No functional changes intended.
> 
> Signed-off-by: Gavin Shan <gshan at redhat.com>
> ---
>  arch/arm64/kvm/pkvm.c | 19 -------------------
>  1 file changed, 19 deletions(-)

It's not especially obvious from the memblock API that the memblocks
are sorted and so for_each_mem_region() will traverse the regions in
order. But it does appear to be true, so I suppose this is fine:

Acked-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list