On 23.02.2025 00:58, dm...@proton.me wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -46,6 +46,7 @@
>  
>  #ifdef CONFIG_X86
>  #include <asm/guest.h>
> +#include <asm/pv/shim.h>
>  #endif

This change isn't needed. It's the purpose of asm/guest.h to
include, among other headers, asm/pv/shim.h.

> @@ -562,13 +560,12 @@ static void __serial_rx(char c)
>          rc = vpl011_rx_char_xen(d, c);
>  #endif
>  
> -#ifdef CONFIG_X86
> -    if ( pv_shim && pv_console )
> -        consoled_guest_tx(c);
> -#endif
> +    if ( consoled_is_enabled() )
> +        /* Deliver input to the PV shim console. */
> +        rc = consoled_guest_tx(c);
>  
>      if ( rc )
> -        guest_printk(d, XENLOG_G_WARNING
> +        guest_printk(d, XENLOG_WARNING
>                          "failed to process console input: %d\n", rc);

This change looks wrong to me. If there's a need to do so, I think this
needs mentioning in the description or even splitting into a separate
patch.

> --- a/xen/include/xen/consoled.h
> +++ b/xen/include/xen/consoled.h
> @@ -1,14 +1,36 @@
> -#ifndef __XEN_CONSOLED_H__
> -#define __XEN_CONSOLED_H__
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef XEN__CONSOLED_H
> +#define XEN__CONSOLED_H

This also isn't mentioned anywhere, not even in passing. I'd actually
suggest to leave header guards alone until we have settled on a final
naming scheme. The one that was put in place is under debate again.

Jan

Reply via email to