Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1459CC54FB3 for ; Mon, 26 May 2025 10:07:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uJUjw-000484-C3; Mon, 26 May 2025 06:07:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uJUjt-00046T-5o for qemu-riscv@nongnu.org; Mon, 26 May 2025 06:07:25 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uJUjo-0000R9-QY for qemu-riscv@nongnu.org; Mon, 26 May 2025 06:07:24 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-442d146a1aaso24930685e9.1 for ; Mon, 26 May 2025 03:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1748254039; x=1748858839; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=UeWDwAIij9m4P5yCgviVByHQv/VRO+qlqUjNrp5s81Y=; b=keyOla8TBUjjebCptlITw65RiD4rf3p9KQU0N3hWSb6UeYigCd9U41aCA0qbUO5U5l hghq31V+Oo0GS0vZfE+bS95RNANPZ2/Sq2AzcxJ+aj9+nRU6g++qV2U/M3ibZIogXimv +Giu8zM3UMEFnDIwgJU3LX4lNHjOz+LtqYSzPztcX1vizjtMEu5Ur2P7GDMExPGVJ0i4 alWupVWvhTiVDFlPllE5mSJ4YOO/KwxZW81CUxwq5eRlcz0EJthqAjN68SbuSGczMuFy TF1qMA/rkMDn6E5ENY2Zd2PPZ82O1dYV1X3NCrri1z3rHgHuCmR4KHJjanOyjRVy5rSW xvxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748254039; x=1748858839; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UeWDwAIij9m4P5yCgviVByHQv/VRO+qlqUjNrp5s81Y=; b=RGBwxiNH2olj+EtCUizWYxvbuoNI+nit9qaMpd7TAY+MnYN0WEHTwz8FNsoPLlq0mR T8IYz/fuqKZOSBg22B1xxPDqfvGAZko8WRL9+/8W883dxdEBELow0fUvzSZBK4is4sN4 KLqoUDx/cTuU3ErpZg8FF1dZvjX5coyyqkUSFPYYfUr2m8pkgzmVTmuyjzM+tRadpzd2 og2w1595Rk/Fkvv7SkxSKgLwXqbIERDSmIkY0ozv3py6BeZ2mfwLNe/MvnVpguN1a3t3 pycwTgXvmKUqU4rSIMPOic+EkPkxHtFoDihjvLNx0qygcEUql0jChZRbCUGFJBhAtdzA CX1g== X-Forwarded-Encrypted: i=1; AJvYcCVknCYr0PNcsLv0qqAHLI7iOqMGNVGxvms8pBagSDpg9lNRsfofF5aSyx0DyznLGEvJEChYc8Kx38QA@nongnu.org X-Gm-Message-State: AOJu0YziPh33N9CXKKMzDZGqxS/YuEqu0YLnP7BZDW19738yc0YT9OSJ 3i/9OXtSo1W9kLjPvLugfnIl5D2/7fHlDMaxGWgSwlejMvjcR+PWtXFWD5tcUluv78c= X-Gm-Gg: ASbGncvARvvvr5xOr3RdFByNH9+LcQwrySdLqxdKxqa7UXCvOi7OM1Nof32Y1rVlzO4 rUBN9hfkgPuF9vfgNAJCjihycCTys6Rzvvwlpn7TqhQ532O5qOaji7uCePS3bvLq33bTvPqrXA4 cK8tI7FWtWZMHL1fZ2vfTQZq4P73de+Mn+HFTTtimGh1Yb87HhI/1PAeyY6Vx0gG7fH9KReO+Xu ar0rXodI6UNJgHb/oGTW9VxcvRI9gSMvz7/BTLCLSreSpKt78j3Go90VIYHqE35ShNYB6xZEdtD n7e1m21N+8qPOYV/t/Fgs8RXkG92aJM7t34UbaCOJVXP0WAjhqtlhjYDmH3XVesvIgf8pmI8NOa i+fXp+ti8hu3toshQxTXGFj0R X-Google-Smtp-Source: AGHT+IE6xJlSgvyBMrkFwk/bvUzspZwflqpVzWji54kK0D9NZKfwYWo23bk+AA61wcCDcpmfSMliuw== X-Received: by 2002:a05:600c:4684:b0:43c:f87c:24ce with SMTP id 5b1f17b1804b1-44c955dc476mr70458015e9.21.1748254038651; Mon, 26 May 2025 03:07:18 -0700 (PDT) Received: from [192.168.69.138] (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-447f18251adsm239618765e9.2.2025.05.26.03.07.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 May 2025 03:07:17 -0700 (PDT) Message-ID: Date: Mon, 26 May 2025 12:07:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 1/4] acpi: Add machine option to disable SPCR table To: Li Chen , Peter Maydell , Shannon Zhao , "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang , Zhao Liu , Song Gao , Jiaxun Yang , Sunil V L , Palmer Dabbelt , Alistair Francis , Weiwei Li , qemu-arm , qemu-devel , qemu-riscv References: <87msberqzi.wl-me@linux.beauty> <87ldqyrqqo.wl-me@linux.beauty> Content-Language: en-US From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <87ldqyrqqo.wl-me@linux.beauty> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Hi Li, On 15/5/25 14:41, Li Chen wrote: > From: Li Chen > > The ACPI SPCR (Serial Port Console Redirection) table allows firmware > to specify a preferred serial console device to the operating system. > On ARM64 systems, Linux by default respects this table: even if the > kernel command line does not include a hardware serial console (e.g., > "console=ttyAMA0"), the kernel still register the serial device > referenced by SPCR as a printk console. > > While this behavior is standard-compliant, it can lead to situations > where guest console behavior is influenced by platform firmware rather > than user-specified configuration. To make guest console behavior more > predictable and under user control, this patch introduces a machine > option to explicitly disable SPCR table exposure: > > -machine spcr=off > > By default, the option is enabled (spcr=on), preserving existing > behavior. When disabled, QEMU will omit the SPCR table from the guest's > ACPI namespace, ensuring that only consoles explicitly declared in the > kernel command line are registered. > > Signed-off-by: Li Chen > Reviewed-by: Bibo Mao > Acked-by: Michael S. Tsirkin > Reviewed-by: Gavin Shan > --- > diff --git a/include/hw/boards.h b/include/hw/boards.h > index 765dc8dd35..089104d54b 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -444,6 +444,7 @@ struct MachineState { > SmpCache smp_cache; > struct NVDIMMState *nvdimms_state; > struct NumaState *numa_state; > + bool enable_spcr; This structure is used by all machines. Can we be more descriptive, maybe naming as "acpi_spcr_enabled"? Thanks, Phil.