All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Denis Mukhin <dmukhin@ford.com>
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
	 anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org,
	 michal.orzel@amd.com, roger@xenproject.org,
	sstabellini@kernel.org,  dmukhin@xen.org
Subject: Re: [XTF PATCH v1 4/6] x86: skip registering unavailable Xen console
Date: Wed, 2 Dec 2026 16:14:53 -0800 (PST)	[thread overview]
Message-ID: <e815951f-e268-b24e-24ce-761d4f3bdaf1@kernel.org> (raw)
In-Reply-To: <20261111195109.1070169-5-dmukhin@ford.com>

On Wed, 11 Nov 2026, dmukhin@ford.com wrote:
> From: Denis Mukhin <dmukhin@ford.com>
> 
> Do not register Xen console for the test in case HYPERCALL_console_io
> is not available.
> 
> Signed-off-by: Denis Mukhin <dmukhin@ford.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>



> ---
>  arch/x86/setup.c        | 5 +++--
>  include/xtf/hypercall.h | 4 ++--
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/setup.c b/arch/x86/setup.c
> index 8fea6495de1c..725abe289a05 100644
> --- a/arch/x86/setup.c
> +++ b/arch/x86/setup.c
> @@ -250,7 +250,7 @@ static void qemu_console_write(const char *buf, size_t len)
>  
>  static void xen_console_write(const char *buf, size_t len)
>  {
> -    hypercall_console_write(buf, len);
> +    (void)hypercall_console_write(buf, len);
>  }
>  
>  /*
> @@ -297,7 +297,8 @@ void arch_setup(void)
>      if ( IS_DEFINED(CONFIG_HVM) && !pvh_start_info )
>          register_console_callback(qemu_console_write);
>  
> -    register_console_callback(xen_console_write);
> +    if ( !hypercall_console_write("\0", 1) )
> +        register_console_callback(xen_console_write);
>  
>      collect_cpuid(IS_DEFINED(CONFIG_PV) ? pv_cpuid_count : cpuid_count);
>  
> diff --git a/include/xtf/hypercall.h b/include/xtf/hypercall.h
> index 68b3da111d85..475eb771d472 100644
> --- a/include/xtf/hypercall.h
> +++ b/include/xtf/hypercall.h
> @@ -194,9 +194,9 @@ static inline long hypercall_argo_op(unsigned int cmd, void *arg1, void *arg2,
>  /*
>   * Higher level hypercall helpers
>   */
> -static inline void hypercall_console_write(const char *buf, unsigned long count)
> +static inline long hypercall_console_write(const char *buf, unsigned long count)
>  {
> -    (void)HYPERCALL3(long, __HYPERVISOR_console_io, CONSOLEIO_write, count, buf);
> +    return HYPERCALL3(long, __HYPERVISOR_console_io, CONSOLEIO_write, count, buf);
>  }
>  
>  static inline long hypercall_shutdown(unsigned int reason)
> -- 
> 2.56.0
> 


  reply	other threads:[~2026-12-03  0:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 19:51 [XTF PATCH v1 0/6] x86: add NS16550-compatible UART emulator test dmukhin
2026-11-11 19:51 ` [XTF PATCH v1 1/6] .gitignore: exclude tags dmukhin
2026-12-03  0:12   ` Stefano Stabellini
2026-11-11 19:51 ` [XTF PATCH v1 2/6] x86: introduce cpu_relax() dmukhin
2026-12-03  0:13   ` Stefano Stabellini
2026-11-11 19:51 ` [XTF PATCH v1 3/6] x86: isolate FEP in setup_fep() dmukhin
2026-11-11 19:51 ` [XTF PATCH v1 4/6] x86: skip registering unavailable Xen console dmukhin
2026-12-03  0:14   ` Stefano Stabellini [this message]
2026-11-11 19:51 ` [XTF PATCH v1 5/6] common: add simplistic NS16550-compatible UART driver dmukhin
2026-11-11 19:51 ` [XTF PATCH v1 6/6] x86: add NS16550-compatible emulator test dmukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e815951f-e268-b24e-24ce-761d4f3bdaf1@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dmukhin@ford.com \
    --cc=dmukhin@xen.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger@xenproject.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.