On 21.03.2023 17:44, Julien Grall wrote: > On 16/03/2023 11:55, Jan Beulich wrote: >> These are used from common code, so their signatures should be >> consistent across architectures. This is achieved / guaranteed easiest >> when their declarations are in a common header. >> >> Signed-off-by: Jan Beulich <[email protected]> >> --- >> There's no really good header to put the decls, imo; I wanted to avoid >> the already overcrowded sched.h. show_execution_state_nonconst(), being >> there solely for dump_execution_state(), could of course live in the >> upcoming xen/bug.h ... >> >> Is there a reason that Arm (still) expands dump_execution_state() to >> WARN()? Without that moving x86's show_execution_state_nonconst() >> definition to common code would also make sense (it could be done >> anyway, but then at the expense of introducing dead code to Arm), >> perhaps (see also above) into the upcoming common/bug.c. > > run_in_exception_handler() was only properly implemented a couple of > years ago on Arm and we didn't switch dump_execution_state() to use it. > > That said, the current implementation of run_in_exception_handler() > would not be correct for dump_execution_state() because it clobbers > x0/r0 on Arm. > > This should be addressed with Oleksandr work to consolidate the bug > infrastructure. So it would be fine to move the helper to common code now.
Well, Oleksii's work hasn't landed yet. I'll try to remember to follow up once it has. > Alternatively this can be left as a clean-up because > dump_executation_state() could now be common. > > Anyway: > > Acked-by: Julien Grall <[email protected]> Thanks. Jan
