[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XTF PATCH v1 4/6] x86: skip registering unavailable Xen console


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: dmukhin@xxxxxxxx
  • Date: Wed, 11 Nov 2026 11:51:07 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 205.220.161.53) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ford.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ford.com; dkim=pass (signature was verified) header.d=saarlouis.ford.com; dkim=pass (signature was verified) header.d=ford.com; arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iolFKRKhXaBACatoryQ7JhP2ESvytQ9xsNhX+W0kYeY=; b=Ovh2UAZn3Q593bvHO5kdn/e6ymtbVC4HIgNZK0J8z+r3K4RfDJUGx5tvbMpgV1oMSCDc9I2x8l85zaXwt6EA6n0ohL2CTLhZsJtx9Ul94w5J3QF34dE2dpas2P9nIDrWPw+h4iJrY4Q/8/50xMZBewYYf/K5/82NGItu/fUZf5Uv7W2f9pw5hDgcHTM3byiUk+6aE22fMIf8cljol4FM/Drm8MfMdLaFnkPvXG7YNHjUzQVszyAbBkn+iZwXCBnYHa5i0JEpsNKM4KRprjH2d8xRisS8OgsiObVbp8cn21gWCd6+wTsdfvhkt/TYJspqw1J+9fZhcSWadNQjsp489A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ScgIUwK3rVHKYZVF5Gs7ayLEjv9OtqT4dCf79vh7c4aj+Rj+PgLOl7ojR1Atscaaihas/kgPcMcDKxnJWt2vkxOyqAEHc7JRioOxcK3pXf08bAi1gEYkY1lgzPQo6VEnkTKq5Zr9qzQjOyaZslijn8FAcTJVgrr2ISKdOnNZ9Kxq4he4Qq08ua8CD3NVCoNfwUgDfGav4OTU8rHPfoxEHfJxfcNXz8mohW0Ksh1L36/8r/eaDg6nRcmX1rEOyqAJVTxjhpwa5ColKG/Mr6DTL5k9IvwUpRYCUPvbfhlkTbYfaSkKcfIO4pa/qpYeFRt3cYrQ9TI5CziJsPPK2+ipsg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=ppford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector2-azureford-onmicrosoft-com header.d=azureford.onmicrosoft.com header.i="@azureford.onmicrosoft.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=ppserprodsaar header.d=saarlouis.ford.com header.i="@saarlouis.ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=ppfserpocford header.d=ford.com header.i="@ford.com" header.h="Cc:Content-Transfer-Encoding:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"
  • Cc: andrew.cooper3@xxxxxxxxxx, anthony.perard@xxxxxxxxxx, jbeulich@xxxxxxxx, julien@xxxxxxx, michal.orzel@xxxxxxx, roger@xxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, dmukhin@xxxxxxx, Denis Mukhin <dmukhin@xxxxxxxx>
  • Delivery-date: Wed, 11 Nov 2026 19:51:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Pser-m365-app: SER-APP

From: Denis Mukhin <dmukhin@xxxxxxxx>

Do not register Xen console for the test in case HYPERCALL_console_io
is not available.

Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.