From 997bdc4843e2301bebb45a53bb2bd3744c6c0e8c Mon Sep 17 00:00:00 2001 From: Jiaqing Zhao Date: Wed, 27 Sep 2023 05:34:42 +0000 Subject: [PATCH] hv: configure hv console default output in scenario file Add a new option CONSOLE_VM in scenario to set the default vm to be outputted in hv console, when it is not set, acrn console will be used (current behavior). This is intended for debugging vm boot issues. Tracked-On: #8518 Signed-off-by: Jiaqing Zhao Reviewed-by: Junjie Mao --- hypervisor/debug/console.c | 2 +- misc/config_tools/schema/config.xsd | 5 +++++ misc/config_tools/xforms/config_common.xsl | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/hypervisor/debug/console.c b/hypervisor/debug/console.c index 8088f012c..65aa2b20e 100644 --- a/hypervisor/debug/console.c +++ b/hypervisor/debug/console.c @@ -23,7 +23,7 @@ struct hv_timer console_timer; #define CONSOLE_KICK_TIMER_TIMEOUT 40UL /* timeout is 40ms*/ /* Switching key combinations for shell and uart console */ #define GUEST_CONSOLE_TO_HV_SWITCH_KEY 0 /* CTRL + SPACE */ -uint16_t console_vmid = ACRN_INVALID_VMID; +uint16_t console_vmid = CONFIG_CONSOLE_DEFAULT_VM; /* if use INIT to kick pcpu only, if not notification IPI still is used for sharing CPU */ static bool use_init_ipi = false; diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd index 61a4f376d..483efd5bd 100644 --- a/misc/config_tools/schema/config.xsd +++ b/misc/config_tools/schema/config.xsd @@ -34,6 +34,11 @@ Select the default log level for log messages written to the serial console. Log messages with the selected value or lower are displayed. + + + Select the default VM in hypervisor console output. Default is hypervisor console. + + diff --git a/misc/config_tools/xforms/config_common.xsl b/misc/config_tools/xforms/config_common.xsl index c3e2a83b4..1d8e0a5ce 100644 --- a/misc/config_tools/xforms/config_common.xsl +++ b/misc/config_tools/xforms/config_common.xsl @@ -63,6 +63,13 @@ + + + + + + +