From nobody Mon Feb 9 15:46:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1770255397; cv=none; d=zohomail.com; s=zohoarc; b=frpt8tWUCmeN2TUc2wcoYgPWl3EwKOqy1cxsnzzKoYpHNd3KbXlDQGYOtwNJXukzh6VvUjUcuPRTX5cahgnW1p6LnKrA1GAxQB0iroZl6EspO9B9wPSCL7QH3I6NMnkMLqVWO8moCcuHEX3juecmfhuxVoOp6WT4T9O2e5bl+pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770255397; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OmHZuBlSWJtfYojCeHKDKiy+Jl/+TAljxD/KKQZ0HFU=; b=KinmXZvl3CR+6nHouwdZRePT5uBd5Z2n74qWb2TPflKDBuiXyd6DndosPqgJjsutiqcEAdDN6kZH2obffDxRbWG5S1dF/a2WCpLEcz5V7kbSqGOQy8hESYavFWpoPJmGLT5qvkjm1bF5WL3kLdQ0KDcMMW3SWI7dZReidA25jDA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1770255397686571.4118528651929; Wed, 4 Feb 2026 17:36:37 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1221352.1529627 (Exim 4.92) (envelope-from ) id 1vnoI5-00029b-Id; Thu, 05 Feb 2026 01:36:17 +0000 Received: by outflank-mailman (output) from mailman id 1221352.1529627; Thu, 05 Feb 2026 01:36:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnoI5-00029U-Fd; Thu, 05 Feb 2026 01:36:17 +0000 Received: by outflank-mailman (input) for mailman id 1221352; Thu, 05 Feb 2026 01:36:16 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vnoI4-0001w6-CE for xen-devel@lists.xenproject.org; Thu, 05 Feb 2026 01:36:16 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1vnoI4-003wQK-0H; Thu, 05 Feb 2026 01:36:15 +0000 Received: from [140.209.201.102] (helo=localhost) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnoI3-00HVXD-1m; Thu, 05 Feb 2026 01:36:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From; bh=OmHZuBlSWJtfYojCeHKDKiy+Jl/+TAljxD/KKQZ0HFU=; b=n5+kAtOKhadDbzsHZdN1u0lU/w fL/5Y0aJF/yxV9x7oEsewB/E2kjfDJmz533UFMuyzR68vvyrAkJjk6cGhlllJmo0ZJc+POQpt6i0i 3lZpNMAMoT2m1zOhMbRd//TxTejqBCm8KNUc9RWR2/MacQyBUx3ioxT1h3TI3tylGPKo=; From: dmukhin@xen.org To: xen-devel@lists.xenproject.org Cc: andrew.cooper3@citrix.com, anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org, michal.orzel@amd.com, roger.pau@citrix.com, sstabellini@kernel.org, dmukhin@ford.com, Jason Andryuk Subject: [PATCH v5 2/6] xen/console: make console buffer size configurable Date: Wed, 4 Feb 2026 17:36:02 -0800 Message-ID: <20260205013606.3384798-3-dmukhin@ford.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260205013606.3384798-1-dmukhin@ford.com> References: <20260205013606.3384798-1-dmukhin@ford.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @xen.org) X-ZM-MESSAGEID: 1770255400836158500 Content-Type: text/plain; charset="utf-8" From: Denis Mukhin =20 Add new CONRING_SHIFT Kconfig parameter to specify the boot console buffer = size as a power of 2. The supported range is [14..27] -> [16KiB..128MiB]. Set default to 15 (32 KiB). Resolves: https://gitlab.com/xen-project/xen/-/issues/185 Signed-off-by: Denis Mukhin Reviewed-by: Jason Andryuk --- Changes since v4: - n/a --- docs/misc/xen-command-line.pandoc | 5 +++-- xen/drivers/char/Kconfig | 24 ++++++++++++++++++++++++ xen/drivers/char/console.c | 6 +++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line= .pandoc index c1f2def9f99c..87392142e8e9 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -425,10 +425,11 @@ The following are examples of correct specifications: ### conring_size > `=3D ` =20 -> Default: `conring_size=3D16k` - Specify the size of the console ring buffer. =20 +The default console ring buffer size is selected at build time via +CONFIG_CONRING_SHIFT setting. + ### console > `=3D List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | ehci | xhci | n= one ]` =20 diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig index 8e49a52c735b..d083ba4c9cdf 100644 --- a/xen/drivers/char/Kconfig +++ b/xen/drivers/char/Kconfig @@ -95,6 +95,30 @@ config SERIAL_TX_BUFSIZE =20 Default value is 32768 (32KiB). =20 +config CONRING_SHIFT + int "Console ring buffer size (power of 2)" + range 14 27 + default 15 + help + Select the boot console ring buffer size as a power of 2. + Run-time console ring buffer size is the same as the boot console ring + buffer size, unless overridden via 'conring_size=3D' boot parameter. + + 27 =3D> 128 MiB + 26 =3D> 64 MiB + 25 =3D> 32 MiB + 24 =3D> 16 MiB + 23 =3D> 8 MiB + 22 =3D> 4 MiB + 21 =3D> 2 MiB + 20 =3D> 1 MiB + 19 =3D> 512 KiB + 18 =3D> 256 KiB + 17 =3D> 128 KiB + 16 =3D> 64 KiB + 15 =3D> 32 KiB (default) + 14 =3D> 16 KiB + config XHCI bool "XHCI DbC UART driver" depends on X86 diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 86319600e0af..522b2f489a53 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -339,12 +339,12 @@ static void cf_check do_dec_thresh(unsigned char key,= bool unused) * ******************************************************** */ =20 -/* conring_size: allows a large console ring than default (16kB). */ +/* conring_size: override build-time CONFIG_CONRING_SHIFT setting. */ static uint32_t __initdata opt_conring_size; size_param("conring_size", opt_conring_size); =20 -#define _CONRING_SIZE 16384 -#define CONRING_IDX_MASK(i) ((i)&(conring_size-1)) +#define _CONRING_SIZE (1U << CONFIG_CONRING_SHIFT) +#define CONRING_IDX_MASK(i) ((i) & (conring_size - 1)) static char __initdata _conring[_CONRING_SIZE]; static char *__read_mostly conring =3D _conring; static uint32_t __read_mostly conring_size =3D _CONRING_SIZE; --=20 2.52.0