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

[PATCH v10 2/5] xen: change VIRQ_CONSOLE to VIRQ_DOMAIN to allow non-hwdom binding


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Date: Wed, 4 Feb 2026 15:37:09 -0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=7MFwuvb8+rgtwgN4iWI9ztcKuHcy7B3bPq6D5eSNPBM=; b=kMy7d44dpvTcIETOfTL9QTzMpOdMzBG0b1hw/JUYLKqmwopMmybcb4B/xJJcUKC+a0d3DdSPUQ+UuG9H/J+XeGgUeGmyV3ykByiSONYeUaxSr4/vfDF7fJwiUMXrqL4RLSX9SKmCjuk6TZ/t9SVkcp01KZScjXmlNayHr2xJfHDGx+R60fXU6cMIlUFxzrTT07CuaK73uQWfTD/cO2marp/yw33J5lY5Dv3AXwQl+dTCNx3oWoC/3vNjdABlwCdvf0h3KZlzqWqt7hnO9v56VqrDMUu7s3TqL8iFWKqA1YJQ66W7xBN2j3+wzkrmaDAKA8MCx/v5yts94ySpGGCoFA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eOWXyyGaMVmZ+SGeqsqzJgedQg644vcPFTtJhiy3oC73xLnMoFbg7U2Y0EsWHFCHpJP0y7oBtx5JEIoCWIcQMo1NtYi49ebIyrvZIn3YtV5+DCicB657d8jE5T4G5hobiJobGFfO3pqMySXXLhZMVq9D1NKTxFDBnKx1XCgo88A5rXEGAywK3I9GGx25QdplrBzqzQi+zcY0QvAo+fFlO9d/HW1XA+endkm5VEvOUsUkTFytlGne19Lr44ABmqc8eXR9cscYTPrvZqVsoLWqkn7MchbIWTOc1WrSt/01kfrijnpeEW21fv/xaXyhjXx9zTXVQtyocSaiiJBz8ut5xg==
  • Cc: <grygorii_strashko@xxxxxxxx>, <anthony.perard@xxxxxxxxxx>, <michal.orzel@xxxxxxx>, <julien@xxxxxxx>, <roger.pau@xxxxxxxxxx>, <jason.andryuk@xxxxxxx>, <victorm.lira@xxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <jbeulich@xxxxxxxx>, <sstabellini@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>
  • Delivery-date: Wed, 04 Feb 2026 23:37:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Today only hwdom can bind VIRQ_CONSOLE. This patch changes the virq from
global to VIRQ_DOMAIN to allow other domains to bind to it.

Note that Linux silently falls back to polling when binding fails, which
masks the issue.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
---
Changes in v10:
- update comment in xen/include/public/xen.h
---
 xen/common/event_channel.c | 1 +
 xen/drivers/char/console.c | 2 +-
 xen/include/public/xen.h   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index a3d18bc464..f9becb4ca5 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -138,6 +138,7 @@ static enum virq_type get_virq_type(unsigned int virq)
         return VIRQ_VCPU;
 
     case VIRQ_ARGO:
+    case VIRQ_CONSOLE:
         return VIRQ_DOMAIN;
 
     case VIRQ_ARCH_0 ... VIRQ_ARCH_7:
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 35f541ca8e..fbc89ca2a4 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -613,7 +613,7 @@ static void __serial_rx(char c)
          * Always notify the hardware domain: prevents receive path from
          * getting stuck.
          */
-        send_global_virq(VIRQ_CONSOLE);
+        send_guest_domain_virq(d, VIRQ_CONSOLE);
     }
 #ifdef CONFIG_SBSA_VUART_CONSOLE
     else
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index b12fd10e63..b8146bd00a 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -176,7 +176,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_ulong_t);
 /* ` enum virq { */
 #define VIRQ_TIMER      0  /* V. Timebase update, and/or requested timeout.  */
 #define VIRQ_DEBUG      1  /* V. Request guest to dump debug info.           */
-#define VIRQ_CONSOLE    2  /* G. Bytes received on emergency console.        */
+#define VIRQ_CONSOLE    2  /* D. Bytes received on Xen console.              */
 #define VIRQ_DOM_EXC    3  /* G. Exceptional event for some domain.          */
 #define VIRQ_TBUF       4  /* G. Trace buffer has records available.         */
 #define VIRQ_DEBUGGER   6  /* G. A domain has paused for debugging.          */
-- 
2.25.1




 


Rackspace

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