From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:906:80c3:b0:7ae:d8f:8937 with SMTP id a3csp3200191ejx; Mon, 14 Nov 2022 15:40:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf4zfnfqJ4hVcwpsNTul652Pz9/S8WppdEfOf7Opjf0cbgYusMVu3WIcv0fx54E5+4M0NV/T X-Received: by 2002:ac8:7cac:0:b0:3a4:f056:1e81 with SMTP id z12-20020ac87cac000000b003a4f0561e81mr14252590qtv.229.1668469207555; Mon, 14 Nov 2022 15:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668469207; cv=none; d=google.com; s=arc-20160816; b=dnYeUtLvNe/Inp5RHDEOcILX0ijI5FAUzBrOhyLh7jRsi6nVFhxwqgqLIDNGUgelbX JKdVmlHot3xcQeVu2LfwbZvPFAKzwCryzhfcizGAx5usxDFK4QqYeWhMz3+Dkjd+yJYd WNx8Wp77dcVon3jNQF7Pt3O2gy9QSBZJojdbkVS7HOMM/8p1lLcUGWndmlYmJ6ZbSn7a KW1QF7nTWGWl9c9CMaQEQBh5vvK7r+azLubf71ELJ+8K1phZJGqQsGnlGvPIrubaRLoE f2eYF/LdeQTwBVV9wdePFzrREaqxHA3fq21F0pUz+YaBn7p/8FzcEr1xaDEY9emHJtBM QIPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:feedback-id :dkim-signature:dkim-signature; bh=+EkW7niIO2ESJMZsyiMB8bPKJw80De6Ug4FFIbb56Cc=; b=TZToubHB3IsLvLmSBOP/67Lvw8uu1r7HMTQpY0vUQ7wrMdT1VDFtbl4YoUq8Yqxz9Q Rz90kEfSsBghxdO32RX9d1XfsTG8vGa3fOzhYlfcoQFI0YB7OfPaU4J8Kyc4H/SQkxUX fDGuDyuuCCe1lggVfbSb8mbZsIiEbFIgVtfX39yhj8U45ArsTCPQpnBbqII5j2JtCANI RwEGendEy2crlIsuhU5og9FpxwqROMtRDb7UY6WeT5KV+FW6vWRaEvqwT/zT9dJzEVhp P4ljro+OTGgUW+tZjn6ocVw0P2fi8r+I9tpm4Ce3qMz90yDlYFzgbRzEc0bsRCUZ0bGX pyrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@pjd.dev header.s=fm2 header.b=NdSsaCyk; dkim=fail header.i=@messagingengine.com header.s=fm1 header.b=nNqpAgu0; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f20-20020ac84994000000b003a2045e3688si5948801qtq.665.2022.11.14.15.40.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Nov 2022 15:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@pjd.dev header.s=fm2 header.b=NdSsaCyk; dkim=fail header.i=@messagingengine.com header.s=fm1 header.b=nNqpAgu0; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouiiA-0001nV-4i; Mon, 14 Nov 2022 18:17:54 -0500 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 1ouieS-00039s-OP; Mon, 14 Nov 2022 18:14:05 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oueop-0006QX-Ra; Mon, 14 Nov 2022 14:08:34 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7EA585C01AD; Mon, 14 Nov 2022 14:08:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 14 Nov 2022 14:08:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pjd.dev; h=cc:cc :content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1668452906; x=1668539306; bh=+EkW7niIO2ESJMZsyiMB8bPKJ w80De6Ug4FFIbb56Cc=; b=NdSsaCykkPMJshpRdbZvg4ZDxD73xqeQWmueu9Kwt GGUi+Gj24ncwh6yT2tO/rccVuWzNoPxZ/o9gnNsoPEBizh2HJBYDg5JyrlVPrd9O Iy7TdMNWBMoBW4dieH8I4JD/X2lwJCtUihS2+3rYgRfI6DPJaErtZAYDWAGq1SRu N+8Bmw+Jx8bGfB8U29r89rHGv/1KLBsSAVBjT0GTwmW3ePZp/CmZ/KyA4YJe0c3G XGqjh0rP6JdCG6T9qbyR+b9bzn3FKLXOZrPx+/WpHJ/g55fR3BUPky5iVz3dIPZw 0Ah9Du51XWI/Vvx/hiONghI5Mrf1JIdGStBAej2YC7dcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1668452906; x=1668539306; bh=+EkW7niIO2ESJMZsyiMB8bPKJw80De6Ug4F FIbb56Cc=; b=nNqpAgu0gevnLtD1Hw1kyUg5lm23zX6/03tRB7Lvaz6BeY/2VcN 2hpVf1FiHXT5BLLKSQG6uMB8cfXnnUW5nN4iD8L48CZN6c3yV510ByJq0S0ZGtnn UyKdHZznupsTdzQYVxSqaYckz6PYECzIOjCcvGPg+uRDmjKg66Vy0QKA20foZYjK j/q0RpDTqo8iBIttZfhfUut8Ak83y0Ixsj+WTntmbDdK/z6ToDHVj/e0vFyfR23/ ClQwmuqgFYw/xqf9pxInwJbNgxspQCRQIKeajvJ9fqNul+XpvL0wbuGy/vlN47PF hDvGIzKC4nNQZNBmQPQ1zgFJX+v1kUIQaQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgedvgdelfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecumhhishhsihhnghcuvffquchfihgvlhguucdlfedtmd enucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefrvghtvghr ucffvghlvghvohhrhigrshcuoehpvghtvghrsehpjhgurdguvghvqeenucggtffrrghtth gvrhhnpedvjeeghfekjeejiedtuddtvdeugeehheefleetffeugeejuddttefgvdegveei geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvg htvghrsehpjhgurdguvghv X-ME-Proxy: Feedback-ID: i9e814621:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Nov 2022 14:08:25 -0500 (EST) From: Peter Delevoryas To: Cc: clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au, joel@jms.id.au, qemu-arm@nongnu.org, qemu-devel@nongnu.org, peter@pjd.dev, patrick@stwcx.xyz Subject: [PATCH 0/1] hw/arm/aspeed: Automatically zero-extend flash images Date: Mon, 14 Nov 2022 11:08:22 -0800 Message-Id: <20221114190823.1888691-1-peter@pjd.dev> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.26; envelope-from=peter@pjd.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: 9iMO2jeSWRqI I've been using this patch for a long time so that I don't have to use dd to zero-extend stuff all the time. It's just doing what people are doing already, right? I hope it's not controversial. One note: I couldn't figure out how to make it work without changing the permissions on the block device to allow truncation. If somebody knows how to avoid the `blk_get_perm`, `blk_set_perm` calls here, let me know! Thanks, Peter Peter Delevoryas (1): hw/arm/aspeed: Automatically zero-extend flash images hw/arm/aspeed.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) -- 2.38.1