On 12.01.2026 15:08, Alejandro Vallejo wrote:
> Debug builds stress the wrapping logic of the TLB clock by narrowing it
> down to 10 bits. This is inconvenient to test real time workloads on
> such builds.
> 
> Add Kconfig option to be able to selectively use the non-stressed
> behaviour on debug.
> 
> Signed-off-by: Alejandro Vallejo <[email protected]>

Hmm, yes, why not. However, ...

> --- a/xen/arch/x86/flushtlb.c
> +++ b/xen/arch/x86/flushtlb.c
> @@ -20,11 +20,7 @@
>  #include <asm/spec_ctrl.h>
>  
>  /* Debug builds: Wrap frequently to stress-test the wrap logic. */
> -#ifdef NDEBUG
> -#define WRAP_MASK (0xFFFFFFFFU)
> -#else
> -#define WRAP_MASK (0x000003FFU)
> -#endif
> +#define WRAP_MASK (IS_ENABLED(CONFIG_DEBUG_TLB_CLK) ? 0x3FFU : UINT32_MAX)

... the comment then will want updating as well, I'd say. It doesn't go
terribly stale this way, but at least slightly. I'd suggest to minimally
drop "builds".

Jan

Reply via email to