From nobody Mon May 13 01:42:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1694533778; cv=none; d=zohomail.com; s=zohoarc; b=NUAvuSn6dRdwDFY5b9VVTECRYEe1yt0oc5YkxN4xFG0yowqTSTKMUaKilBpOi4yRBZum8i0RAn1phLKnuTNG1ezRRW1rYjKSjwTXo3q7f8ELMINA96cRa9vLg24j1Ks1UlLOT6V+ywbbw+nSBsmd47mDVaKr4gu+7RTAyesyzKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694533778; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=3IGldxBfH68CFg9FGKJW4m9ne/VJK2zzCID5ax8z9+w=; b=b+0JNDVK9M16CA7a4XxFXCCcQ07sr9r4E1eCxL1HsJjv5qOxKRA8JWDzCC2x7UcbHtWgg53gPNY88uuQqCtJbfsz+o46SBPnHGZ8rjt/261vAV2rnATeAVOFADBSQlW90pc8spqpKLqODP3ooTnW3UlkNx7BDa/BmN+k8js9TVg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694533777994293.2267899763136; Tue, 12 Sep 2023 08:49:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg5d6-0002qN-FZ; Tue, 12 Sep 2023 11:48:44 -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 1qg5d4-0002pz-R2 for qemu-devel@nongnu.org; Tue, 12 Sep 2023 11:48:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg5d1-0005Zz-Fx for qemu-devel@nongnu.org; Tue, 12 Sep 2023 11:48:42 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-AOge-AF8OB-sOD3SXR_Fiw-1; Tue, 12 Sep 2023 11:48:32 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A30893822565; Tue, 12 Sep 2023 15:48:28 +0000 (UTC) Received: from lacos-laptop-9.usersys.redhat.com (unknown [10.39.193.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5777364671; Tue, 12 Sep 2023 15:48:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694533717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3IGldxBfH68CFg9FGKJW4m9ne/VJK2zzCID5ax8z9+w=; b=dFQwDOiZL330mpMSKeRpFy0pdoNiGVAptKieadPdyxtXjh0LSgE8iYeXwRVcJs0b7Wyc7d jwvP5x9iv64yGomU1KsJ6ZfHLI3003BCPVnP1/R2sHxWGDe1JD2NJnQE/r04PDYX8ylUt+ lLqr2CH1jP0WPtWymHzkZYBiWDlvd60= X-MC-Unique: AOge-AF8OB-sOD3SXR_Fiw-1 From: Laszlo Ersek To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost , qemu-trivial@nongnu.org Subject: [PATCH] hw/i386/pc: fix code comment on cumulative flash size Date: Tue, 12 Sep 2023 17:48:25 +0200 Message-Id: <20230912154825.81568-1-lersek@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=lersek@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@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-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694533778937100002 Content-Type: text/plain; charset="utf-8" - The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 2020-12-09); clean them up. Arguably, it's also better to be consistent with the "MiB" unit that QEMU uses nowadays. Cc: "Michael S. Tsirkin" (supporter:PC) Cc: Marcel Apfelbaum (supporter:PC) Cc: Paolo Bonzini (maintainer:X86 TCG CPUs) Cc: Richard Henderson (maintainer:X86 TCG CP= Us) Cc: Eduardo Habkost (maintainer:X86 TCG CPUs) Cc: qemu-trivial@nongnu.org Fixes: 0657c657eb37 Signed-off-by: Laszlo Ersek --- hw/i386/pc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 54838c0c411d..d06b8da49cae 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1746,12 +1746,12 @@ static void pc_machine_set_max_fw_size(Object *obj,= Visitor *v, } =20 /* - * We don't have a theoretically justifiable exact lower bound on the b= ase - * address of any flash mapping. In practice, the IO-APIC MMIO range is - * [0xFEE00000..0xFEE01000] -- see IO_APIC_DEFAULT_ADDRESS --, leaving = free - * only 18MB-4KB below 4G. For now, restrict the cumulative mapping to = 8MB in - * size. - */ + * We don't have a theoretically justifiable exact lower bound on the = base + * address of any flash mapping. In practice, the IO-APIC MMIO range is + * [0xFEE00000..0xFEE01000] -- see IO_APIC_DEFAULT_ADDRESS --, leaving= free + * only 18MB-4KB below 4G. For now, restrict the cumulative mapping to= 16MiB + * in size. + */ if (value > 16 * MiB) { error_setg(errp, "User specified max allowed firmware size %" PRIu64 " i= s "