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

Stefano Stabellini posted 4 patches 6 days, 18 hours ago
There is a newer version of this series
[PATCH v9 2/4] xen: change VIRQ_CONSOLE to VIRQ_DOMAIN to allow non-hwdom binding
Posted by Stefano Stabellini 6 days, 18 hours ago
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@amd.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
 xen/common/event_channel.c | 1 +
 xen/drivers/char/console.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

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
-- 
2.25.1
Re: [PATCH v9 2/4] xen: change VIRQ_CONSOLE to VIRQ_DOMAIN to allow non-hwdom binding
Posted by Jan Beulich 6 days, 10 hours ago
On 04.02.2026 00:07, Stefano Stabellini wrote:
> 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@amd.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
> ---
>  xen/common/event_channel.c | 1 +
>  xen/drivers/char/console.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

The public header also needs updating then, to not leave the comment there
stale. I also wonder whether "emergency" there is then still appropriate.

Jan