Re: [PATCH] xen: fix multicall debug data referencing

From: boris . ostrovsky
Date: Thu Jul 18 2024 - 17:58:04 EST



On 7/18/24 2:21 AM, Juergen Gross wrote:
The recent adding of multicall debug mixed up the referencing of
the debug data. A __percpu tagged pointer can't be initialized with a
plain pointer, so use another percpu variable for the pointer and set
it on each new cpu via a function.

Fixes: 942d917cb92a ("xen: make multicall debug boot time selectable")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202407151106.5s7Mnfpz-lkp@xxxxxxxxx/
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>


IIUIC we only need data until SMP is initialized, so setting per-cpu pointer just on cpu0 may be sufficient. Not sure where to do this though.

But this works as well.

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>