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>
---
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