On 12.08.2022 19:33, Andrew Cooper wrote:
>  * Always emit current.  It's critically important.

I agree it may be relevant, yet I'm not convinced of "critically". But
anyway.

> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -768,8 +768,14 @@ static int cf_check nmi_show_execution_state(
>      if ( opt_show_all )
>          show_execution_state(regs);
>      else
> -        printk(XENLOG_ERR "CPU%d @ %04x:%08lx (%pS)\n", cpu, regs->cs,
> -               regs->rip, guest_mode(regs) ? NULL : _p(regs->rip));
> +    {
> +        if ( guest_mode(regs) )
> +            printk(XENLOG_ERR "CPU%d\t%pv\t%04x:%p in guest\n",
> +                   cpu, current, regs->cs, _p(regs->rip));
> +        else
> +            printk(XENLOG_ERR "CPU%d\t%pv\t%04x:%p in Xen: %pS\n",
> +                   cpu, current, regs->cs, _p(regs->rip), _p(regs->rip));
> +    }

Could I talk you into avoiding the extra level of indentation, by using
"else if" in the middle? Preferably done that way:
Reviewed-by: Jan Beulich <jbeul...@suse.com>

Jan

Reply via email to