[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] xen/console: Handle true dom0less case when switching serial input
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Tue, 14 Mar 2023 15:27:49 +0100
- 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
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=KSmnECZXKVPgyAepBZNc+28vY759/kkLgbNNl98Hzx8=; b=iakKbIel4KV7lRlxCnQ7bAVd6RcVPX3T+L6y9aWBaJVenCuPjrYtzLWUE9ndBeB541BWUkRAycgUIYi6RQgFPq+sQTKMR20Be64rzdY8RmtFY7AplN/h3XDlpuuqTKFkJ4mpvO95WYgSjnubWx5Q0rKuE99zB73hXpPG7BH2g7ng6oMs3iHgQ6mfPJDm+st32lRIf+wQUfvPRa5pI5EA3VRjUbbD9Dv0mHJrpr4wP4NAUmKyUaUNdO1Jwu8TN61nl99ZZ3CLuHNT0vAQggY+b1pDT0EoXt0OhWyr5GByHPzgRirJPZJ9/3Nvn1KV+ZiIFwAkYxeHE6AOO5+6uhJHAw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gjcr5cOaQ8CZfownoJVX+CxiAJ0iNVqW3cN+H9nX6fmLlGmJrQ0JWpgA66mk/RafauRcKt3F4vfKvBd2Cv0gs47I4u9QQbwORAIjx3KMxzTVqLmQV5+2kOiMUlzgvU1SXFfrCBxsK6xE0lnECFKKg567xASPMpAkChEwjJEblPJLhR9+yc3MAfnfI3QlQfN/Oqr8YC2z8qow664LwEy5vc8ezzLoe8oyZP4qJ+/jgPxbz3nQenAXAB5SSzXmHw1WIihOphuTvDkjzm+uQn07WMKnYjmLtRBAmF3QdB/ejjZdo70x43IMyreYqtEgZ/HRi+2S8sUcE8IRCHx3BzuPvA==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 14 Mar 2023 14:28:01 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
At the moment, we direct serial input to hardware domain by default.
This does not make any sense when running in true dom0less mode, since
such domain does not exist. As a result, users wishing to write to
an emulated UART of a domU are always forced to execute CTRL-AAA first.
The same issue is when rotating among serial inputs, where we always
have to go through hardware domain case.
Modify switch_serial_input() so that, if there is no hardware domain
(i.e. true dom0less case) and console_rx is 1 (i.e. input to hwdom),
we skip it and move to the next serial input.
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/drivers/char/console.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index e8468c121ad0..3bbab35dc460 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -491,6 +491,14 @@ static void switch_serial_input(void)
else
{
console_rx++;
+
+ /*
+ * Skip switching serial input to hardware domain if it does not exist
+ * (i.e. true dom0less mode).
+ */
+ if ( !hardware_domain && (console_rx == 1) )
+ console_rx++;
+
printk("*** Serial input to DOM%d", console_rx - 1);
}
--
2.25.1
|