Re: [PATCH 3/3] x86/mm: Fix wrong usage of 'MAX_ASID_AVAILABLE' in global ASID allocation
From: Rik van Riel
Date: Sat Mar 29 2025 - 21:11:44 EST
On Sat, 2025-03-29 at 21:05 +0800, Hou Wenlong wrote:
> 'MAX_ASID_AVAILABLE' represents the maximum valid ASID in the current
> definetion, meaning that the available ASID range is [0,
> MAX_ASID_AVAILABLE]. So the actual count of available ASIDs is
> 'MAX_ASID_AVAIABLE + 1'. However, global ASID allocation use this
> value
> as the size of the bitmap, which results in the maximum ASID number
> being excluded from global ASID allocation. To address this issue,
> redefine the 'MAX_ASID_AVAILABLE' as the count of available ASIDs.
>
> Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
Reviewed-by: Rik van Riel <riel@xxxxxxxxxxx>
--
All Rights Reversed.