From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181046; cv=none; d=zohomail.com; s=zohoarc; b=AzR1sehc3ahnPFqDq5tLSv3YBYlulbLiRao7SMsgjI0tttdmrTJP9der5QD2jP/LpHcrLjC8Y1pJuARSiblkLphaCYFAGUM0AV1O0Ii9zkWsWUjlDM4mijsU1dn/KPjzjANiuD+64SGFtAI3jyEgy7Jl4KjzvdI1BI/MT/cCvpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181046; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=fXiS0gXaJKLHeJaB2gpXG9fi3g1HNSXjqN1jMBdY7BM=; b=b6yJox8BzEu4xwSLdDGqqCa8+me+mzoGXuTYUJRLZXNUF5AiwDXig2wnv425YeOVz3+Fk8xFHsKjAS9NMFiQDmAGrjFqiFPvMcbhFGGNbpDs5SwKpm6/8/8PuWLHt5V0wIctEYAaCEdmx942vt7J7G+b0yytWze5UTS3SNhih1A= 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 1769181046709243.19093665248533; Fri, 23 Jan 2026 07:10:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInG-00070J-NY; Fri, 23 Jan 2026 10:09:50 -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 1vjInD-0006xz-1t for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:47 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInB-000305-Fo for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:46 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-47ee807a4c5so24432695e9.2 for ; Fri, 23 Jan 2026 07:09:44 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180983; x=1769785783; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fXiS0gXaJKLHeJaB2gpXG9fi3g1HNSXjqN1jMBdY7BM=; b=XRCnX2Azu80ebOKdZ94KvxWigUTNt8dggxPIZLY24hEX947xykV5HwpCi6pZBtHuXC URtTprt4OSwj2YBwD+Fgz3RZZ1rFG4s7rwOjyriZ+YN9PB3iYeyLzUuD6B7uanV16glj VjJuXcbhbKewJ0y/al7goHhtpBjHad000bk0bn7Nye1aeZAu91j6Qtd3/oookMXwoOi9 1IQJPgISYoARhcFfy5pW1ZD7zTd2KYmH5SLJnhqiYnHkcL3bH3OW+VCwpFBvCrsE9p3A +Y9sm54eIs/uW9qv577ly5QCfXnZQtlGq9bsLJmGkgCa4OF/1PO3iOQTowZBhV20fPVY Qzjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180983; x=1769785783; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=fXiS0gXaJKLHeJaB2gpXG9fi3g1HNSXjqN1jMBdY7BM=; b=hIu5EeGSfzgpBjgMzDec6K3J715ZWSWzGcSyWzBHLp3q3/ogmxm2AFNvxfTzCnWyJO Rr4LLap3ix9lrdsn4hzeB7gKNibDc3YuJoNRcXq5cqtEhj4Ki/EcnEV+QINUtSHUrkA6 Jb1XzSG5g8XiPDHTRVCiloD8xtSSrww4589bQc8c3tcxTml4pBSOqqBmr4tFbWlRLNzr NkiiElCtxCWYbpwPHBgdW7TfRJcpN0FL9NJFdqq2qx/N4N9ngpSSabriUsWeFdTVKqvx 6W2Q0RSU6lDBeAuSHks11o5hBWsrMPkxXcythRm5TU3EsFAWQKzaV6duFZkzFGR1SLOZ N/0A== X-Gm-Message-State: AOJu0Yzz+i6/UwNaRe4qFOGgqp4E5zg/E4j4fHmm9pW4BN3cP1eSL5zp m92prTS5s5s729c2Y3buQ19NhKpfstYO+8WAmSKo8Ir/6DYuzdlD+fe5/g7wxodqSj79I94vqoj nElQY+P8= X-Gm-Gg: AZuq6aKGIgGRy2waEcX02CiD+vA1/WKyBB3avQWb+rEfxEz+KPQDzpJ7ZapXAsVWm64 q18smYOX0j4acMTEnDj8grXET2/lhWUbiHKyLuhZQ2Ld9MUdrLbmslriy9q8PauusO8WjcEPBkG HvY4UwH0cP+sWcjWW3iOxKoOzDoa4Xp5uOZzDihYcpP1PFO1fUj4phsf2WQkxL1aib0/ubNtXay UKlQLcGmHJ5a8fgKjSdQdueJsDf5/saxutppE/lzVgnBoiPdqc1XDK7dSJmbC81RtNNXBz1iIfP 6zVsVpeHLxrrozeilLTdvsdBiusAiGnEW1dXtv7oNiYiEtrSZ2JwjnZADc6FHEDD5AXo9lkSM0B Ahj2e8XG3tPQWx7AmSdTmi0R/IxTJPf8gWUsl3lBAw3us3VRPDQMutnoloKUx56tTZMEOysV2aX wxRY/u6sz/xlbKmPr4zpzjxZxO3nmRXXQ3HjjuhakBgMr1sAs/ug26 X-Received: by 2002:a05:600c:5494:b0:480:1e9e:f9d with SMTP id 5b1f17b1804b1-4804c94810fmr52024855e9.8.1769180983436; Fri, 23 Jan 2026 07:09:43 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/22] hw/arm/imx8mp-evk: Provide some defaults matching real hardware Date: Fri, 23 Jan 2026 15:09:19 +0000 Message-ID: <20260123150941.1877768-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181048468154100 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Having four CPUs and 6 GiB of RAM matches real hardware. Fix the machine defaults to make its use more ergonomic and less error-prone. Signed-off-by: Bernhard Beschow Message-id: 20260114213227.3812-2-shentey@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/imx8mp-evk.rst | 2 +- hw/arm/imx8mp-evk.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/system/arm/imx8mp-evk.rst b/docs/system/arm/imx8mp-evk.rst index 75c8fbd366..79600cf39a 100644 --- a/docs/system/arm/imx8mp-evk.rst +++ b/docs/system/arm/imx8mp-evk.rst @@ -54,7 +54,7 @@ Now that everything is prepared the machine can be starte= d as follows: =20 .. code-block:: bash =20 - $ qemu-system-aarch64 -M imx8mp-evk -smp 4 -m 3G \ + $ qemu-system-aarch64 -M imx8mp-evk \ -display none -serial null -serial stdio \ -kernel Image \ -dtb imx8mp-evk.dtb \ diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c index 0af5aad583..b84ac91a17 100644 --- a/hw/arm/imx8mp-evk.c +++ b/hw/arm/imx8mp-evk.c @@ -117,8 +117,10 @@ static void imx8mp_evk_machine_init(MachineClass *mc) { mc->desc =3D "NXP i.MX 8M Plus EVK Board"; mc->init =3D imx8mp_evk_init; + mc->default_cpus =3D 4; mc->max_cpus =3D FSL_IMX8MP_NUM_CPUS; mc->default_ram_id =3D "imx8mp-evk.ram"; + mc->default_ram_size =3D 6 * GiB; mc->get_default_cpu_type =3D imx8mp_evk_get_default_cpu_type; } =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181128; cv=none; d=zohomail.com; s=zohoarc; b=EnknvX9MRzRRYHtaTsYlF3JDEID3eSCIyW9qYf9zBfVXaNZXHA9sBJILUBV44Na+SrRwDUdgA+Rl72shRbB7a5VUwGZYHJ/RK9cAZd6MNWtHnE6uYKZ2iAZLjsm23mT2+DOiqFfmZSXEWkxvaDMBw4M7Bv+KNiV92rEVtJYiWKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181128; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=M1oVYxqoM8J9nRz2MCulkkHN20WO4j52vl4dcwX6S6s=; b=eDi/BcfYxHA3grcyx8bI1aTtDL5gr11qlWeK864oJ2RKNiUQLWvr8PDYFc6PDzW15oa22weogiz4EYbIUvREgUtfjyYOgBqhAg6nIvmnTSrQ8C+4P0alK+4GXhoA91VRe+km0MTM2Yj8IxexgtBOrfyBYqM8PkXJ1K5QJXmfCdQ= 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 1769181128400582.1734841445528; Fri, 23 Jan 2026 07:12:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIoy-000162-QA; Fri, 23 Jan 2026 10:11:40 -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 1vjInE-0006zM-H2 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:49 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInB-00030H-Vf for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:48 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4801d1daf53so26645765e9.2 for ; Fri, 23 Jan 2026 07:09:45 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180984; x=1769785784; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=M1oVYxqoM8J9nRz2MCulkkHN20WO4j52vl4dcwX6S6s=; b=kcFZlwjf78Rr73jes8P2nGksCoi3wZycOT2QJtzcIzNJ1eR2mPdXIGWnxX83h0o2xx C/eTUpgnOgl+/+PnBCVWUGCmRwWrmYJGKfWdoZSSL3fGn8kvc6GDnvGwuN29X1slDBnV 8wdlsnwkT1cuC59EOgiaT+yBaUGg351mge/wNcedj67CQgu+YN0V5B+6oi7Ap54zI5fc oVSWvkMcnyOm9PKXvLQZdOnKSZ4JvBcpfOhdS/2GtYWJzXBBhdtD3b7ZDtKnyQaRvDhc jTvH5CMLC4ES2PzG5BiiZRJV4ICzEveQuhTwOzhOUQ6GlYurPbpVOmykKQ/7xkJ3K5Jp 4blg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180984; x=1769785784; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=M1oVYxqoM8J9nRz2MCulkkHN20WO4j52vl4dcwX6S6s=; b=N6YQnU2H6Srk8sgnFmMxVDoZ6CMhHwHRD2DcAbP51gYziYFNcIcNAf5mBzjD1RjH9t AyND9P+g/IOuHHCzLUtLkvD+8a1K8s+rslpua5uY1xQl/llkAziZ3x4QbChaJ6+0Veke Zr35Pgf2/poZKnbuVf8P7dyHWQ9RixZinWcRP0FXYV3jg5HibVKBgTlgm7l8QFGQsEQ/ rumqdAiGnw/JaWjyF2gzyLH3uxE279UVG5tr9nslnw7qVUZ173ykQQfuwinTYBSYV5qI 5jcZDkggEgP1OpFFO/FNOW8Sz7WpcTU712y77AM8W/LMqRGQB47U54JAcnWmvM2Jb9fE +8Sw== X-Gm-Message-State: AOJu0Yzmjace+OnZoTN4j+Y1NU/p2nKzY8RfHvZSOU0zHpUuTh8nn/vx aj0R1w47WKvzWyKzkbgWFQAfzntxBS3L/W6QrjaQG+zpP+yejWvPCJL7Mv0a/uHwU9XJB4vePS3 IbWKoADI= X-Gm-Gg: AZuq6aJAjdr79aBZrYV5fNyoYjFiGUqV6oUMKyosQx8KJENKtLETzo4b5b6rxInRlGg m87KHlTIeZ4qZFr3/QRpyggFkLT4KMZ1L54Y6hbIBhSXQK/hpn/iIrs0VgynJ5no/fyZk1kU8lc Mbxkzrl949iNUdzYxYzk2OUD7aQ5J+/7TfX/toWzCbtDtkvmx2OzRkklwfSJudarDvHpsH5NvzJ suOeCwxbMxBpSh59QUeZxPojwjkh/hre+sG7mQMk2Yx8xmBooi/swGT+0jJKZjh/wUFtOCfUI7U GFlZx6/Uj/OkXZ0wcQxfeCy/9DcAD6SkKznkRIF2aPQTg4suK2zJ0eKTjs5miMWk6GS19Jgbbjz 3rgPYg3pOju6o5dOWaOUOF29GIJ6AxcjuIjTXOOkv8yYyjlDKcYFMROWBp/R9/fv0ua1NprQFN3 IWv4QWPtJTnfWtcK163b9HQTTWPfbChg0Dpye9I40UAoJAGZVzdnYp X-Received: by 2002:a05:600c:45c8:b0:47e:d943:ec08 with SMTP id 5b1f17b1804b1-48053b17da3mr3208555e9.28.1769180984292; Fri, 23 Jan 2026 07:09:44 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/22] docs/system/arm/imx8mp-evk: Avoid suggesting redundant CLI parameters Date: Fri, 23 Jan 2026 15:09:20 +0000 Message-ID: <20260123150941.1877768-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181135728154100 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Commit 094fd7d36f2a ("hw/arm/imx8mp-evk: Add KVM support") introduced KVM support for the imx8mp-evk machine. KVM only works with the "host" CPU type such that it has been made the default CPU type for KVM. No need to repeat that on the command line. Fixes: 094fd7d36f2a ("hw/arm/imx8mp-evk: Add KVM support") Signed-off-by: Bernhard Beschow Message-id: 20260114213227.3812-3-shentey@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/imx8mp-evk.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/arm/imx8mp-evk.rst b/docs/system/arm/imx8mp-evk.rst index 79600cf39a..e60a422824 100644 --- a/docs/system/arm/imx8mp-evk.rst +++ b/docs/system/arm/imx8mp-evk.rst @@ -66,7 +66,7 @@ KVM Acceleration ---------------- =20 To enable hardware-assisted acceleration via KVM, append -``-accel kvm -cpu host`` to the command line. While this speeds up perform= ance +``-accel kvm`` to the command line. While this speeds up performance significantly, be aware of the following limitations: =20 * The ``imx8mp-evk`` machine is not included under the "virtualization use= case" --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181274; cv=none; d=zohomail.com; s=zohoarc; b=eAHpNuWVjmmvNHEw5VssJ6/1wzW36VGShPaIdWSio6BKJbZWUw+GdYn0eENUkCOhrHZSaKljdmIWybfdgS35AjsvkcsslC3+CtTVUvEfa8Zy9tS40sV6Sb4F+tOvWnSE0EgL+1ds3bp7njUSTGBtQwCPPkhv1TP6gdNY3fM0lfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181274; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=zZSRW6WNJcEIE6bCFEC7d0OtJZfhOn3I22/VeIsAwlk=; b=hVJMpGys2uPI1sg63HHXKkqf7PBgVgbbRsk38SkOa8Ahi84c7yKlMn9EaZJSPZolmQKv/tUy41F1m7bcQB4ZkXDkk9o46ZN32ZQh4UMh8uEJ5myn26sjzcP0Qy1zlQDL89a9RPxbpwx2UgIlzKGdehBcpDYxdFAHDyBi9ujE02E= 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 1769181274690629.7443489979548; Fri, 23 Jan 2026 07:14:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIpL-0002No-98; Fri, 23 Jan 2026 10:11:59 -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 1vjInI-00072q-OV for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:53 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInE-00030s-72 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:52 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-432d2c96215so2016477f8f.3 for ; Fri, 23 Jan 2026 07:09:47 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180987; x=1769785787; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=zZSRW6WNJcEIE6bCFEC7d0OtJZfhOn3I22/VeIsAwlk=; b=R8M1Z5PWnvhz83VDaThD0hUJ1VPE8UAg9Y8o4aQ5peiZZT+winRan5oXO3EutRRz3u 9rNvVPHi0kj8cr6TB4jK75Vqh8ycOLNSciBGjj1PhwYwb9XUpbhNMureXLvkHyAr0Nil JFAG+ut9W3BugC3HxC3+v5Zaikcd8ocJLNOBUspFsZZV11KghpBShnYjBLdadopiMmeG AuyafkDWz9OO9tdQfU3ZHMypP8ZBh4zY0GNcy+V4/8iZpbhPu2Z+F9tgtL9oGK9ToN1d cgvWMUS/pNHezDc307Hdf+sNldxOaADFoaGiyDiEJNOzs5AwcEYVmXaLfyNuVlFbcir2 U9FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180987; x=1769785787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=zZSRW6WNJcEIE6bCFEC7d0OtJZfhOn3I22/VeIsAwlk=; b=NQt2+7Kyk26BI0+3Dn8cYBOjaxxMD9M6HlcXBE+00tbu85iKb33saHBQj8Ij4jzt3c 09jEffBnFkCqOhLk8A0fKI1SUeb1kLExn5lClio79s8MW7kp7z5SmV7sP76b7M1msOpE S6k9Qtaoj3ffAgAeEo+44mYPVE3HhzzosjFo8ZWhmWQXM8ouUwWB7e2vJ996X+8eZynJ yW2Awc9EXEeUrM1f1rx5SBiEoebCKC9fkYnzNMvOsSlSuyzytIgywADFgWgCIv/fhcJ1 L6yMKskDCvhQpBI1x1PQwL07g2PoT+5tpVLlwYFZTEYtQ/RSDnaoYu8hqdqZFolaAwgt F9mg== X-Gm-Message-State: AOJu0YzjxF10egkGjd461/Mn90mFIiSvWPCTFszVI21nJXIANdzWZQIi Wk3PAd1/bwH+82zWpforslqj9P5yur1htE2W7Xgw4ImJcbvA2UvHVPk284hcEcP44nc/Vs6oWrJ epBq9Yqs= X-Gm-Gg: AZuq6aLfoLORVDEMMdxFg1BGeyr75qssBb4N0tooje9gkYkOPS0ZjDDKPVyQBjkXWHG nGq2Hz1/+iLIsA9BVwHR9bpYIrcl+pUAx2h7HPvrsXBwR3jS9iTBnVUnoy2x9OEU4+6QsVAMP1K 858XcOLTcXqJru6MXDFG0uNl1MjVC2yQ3awDYVkbEDA6mG7EQ4fCtTs1T8SkXD0CGkUKnfEkEkO BBZkp6rktHm7pM5XoVXPZ5JtqhcunFyaY4Z0gdxVb0FD8Etltx2sG3XF9NPSUMeVRmlC0cPrKbF M2jZCORHObq1cxl3zUsfRyCDbeI1rWlJ77aoMeCR06/wUdAKIpMaajufGOnZSr130c6MAlOyEqG nQY6exDDeUnu1f76cAgoRJdjKvZKhQJdQU/fnQitXounhaMs+ILOggLfeS4RptDghfArJaGUh+A z0JPj+TjMdoQvSMETsmj/m9uZaRadrUJsCsytpNrG7/zJoDEZoRLRLrxZ+CNDXBOs= X-Received: by 2002:a05:6000:4210:b0:430:f437:5a6d with SMTP id ffacd0b85a97d-435b1594135mr5903437f8f.22.1769180985269; Fri, 23 Jan 2026 07:09:45 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/22] kernel-doc.py: sync with upstream Kernel v6.19-rc4 Date: Fri, 23 Jan 2026 15:09:21 +0000 Message-ID: <20260123150941.1877768-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181276082154100 Content-Type: text/plain; charset="utf-8" From: Mauro Carvalho Chehab The changes here are aligned up to this Linux changeset: f64c7e113dc9 ("scripts: docs: kdoc_files.py: don't consider symlinks as di= rectories") On other words, everything that it is there, except for the patch moving the library to tools/lib/python. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Peter Maydell Message-id: 54dec248994abf37c4b5b9e48d5ab8f0f8df6f2d.1767716928.git.mchehab= +huawei@kernel.org Acked-by: Michael S. Tsirkin Signed-off-by: Peter Maydell --- scripts/lib/kdoc/kdoc_files.py | 11 +- scripts/lib/kdoc/kdoc_item.py | 3 +- scripts/lib/kdoc/kdoc_output.py | 93 +++- scripts/lib/kdoc/kdoc_parser.py | 901 ++++++++++++++++---------------- scripts/lib/kdoc/kdoc_re.py | 24 +- 5 files changed, 556 insertions(+), 476 deletions(-) diff --git a/scripts/lib/kdoc/kdoc_files.py b/scripts/lib/kdoc/kdoc_files.py index 9e09b45b02..85365cc316 100644 --- a/scripts/lib/kdoc/kdoc_files.py +++ b/scripts/lib/kdoc/kdoc_files.py @@ -49,7 +49,7 @@ def _parse_dir(self, dirname): for entry in obj: name =3D os.path.join(dirname, entry.name) =20 - if entry.is_dir(): + if entry.is_dir(follow_symlinks=3DFalse): yield from self._parse_dir(name) =20 if not entry.is_file(): @@ -64,7 +64,7 @@ def _parse_dir(self, dirname): =20 def parse_files(self, file_list, file_not_found_cb): """ - Define an interator to parse all source files from file_list, + Define an iterator to parse all source files from file_list, handling directories if any """ =20 @@ -229,7 +229,7 @@ def out_msg(self, fname, name, arg): Return output messages from a file name using the output style filtering. =20 - If output type was not handled by the syler, return None. + If output type was not handled by the styler, return None. """ =20 # NOTE: we can add rules here to filter out unwanted parts, @@ -275,7 +275,10 @@ def msg(self, enable_lineno=3DFalse, export=3DFalse, i= nternal=3DFalse, self.config.log.warning("No kernel-doc for file %s", fname) continue =20 - for arg in self.results[fname]: + symbols =3D self.results[fname] + self.out_style.set_symbols(symbols) + + for arg in symbols: m =3D self.out_msg(fname, arg.name, arg) =20 if m is None: diff --git a/scripts/lib/kdoc/kdoc_item.py b/scripts/lib/kdoc/kdoc_item.py index b3b2257645..19805301cb 100644 --- a/scripts/lib/kdoc/kdoc_item.py +++ b/scripts/lib/kdoc/kdoc_item.py @@ -5,8 +5,9 @@ # =20 class KdocItem: - def __init__(self, name, type, start_line, **other_stuff): + def __init__(self, name, fname, type, start_line, **other_stuff): self.name =3D name + self.fname =3D fname self.type =3D type self.declaration_start_line =3D start_line self.sections =3D {} diff --git a/scripts/lib/kdoc/kdoc_output.py b/scripts/lib/kdoc/kdoc_output= .py index 39fa872dfc..25de79ea6b 100644 --- a/scripts/lib/kdoc/kdoc_output.py +++ b/scripts/lib/kdoc/kdoc_output.py @@ -8,7 +8,7 @@ Implement output filters to print kernel-doc documentation. =20 The implementation uses a virtual base class (OutputFormat) which -contains a dispatches to virtual methods, and some code to filter +contains dispatches to virtual methods, and some code to filter out output messages. =20 The actual implementation is done on one separate class per each type @@ -59,7 +59,7 @@ class OutputFormat: OUTPUT_EXPORTED =3D 2 # output exported symbols OUTPUT_INTERNAL =3D 3 # output non-exported symbols =20 - # Virtual member to be overriden at the inherited classes + # Virtual member to be overridden at the inherited classes highlights =3D [] =20 def __init__(self): @@ -85,7 +85,7 @@ def set_config(self, config): def set_filter(self, export, internal, symbol, nosymbol, function_tabl= e, enable_lineno, no_doc_sections): """ - Initialize filter variables according with the requested mode. + Initialize filter variables according to the requested mode. =20 Only one choice is valid between export, internal and symbol. =20 @@ -208,13 +208,16 @@ def msg(self, fname, name, args): return self.data =20 # Warn if some type requires an output logic - self.config.log.warning("doesn't now how to output '%s' block", + self.config.log.warning("doesn't know how to output '%s' block", dtype) =20 return None =20 # Virtual methods to be overridden by inherited classes # At the base class, those do nothing. + def set_symbols(self, symbols): + """Get a list of all symbols from kernel_doc""" + def out_doc(self, fname, name, args): """Outputs a DOC block""" =20 @@ -577,6 +580,7 @@ def __init__(self, modulename): =20 super().__init__() self.modulename =3D modulename + self.symbols =3D [] =20 dt =3D None tstamp =3D os.environ.get("KBUILD_BUILD_TIMESTAMP") @@ -593,6 +597,69 @@ def __init__(self, modulename): =20 self.man_date =3D dt.strftime("%B %Y") =20 + def arg_name(self, args, name): + """ + Return the name that will be used for the man page. + + As we may have the same name on different namespaces, + prepend the data type for all types except functions and typedefs. + + The doc section is special: it uses the modulename. + """ + + dtype =3D args.type + + if dtype =3D=3D "doc": + return self.modulename + + if dtype in ["function", "typedef"]: + return name + + return f"{dtype} {name}" + + def set_symbols(self, symbols): + """ + Get a list of all symbols from kernel_doc. + + Man pages will uses it to add a SEE ALSO section with other + symbols at the same file. + """ + self.symbols =3D symbols + + def out_tail(self, fname, name, args): + """Adds a tail for all man pages""" + + # SEE ALSO section + self.data +=3D f'.SH "SEE ALSO"' + "\n.PP\n" + self.data +=3D (f"Kernel file \\fB{args.fname}\\fR\n") + if len(self.symbols) >=3D 2: + cur_name =3D self.arg_name(args, name) + + related =3D [] + for arg in self.symbols: + out_name =3D self.arg_name(arg, arg.name) + + if cur_name =3D=3D out_name: + continue + + related.append(f"\\fB{out_name}\\fR(9)") + + self.data +=3D ",\n".join(related) + "\n" + + # TODO: does it make sense to add other sections? Maybe + # REPORTING ISSUES? LICENSE? + + def msg(self, fname, name, args): + """ + Handles a single entry from kernel-doc parser. + + Add a tail at the end of man pages output. + """ + super().msg(fname, name, args) + self.out_tail(fname, name, args) + + return self.data + def output_highlight(self, block): """ Outputs a C symbol that may require being highlighted with @@ -618,7 +685,9 @@ def out_doc(self, fname, name, args): if not self.check_doc(name, args): return =20 - self.data +=3D f'.TH "{self.modulename}" 9 "{self.modulename}" "{s= elf.man_date}" "API Manual" LINUX' + "\n" + out_name =3D self.arg_name(args, name) + + self.data +=3D f'.TH "{self.modulename}" 9 "{out_name}" "{self.man= _date}" "API Manual" LINUX' + "\n" =20 for section, text in args.sections.items(): self.data +=3D f'.SH "{section}"' + "\n" @@ -627,7 +696,9 @@ def out_doc(self, fname, name, args): def out_function(self, fname, name, args): """output function in man""" =20 - self.data +=3D f'.TH "{name}" 9 "{name}" "{self.man_date}" "Kernel= Hacker\'s Manual" LINUX' + "\n" + out_name =3D self.arg_name(args, name) + + self.data +=3D f'.TH "{name}" 9 "{out_name}" "{self.man_date}" "Ke= rnel Hacker\'s Manual" LINUX' + "\n" =20 self.data +=3D ".SH NAME\n" self.data +=3D f"{name} \\- {args['purpose']}\n" @@ -671,7 +742,9 @@ def out_function(self, fname, name, args): self.output_highlight(text) =20 def out_enum(self, fname, name, args): - self.data +=3D f'.TH "{self.modulename}" 9 "enum {name}" "{self.ma= n_date}" "API Manual" LINUX' + "\n" + out_name =3D self.arg_name(args, name) + + self.data +=3D f'.TH "{self.modulename}" 9 "{out_name}" "{self.man= _date}" "API Manual" LINUX' + "\n" =20 self.data +=3D ".SH NAME\n" self.data +=3D f"enum {name} \\- {args['purpose']}\n" @@ -703,8 +776,9 @@ def out_enum(self, fname, name, args): def out_typedef(self, fname, name, args): module =3D self.modulename purpose =3D args.get('purpose') + out_name =3D self.arg_name(args, name) =20 - self.data +=3D f'.TH "{module}" 9 "{name}" "{self.man_date}" "API = Manual" LINUX' + "\n" + self.data +=3D f'.TH "{module}" 9 "{out_name}" "{self.man_date}" "= API Manual" LINUX' + "\n" =20 self.data +=3D ".SH NAME\n" self.data +=3D f"typedef {name} \\- {purpose}\n" @@ -717,8 +791,9 @@ def out_struct(self, fname, name, args): module =3D self.modulename purpose =3D args.get('purpose') definition =3D args.get('definition') + out_name =3D self.arg_name(args, name) =20 - self.data +=3D f'.TH "{module}" 9 "{args.type} {name}" "{self.man_= date}" "API Manual" LINUX' + "\n" + self.data +=3D f'.TH "{module}" 9 "{out_name}" "{self.man_date}" "= API Manual" LINUX' + "\n" =20 self.data +=3D ".SH NAME\n" self.data +=3D f"{args.type} {name} \\- {purpose}\n" diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser= .py index 32b4356292..b2b790d6b8 100644 --- a/scripts/lib/kdoc/kdoc_parser.py +++ b/scripts/lib/kdoc/kdoc_parser.py @@ -22,8 +22,8 @@ # # Regular expressions used to parse kernel-doc markups at KernelDoc class. # -# Let's declare them in lowercase outside any class to make easier to -# convert from the python script. +# Let's declare them in lowercase outside any class to make it easier to +# convert from the Perl script. # # As those are evaluated at the beginning, no need to cache them # @@ -46,7 +46,7 @@ known_section_names =3D 'description|context|returns?|notes?|examples?' known_sections =3D KernRe(known_section_names, flags =3D re.I) doc_sect =3D doc_com + \ - KernRe(r'\s*(\@[.\w]+|\@\.\.\.|' + known_section_names + r')\s*:([^:].= *)?$', + KernRe(r'\s*(@[.\w]+|@\.\.\.|' + known_section_names + r')\s*:([^:].*)= ?$', flags=3Dre.I, cache=3DFalse) =20 doc_content =3D doc_com_body + KernRe(r'(.*)', cache=3DFalse) @@ -54,13 +54,11 @@ doc_inline_sect =3D KernRe(r'\s*\*\s*(@\s*[\w][\w\.]*\s*):(.*)', cache=3DF= alse) doc_inline_end =3D KernRe(r'^\s*\*/\s*$', cache=3DFalse) doc_inline_oneline =3D KernRe(r'^\s*/\*\*\s*(@[\w\s]+):\s*(.*)\s*\*/\s*$',= cache=3DFalse) -attribute =3D KernRe(r"__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)", - flags=3Dre.I | re.S, cache=3DFalse) =20 export_symbol =3D KernRe(r'^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*',= cache=3DFalse) export_symbol_ns =3D KernRe(r'^\s*EXPORT_SYMBOL_NS(_GPL)?\s*\(\s*(\w+)\s*,= \s*"\S+"\)\s*', cache=3DFalse) =20 -type_param =3D KernRe(r"\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)", cache=3DFalse) +type_param =3D KernRe(r"@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)", cache=3DFalse) =20 # # Tests for the beginning of a kerneldoc block in its various forms. @@ -74,6 +72,137 @@ r'(?:[-:].*)?$', # description (not captured) cache =3D False) =20 +# +# Here begins a long set of transformations to turn structure member prefi= xes +# and macro invocations into something we can parse and generate kdoc for. +# +struct_args_pattern =3D r'([^,)]+)' + +struct_xforms =3D [ + # Strip attributes + (KernRe(r"__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)", flags=3Dre.I |= re.S, cache=3DFalse), ' '), + (KernRe(r'\s*__aligned\s*\([^;]*\)', re.S), ' '), + (KernRe(r'\s*__counted_by\s*\([^;]*\)', re.S), ' '), + (KernRe(r'\s*__counted_by_(le|be)\s*\([^;]*\)', re.S), ' '), + (KernRe(r'\s*__packed\s*', re.S), ' '), + (KernRe(r'\s*CRYPTO_MINALIGN_ATTR', re.S), ' '), + (KernRe(r'\s*__private', re.S), ' '), + (KernRe(r'\s*__rcu', re.S), ' '), + (KernRe(r'\s*____cacheline_aligned_in_smp', re.S), ' '), + (KernRe(r'\s*____cacheline_aligned', re.S), ' '), + (KernRe(r'\s*__cacheline_group_(begin|end)\([^\)]+\);'), ''), + # + # Unwrap struct_group macros based on this definition: + # __struct_group(TAG, NAME, ATTRS, MEMBERS...) + # which has variants like: struct_group(NAME, MEMBERS...) + # Only MEMBERS arguments require documentation. + # + # Parsing them happens on two steps: + # + # 1. drop struct group arguments that aren't at MEMBERS, + # storing them as STRUCT_GROUP(MEMBERS) + # + # 2. remove STRUCT_GROUP() ancillary macro. + # + # The original logic used to remove STRUCT_GROUP() using an + # advanced regex: + # + # \bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*; + # + # with two patterns that are incompatible with + # Python re module, as it has: + # + # - a recursive pattern: (?1) + # - an atomic grouping: (?>...) + # + # I tried a simpler version: but it didn't work either: + # \bSTRUCT_GROUP\(([^\)]+)\)[^;]*; + # + # As it doesn't properly match the end parenthesis on some cases. + # + # So, a better solution was crafted: there's now a NestedMatch + # class that ensures that delimiters after a search are properly + # matched. So, the implementation to drop STRUCT_GROUP() will be + # handled in separate. + # + (KernRe(r'\bstruct_group\s*\(([^,]*,)', re.S), r'STRUCT_GROUP('), + (KernRe(r'\bstruct_group_attr\s*\(([^,]*,){2}', re.S), r'STRUCT_GROUP(= '), + (KernRe(r'\bstruct_group_tagged\s*\(([^,]*),([^,]*),', re.S), r'struct= \1 \2; STRUCT_GROUP('), + (KernRe(r'\b__struct_group\s*\(([^,]*,){3}', re.S), r'STRUCT_GROUP('), + # + # Replace macros + # + # TODO: use NestedMatch for FOO($1, $2, ...) matches + # + # it is better to also move those to the NestedMatch logic, + # to ensure that parentheses will be properly matched. + # + (KernRe(r'__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)', re.S), + r'DECLARE_BITMAP(\1, __ETHTOOL_LINK_MODE_MASK_NBITS)'), + (KernRe(r'DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)', re.S), + r'DECLARE_BITMAP(\1, PHY_INTERFACE_MODE_MAX)'), + (KernRe(r'DECLARE_BITMAP\s*\(' + struct_args_pattern + r',\s*' + struc= t_args_pattern + r'\)', + re.S), r'unsigned long \1[BITS_TO_LONGS(\2)]'), + (KernRe(r'DECLARE_HASHTABLE\s*\(' + struct_args_pattern + r',\s*' + st= ruct_args_pattern + r'\)', + re.S), r'unsigned long \1[1 << ((\2) - 1)]'), + (KernRe(r'DECLARE_KFIFO\s*\(' + struct_args_pattern + r',\s*' + struct= _args_pattern + + r',\s*' + struct_args_pattern + r'\)', re.S), r'\2 *\1'), + (KernRe(r'DECLARE_KFIFO_PTR\s*\(' + struct_args_pattern + r',\s*' + + struct_args_pattern + r'\)', re.S), r'\2 *\1'), + (KernRe(r'(?:__)?DECLARE_FLEX_ARRAY\s*\(' + struct_args_pattern + r',\= s*' + + struct_args_pattern + r'\)', re.S), r'\1 \2[]'), + (KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + struct_args_pattern + r'\)', r= e.S), r'dma_addr_t \1'), + (KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + struct_args_pattern + r'\)', re= .S), r'__u32 \1'), +] +# +# Regexes here are guaranteed to have the end delimiter matching +# the start delimiter. Yet, right now, only one replace group +# is allowed. +# +struct_nested_prefixes =3D [ + (re.compile(r'\bSTRUCT_GROUP\('), r'\1'), +] + +# +# Transforms for function prototypes +# +function_xforms =3D [ + (KernRe(r"^static +"), ""), + (KernRe(r"^extern +"), ""), + (KernRe(r"^asmlinkage +"), ""), + (KernRe(r"^inline +"), ""), + (KernRe(r"^__inline__ +"), ""), + (KernRe(r"^__inline +"), ""), + (KernRe(r"^__always_inline +"), ""), + (KernRe(r"^noinline +"), ""), + (KernRe(r"^__FORTIFY_INLINE +"), ""), + (KernRe(r"QEMU_[A-Z_]+ +"), ""), + (KernRe(r"__init +"), ""), + (KernRe(r"__init_or_module +"), ""), + (KernRe(r"__deprecated +"), ""), + (KernRe(r"__flatten +"), ""), + (KernRe(r"__meminit +"), ""), + (KernRe(r"__must_check +"), ""), + (KernRe(r"__weak +"), ""), + (KernRe(r"__sched +"), ""), + (KernRe(r"_noprof"), ""), + (KernRe(r"__always_unused *"), ""), + (KernRe(r"__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +"), ""), + (KernRe(r"__(?:re)?alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\) +"), ""), + (KernRe(r"__diagnose_as\s*\(\s*\S+\s*(?:,\s*\d+\s*)*\) +"), ""), + (KernRe(r"DECL_BUCKET_PARAMS\s*\(\s*(\S+)\s*,\s*(\S+)\s*\)"), r"\1, \2= "), + (KernRe(r"__attribute_const__ +"), ""), + (KernRe(r"__attribute__\s*\(\((?:[\w\s]+(?:\([^)]*\))?\s*,?)+\)\)\s+")= , ""), +] + +# +# Apply a set of transforms to a block of text. +# +def apply_transforms(xforms, text): + for search, subst in xforms: + text =3D search.sub(subst, text) + return text + # # A little helper to get rid of excess white space # @@ -81,6 +210,21 @@ def trim_whitespace(s): return multi_space.sub(' ', s.strip()) =20 +# +# Remove struct/enum members that have been marked "private". +# +def trim_private_members(text): + # + # First look for a "public:" block that ends a private region, then + # handle the "private until the end" case. + # + text =3D KernRe(r'/\*\s*private:.*?/\*\s*public:.*?\*/', flags=3Dre.S)= .sub('', text) + text =3D KernRe(r'/\*\s*private:.*', flags=3Dre.S).sub('', text) + # + # We needed the comments to do the above, but now we can take them out. + # + return KernRe(r'\s*/\*.*?\*/\s*', flags=3Dre.S).sub('', text).strip() + class state: """ State machine enums @@ -114,8 +258,9 @@ class state: =20 class KernelEntry: =20 - def __init__(self, config, ln): + def __init__(self, config, fname, ln): self.config =3D config + self.fname =3D fname =20 self._contents =3D [] self.prototype =3D "" @@ -134,6 +279,8 @@ def __init__(self, config, ln): =20 self.leading_space =3D None =20 + self.fname =3D fname + # State flags self.brcount =3D 0 self.declaration_start_line =3D ln + 1 @@ -148,9 +295,11 @@ def contents(self): return '\n'.join(self._contents) + '\n' =20 # TODO: rename to emit_message after removal of kernel-doc.pl - def emit_msg(self, log_msg, warning=3DTrue): + def emit_msg(self, ln, msg, *, warning=3DTrue): """Emit a message""" =20 + log_msg =3D f"{self.fname}:{ln} {msg}" + if not warning: self.config.log.info(log_msg) return @@ -196,7 +345,7 @@ def dump_section(self, start_new=3DTrue): # Only warn on user-specified duplicate section names if name !=3D SECTION_DEFAULT: self.emit_msg(self.new_start_line, - f"duplicate section name '{name}'\n") + f"duplicate section name '{name}'") # Treat as a new paragraph - add a blank line self.sections[name] +=3D '\n' + contents else: @@ -210,6 +359,7 @@ def dump_section(self, start_new=3DTrue): self.section =3D SECTION_DEFAULT self._contents =3D [] =20 +python_warning =3D False =20 class KernelDoc: """ @@ -243,19 +393,23 @@ def __init__(self, config, fname): # We need Python 3.7 for its "dicts remember the insertion # order" guarantee # - if sys.version_info.major =3D=3D 3 and sys.version_info.minor < 7: + global python_warning + if (not python_warning and + sys.version_info.major =3D=3D 3 and sys.version_info.minor < 7= ): + self.emit_msg(0, 'Python 3.7 or later is required for correct res= ults') + python_warning =3D True =20 - def emit_msg(self, ln, msg, warning=3DTrue): + def emit_msg(self, ln, msg, *, warning=3DTrue): """Emit a message""" =20 - log_msg =3D f"{self.fname}:{ln} {msg}" - if self.entry: - self.entry.emit_msg(log_msg, warning) + self.entry.emit_msg(ln, msg, warning=3Dwarning) return =20 + log_msg =3D f"{self.fname}:{ln} {msg}" + if warning: self.config.log.warning(log_msg) else: @@ -277,7 +431,8 @@ def output_declaration(self, dtype, name, **args): The actual output and output filters will be handled elsewhere """ =20 - item =3D KdocItem(name, dtype, self.entry.declaration_start_line, = **args) + item =3D KdocItem(name, self.fname, dtype, + self.entry.declaration_start_line, **args) item.warnings =3D self.entry.warnings =20 # Drop empty sections @@ -300,7 +455,14 @@ def reset_state(self, ln): variables used by the state machine. """ =20 - self.entry =3D KernelEntry(self.config, ln) + # + # Flush the warnings out before we proceed further + # + if self.entry and self.entry not in self.entries: + for log_msg in self.entry.warnings: + self.config.log.warning(log_msg) + + self.entry =3D KernelEntry(self.config, self.fname, ln) =20 # State flags self.state =3D state.NORMAL @@ -318,36 +480,26 @@ def push_parameter(self, ln, decl_type, param, dtype, =20 param =3D KernRe(r'[\[\)].*').sub('', param, count=3D1) =20 - if dtype =3D=3D "" and param.endswith("..."): - if KernRe(r'\w\.\.\.$').search(param): - # For named variable parameters of the form `x...`, - # remove the dots - param =3D param[:-3] - else: - # Handles unnamed variable parameters - param =3D "..." - - if param not in self.entry.parameterdescs or \ - not self.entry.parameterdescs[param]: - - self.entry.parameterdescs[param] =3D "variable arguments" - - elif dtype =3D=3D "" and (not param or param =3D=3D "void"): - param =3D "void" - self.entry.parameterdescs[param] =3D "no arguments" - - elif dtype =3D=3D "" and param in ["struct", "union"]: - # Handle unnamed (anonymous) union or struct - dtype =3D param - param =3D "{unnamed_" + param + "}" - self.entry.parameterdescs[param] =3D "anonymous\n" - self.entry.anon_struct_union =3D True - - # Handle cache group enforcing variables: they do not need - # to be described in header files - elif "__cacheline_group" in param: - # Ignore __cacheline_group_begin and __cacheline_group_end - return + # + # Look at various "anonymous type" cases. + # + if dtype =3D=3D '': + if param.endswith("..."): + if len(param) > 3: # there is a name provided, use that + param =3D param[:-3] + if not self.entry.parameterdescs.get(param): + self.entry.parameterdescs[param] =3D "variable argumen= ts" + + elif (not param) or param =3D=3D "void": + param =3D "void" + self.entry.parameterdescs[param] =3D "no arguments" + + elif param in ["struct", "union"]: + # Handle unnamed (anonymous) union or struct + dtype =3D param + param =3D "{unnamed_" + param + "}" + self.entry.parameterdescs[param] =3D "anonymous\n" + self.entry.anon_struct_union =3D True =20 # Warn if parameter has no description # (but ignore ones starting with # as these are not parameters @@ -389,9 +541,6 @@ def create_parameter_list(self, ln, decl_type, args, args =3D arg_expr.sub(r"\1#", args) =20 for arg in args.split(splitter): - # Strip comments - arg =3D KernRe(r'\/\*.*\*\/').sub('', arg) - # Ignore argument attributes arg =3D KernRe(r'\sPOS0?\s').sub(' ', arg) =20 @@ -407,81 +556,76 @@ def create_parameter_list(self, ln, decl_type, args, # Treat preprocessor directive as a typeless variable self.push_parameter(ln, decl_type, arg, "", "", declaration_name) - + # + # The pointer-to-function case. + # elif KernRe(r'\(.+\)\s*\(').search(arg): - # Pointer-to-function - arg =3D arg.replace('#', ',') - - r =3D KernRe(r'[^\(]+\(\*?\s*([\w\[\]\.]*)\s*\)') + r =3D KernRe(r'[^\(]+\(\*?\s*' # Everything up to "(*" + r'([\w\[\].]*)' # Capture the name and possi= ble [array] + r'\s*\)') # Make sure the trailing ")" is= there if r.match(arg): param =3D r.group(1) else: self.emit_msg(ln, f"Invalid param: {arg}") param =3D arg - - dtype =3D KernRe(r'([^\(]+\(\*?)\s*' + re.escape(param)).s= ub(r'\1', arg) - self.push_parameter(ln, decl_type, param, dtype, - arg, declaration_name) - + dtype =3D arg.replace(param, '') + self.push_parameter(ln, decl_type, param, dtype, arg, decl= aration_name) + # + # The array-of-pointers case. Dig the parameter name out from= the middle + # of the declaration. + # elif KernRe(r'\(.+\)\s*\[').search(arg): - # Array-of-pointers - - arg =3D arg.replace('#', ',') - r =3D KernRe(r'[^\(]+\(\s*\*\s*([\w\[\]\.]*?)\s*(\s*\[\s*[= \w]+\s*\]\s*)*\)') + r =3D KernRe(r'[^\(]+\(\s*\*\s*' # Up to "(" and maybe "*" + r'([\w.]*?)' # The actual pointer name + r'\s*(\[\s*\w+\s*\]\s*)*\)') # The [array porti= on] if r.match(arg): param =3D r.group(1) else: self.emit_msg(ln, f"Invalid param: {arg}") param =3D arg - - dtype =3D KernRe(r'([^\(]+\(\*?)\s*' + re.escape(param)).s= ub(r'\1', arg) - - self.push_parameter(ln, decl_type, param, dtype, - arg, declaration_name) - + dtype =3D arg.replace(param, '') + self.push_parameter(ln, decl_type, param, dtype, arg, decl= aration_name) elif arg: + # + # Clean up extraneous spaces and split the string at comma= s; the first + # element of the resulting list will also include the type= information. + # arg =3D KernRe(r'\s*:\s*').sub(":", arg) arg =3D KernRe(r'\s*\[').sub('[', arg) - args =3D KernRe(r'\s*,\s*').split(arg) - if args[0] and '*' in args[0]: - args[0] =3D re.sub(r'(\*+)\s*', r' \1', args[0]) - - first_arg =3D [] - r =3D KernRe(r'^(.*\s+)(.*?\[.*\].*)$') - if args[0] and r.match(args[0]): - args.pop(0) - first_arg.extend(r.group(1)) - first_arg.append(r.group(2)) + args[0] =3D re.sub(r'(\*+)\s*', r' \1', args[0]) + # + # args[0] has a string of "type a". If "a" includes an [a= rray] + # declaration, we want to not be fooled by any white space= inside + # the brackets, so detect and handle that case specially. + # + r =3D KernRe(r'^([^[\]]*\s+)(.*)$') + if r.match(args[0]): + args[0] =3D r.group(2) + dtype =3D r.group(1) else: - first_arg =3D KernRe(r'\s+').split(args.pop(0)) - - args.insert(0, first_arg.pop()) - dtype =3D ' '.join(first_arg) + # No space in args[0]; this seems wrong but preserves = previous behavior + dtype =3D '' =20 + bitfield_re =3D KernRe(r'(.*?):(\w+)') for param in args: - if KernRe(r'^(\*+)\s*(.*)').match(param): - r =3D KernRe(r'^(\*+)\s*(.*)') - if not r.match(param): - self.emit_msg(ln, f"Invalid param: {param}") - continue - - param =3D r.group(1) - + # + # For pointers, shift the star(s) from the variable na= me to the + # type declaration. + # + r =3D KernRe(r'^(\*+)\s*(.*)') + if r.match(param): self.push_parameter(ln, decl_type, r.group(2), f"{dtype} {r.group(1)}", arg, declaration_name) - - elif KernRe(r'(.*?):(\w+)').search(param): - r =3D KernRe(r'(.*?):(\w+)') - if not r.match(param): - self.emit_msg(ln, f"Invalid param: {param}") - continue - + # + # Perform a similar shift for bitfields. + # + elif bitfield_re.search(param): if dtype !=3D "": # Skip unnamed bit-fields - self.push_parameter(ln, decl_type, r.group(1), - f"{dtype}:{r.group(2)}", + self.push_parameter(ln, decl_type, bitfield_re= .group(1), + f"{dtype}:{bitfield_re.gro= up(2)}", arg, declaration_name) else: self.push_parameter(ln, decl_type, param, dtype, @@ -520,13 +664,11 @@ def check_return_section(self, ln, declaration_name, = return_type): self.emit_msg(ln, f"No description found for return value of '{dec= laration_name}'") =20 - def dump_struct(self, ln, proto): - """ - Store an entry for an struct or union - """ - + # + # Split apart a structure prototype; returns (struct|union, name, memb= ers) or None + # + def split_struct_proto(self, proto): type_pattern =3D r'(struct|union)' - qualifiers =3D [ "__attribute__", "__packed", @@ -534,288 +676,202 @@ def dump_struct(self, ln, proto): "____cacheline_aligned_in_smp", "____cacheline_aligned", ] - definition_body =3D r'\{(.*)\}\s*' + "(?:" + '|'.join(qualifiers) = + ")?" - struct_members =3D KernRe(type_pattern + r'([^\{\};]+)(\{)([^\{\}]= *)(\})([^\{\}\;]*)(\;)') - - # Extract struct/union definition - members =3D None - declaration_name =3D None - decl_type =3D None =20 r =3D KernRe(type_pattern + r'\s+(\w+)\s*' + definition_body) if r.search(proto): - decl_type =3D r.group(1) - declaration_name =3D r.group(2) - members =3D r.group(3) + return (r.group(1), r.group(2), r.group(3)) else: r =3D KernRe(r'typedef\s+' + type_pattern + r'\s*' + definitio= n_body + r'\s*(\w+)\s*;') - if r.search(proto): - decl_type =3D r.group(1) - declaration_name =3D r.group(3) - members =3D r.group(2) - - if not members: - self.emit_msg(ln, f"{proto} error: Cannot parse struct or unio= n!") - return - - if self.entry.identifier !=3D declaration_name: - self.emit_msg(ln, - f"expecting prototype for {decl_type} {self.entr= y.identifier}. Prototype was for {decl_type} {declaration_name} instead\n") - return - - args_pattern =3D r'([^,)]+)' - - sub_prefixes =3D [ - (KernRe(r'\/\*\s*private:.*?\/\*\s*public:.*?\*\/', re.S | re.= I), ''), - (KernRe(r'\/\*\s*private:.*', re.S | re.I), ''), - - # Strip comments - (KernRe(r'\/\*.*?\*\/', re.S), ''), - - # Strip attributes - (attribute, ' '), - (KernRe(r'\s*__aligned\s*\([^;]*\)', re.S), ' '), - (KernRe(r'\s*__counted_by\s*\([^;]*\)', re.S), ' '), - (KernRe(r'\s*__counted_by_(le|be)\s*\([^;]*\)', re.S), ' '), - (KernRe(r'\s*__packed\s*', re.S), ' '), - (KernRe(r'\s*CRYPTO_MINALIGN_ATTR', re.S), ' '), - (KernRe(r'\s*____cacheline_aligned_in_smp', re.S), ' '), - (KernRe(r'\s*____cacheline_aligned', re.S), ' '), - - # Unwrap struct_group macros based on this definition: - # __struct_group(TAG, NAME, ATTRS, MEMBERS...) - # which has variants like: struct_group(NAME, MEMBERS...) - # Only MEMBERS arguments require documentation. - # - # Parsing them happens on two steps: - # - # 1. drop struct group arguments that aren't at MEMBERS, - # storing them as STRUCT_GROUP(MEMBERS) - # - # 2. remove STRUCT_GROUP() ancillary macro. - # - # The original logic used to remove STRUCT_GROUP() using an - # advanced regex: - # - # \bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*; - # - # with two patterns that are incompatible with - # Python re module, as it has: - # - # - a recursive pattern: (?1) - # - an atomic grouping: (?>...) - # - # I tried a simpler version: but it didn't work either: - # \bSTRUCT_GROUP\(([^\)]+)\)[^;]*; - # - # As it doesn't properly match the end parenthesis on some cas= es. - # - # So, a better solution was crafted: there's now a NestedMatch - # class that ensures that delimiters after a search are proper= ly - # matched. So, the implementation to drop STRUCT_GROUP() will = be - # handled in separate. - - (KernRe(r'\bstruct_group\s*\(([^,]*,)', re.S), r'STRUCT_GROUP(= '), - (KernRe(r'\bstruct_group_attr\s*\(([^,]*,){2}', re.S), r'STRUC= T_GROUP('), - (KernRe(r'\bstruct_group_tagged\s*\(([^,]*),([^,]*),', re.S), = r'struct \1 \2; STRUCT_GROUP('), - (KernRe(r'\b__struct_group\s*\(([^,]*,){3}', re.S), r'STRUCT_G= ROUP('), - - # Replace macros - # - # TODO: use NestedMatch for FOO($1, $2, ...) matches - # - # it is better to also move those to the NestedMatch logic, - # to ensure that parenthesis will be properly matched. - - (KernRe(r'__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)', re= .S), r'DECLARE_BITMAP(\1, __ETHTOOL_LINK_MODE_MASK_NBITS)'), - (KernRe(r'DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)', re.S), r= 'DECLARE_BITMAP(\1, PHY_INTERFACE_MODE_MAX)'), - (KernRe(r'DECLARE_BITMAP\s*\(' + args_pattern + r',\s*' + args= _pattern + r'\)', re.S), r'unsigned long \1[BITS_TO_LONGS(\2)]'), - (KernRe(r'DECLARE_HASHTABLE\s*\(' + args_pattern + r',\s*' + a= rgs_pattern + r'\)', re.S), r'unsigned long \1[1 << ((\2) - 1)]'), - (KernRe(r'DECLARE_KFIFO\s*\(' + args_pattern + r',\s*' + args_= pattern + r',\s*' + args_pattern + r'\)', re.S), r'\2 *\1'), - (KernRe(r'DECLARE_KFIFO_PTR\s*\(' + args_pattern + r',\s*' + a= rgs_pattern + r'\)', re.S), r'\2 *\1'), - (KernRe(r'(?:__)?DECLARE_FLEX_ARRAY\s*\(' + args_pattern + r',= \s*' + args_pattern + r'\)', re.S), r'\1 \2[]'), - (KernRe(r'DEFINE_DMA_UNMAP_ADDR\s*\(' + args_pattern + r'\)', = re.S), r'dma_addr_t \1'), - (KernRe(r'DEFINE_DMA_UNMAP_LEN\s*\(' + args_pattern + r'\)', r= e.S), r'__u32 \1'), - (KernRe(r'VIRTIO_DECLARE_FEATURES\s*\(' + args_pattern + r'\)'= , re.S), r'u64 \1; u64 \1_array[VIRTIO_FEATURES_DWORDS]'), - ] - - # Regexes here are guaranteed to have the end limiter matching - # the start delimiter. Yet, right now, only one replace group - # is allowed. - - sub_nested_prefixes =3D [ - (re.compile(r'\bSTRUCT_GROUP\('), r'\1'), - ] - - for search, sub in sub_prefixes: - members =3D search.sub(sub, members) - - nested =3D NestedMatch() - - for search, sub in sub_nested_prefixes: - members =3D nested.sub(search, sub, members) - - # Keeps the original declaration as-is - declaration =3D members - - # Split nested struct/union elements - # - # This loop was simpler at the original kernel-doc perl version, as - # while ($members =3D~ m/$struct_members/) { ... } - # reads 'members' string on each interaction. - # - # Python behavior is different: it parses 'members' only once, - # creating a list of tuples from the first interaction. + return (r.group(1), r.group(3), r.group(2)) + return None + # + # Rewrite the members of a structure or union for easier formatting la= ter on. + # Among other things, this function will turn a member like: + # + # struct { inner_members; } foo; + # + # into: + # + # struct foo; inner_members; + # + def rewrite_struct_members(self, members): # - # On other words, this won't get nested structs. + # Process struct/union members from the most deeply nested outward= . The + # trick is in the ^{ below - it prevents a match of an outer struc= t/union + # until the inner one has been munged (removing the "{" in the pro= cess). # - # So, we need to have an extra loop on Python to override such - # re limitation. - - while True: - tuples =3D struct_members.findall(members) - if not tuples: - break - + struct_members =3D KernRe(r'(struct|union)' # 0: declaration type + r'([^\{\};]+)' # 1: possible name + r'(\{)' + r'([^\{\}]*)' # 3: Contents of decla= ration + r'(\})' + r'([^\{\};]*)(;)') # 5: Remaining stuff a= fter declaration + tuples =3D struct_members.findall(members) + while tuples: for t in tuples: newmember =3D "" - maintype =3D t[0] - s_ids =3D t[5] - content =3D t[3] - - oldmember =3D "".join(t) - - for s_id in s_ids.split(','): + oldmember =3D "".join(t) # Reconstruct the original format= ting + dtype, name, lbr, content, rbr, rest, semi =3D t + # + # Pass through each field name, normalizing the form and f= ormatting. + # + for s_id in rest.split(','): s_id =3D s_id.strip() - - newmember +=3D f"{maintype} {s_id}; " + newmember +=3D f"{dtype} {s_id}; " + # + # Remove bitfield/array/pointer info, getting the bare= name. + # s_id =3D KernRe(r'[:\[].*').sub('', s_id) s_id =3D KernRe(r'^\s*\**(\S+)\s*').sub(r'\1', s_id) - + # + # Pass through the members of this inner structure/uni= on. + # for arg in content.split(';'): arg =3D arg.strip() - - if not arg: - continue - - r =3D KernRe(r'^([^\(]+\(\*?\s*)([\w\.]*)(\s*\).*)= ') + # + # Look for (type)(*name)(args) - pointer to functi= on + # + r =3D KernRe(r'^([^\(]+\(\*?\s*)([\w.]*)(\s*\).*)') if r.match(arg): + dtype, name, extra =3D r.group(1), r.group(2),= r.group(3) # Pointer-to-function - dtype =3D r.group(1) - name =3D r.group(2) - extra =3D r.group(3) - - if not name: - continue - if not s_id: # Anonymous struct/union newmember +=3D f"{dtype}{name}{extra}; " else: newmember +=3D f"{dtype}{s_id}.{name}{extr= a}; " - + # + # Otherwise a non-function member. + # else: - arg =3D arg.strip() - # Handle bitmaps + # + # Remove bitmap and array portions and spaces = around commas + # arg =3D KernRe(r':\s*\d+\s*').sub('', arg) - - # Handle arrays arg =3D KernRe(r'\[.*\]').sub('', arg) - - # Handle multiple IDs arg =3D KernRe(r'\s*,\s*').sub(',', arg) - + # + # Look for a normal decl - "type name[,name...= ]" + # r =3D KernRe(r'(.*)\s+([\S+,]+)') - if r.search(arg): - dtype =3D r.group(1) - names =3D r.group(2) + for name in r.group(2).split(','): + name =3D KernRe(r'^\s*\**(\S+)\s*').su= b(r'\1', name) + if not s_id: + # Anonymous struct/union + newmember +=3D f"{r.group(1)} {nam= e}; " + else: + newmember +=3D f"{r.group(1)} {s_i= d}.{name}; " else: newmember +=3D f"{arg}; " - continue - - for name in names.split(','): - name =3D KernRe(r'^\s*\**(\S+)\s*').sub(r'= \1', name).strip() - - if not name: - continue - - if not s_id: - # Anonymous struct/union - newmember +=3D f"{dtype} {name}; " - else: - newmember +=3D f"{dtype} {s_id}.{name}= ; " - + # + # At the end of the s_id loop, replace the original declar= ation with + # the munged version. + # members =3D members.replace(oldmember, newmember) + # + # End of the tuple loop - search again and see if there are ou= ter members + # that now turn up. + # + tuples =3D struct_members.findall(members) + return members =20 - # Ignore other nested elements, like enums - members =3D re.sub(r'(\{[^\{\}]*\})', '', members) - - self.create_parameter_list(ln, decl_type, members, ';', - declaration_name) - self.check_sections(ln, declaration_name, decl_type) - - # Adjust declaration for better display + # + # Format the struct declaration into a standard form for inclusion in = the + # resulting docs. + # + def format_struct_decl(self, declaration): + # + # Insert newlines, get rid of extra spaces. + # declaration =3D KernRe(r'([\{;])').sub(r'\1\n', declaration) declaration =3D KernRe(r'\}\s+;').sub('};', declaration) - - # Better handle inlined enums - while True: - r =3D KernRe(r'(enum\s+\{[^\}]+),([^\n])') - if not r.search(declaration): - break - + # + # Format inline enums with each member on its own line. + # + r =3D KernRe(r'(enum\s+\{[^\}]+),([^\n])') + while r.search(declaration): declaration =3D r.sub(r'\1,\n\2', declaration) - + # + # Now go through and supply the right number of tabs + # for each line. + # def_args =3D declaration.split('\n') level =3D 1 declaration =3D "" for clause in def_args: + clause =3D KernRe(r'\s+').sub(' ', clause.strip(), count=3D1) + if clause: + if '}' in clause and level > 1: + level -=3D 1 + if not clause.startswith('#'): + declaration +=3D "\t" * level + declaration +=3D "\t" + clause + "\n" + if "{" in clause and "}" not in clause: + level +=3D 1 + return declaration =20 - clause =3D clause.strip() - clause =3D KernRe(r'\s+').sub(' ', clause, count=3D1) - - if not clause: - continue - - if '}' in clause and level > 1: - level -=3D 1 =20 - if not KernRe(r'^\s*#').match(clause): - declaration +=3D "\t" * level + def dump_struct(self, ln, proto): + """ + Store an entry for a struct or union + """ + # + # Do the basic parse to get the pieces of the declaration. + # + struct_parts =3D self.split_struct_proto(proto) + if not struct_parts: + self.emit_msg(ln, f"{proto} error: Cannot parse struct or unio= n!") + return + decl_type, declaration_name, members =3D struct_parts =20 - declaration +=3D "\t" + clause + "\n" - if "{" in clause and "}" not in clause: - level +=3D 1 + if self.entry.identifier !=3D declaration_name: + self.emit_msg(ln, f"expecting prototype for {decl_type} {self.= entry.identifier}. " + f"Prototype was for {decl_type} {declaration_nam= e} instead\n") + return + # + # Go through the list of members applying all of our transformatio= ns. + # + members =3D trim_private_members(members) + members =3D apply_transforms(struct_xforms, members) =20 + nested =3D NestedMatch() + for search, sub in struct_nested_prefixes: + members =3D nested.sub(search, sub, members) + # + # Deal with embedded struct and union members, and drop enums enti= rely. + # + declaration =3D members + members =3D self.rewrite_struct_members(members) + members =3D re.sub(r'(\{[^\{\}]*\})', '', members) + # + # Output the result and we are done. + # + self.create_parameter_list(ln, decl_type, members, ';', + declaration_name) + self.check_sections(ln, declaration_name, decl_type) self.output_declaration(decl_type, declaration_name, - definition=3Ddeclaration, + definition=3Dself.format_struct_decl(decla= ration), purpose=3Dself.entry.declaration_purpose) =20 def dump_enum(self, ln, proto): """ Stores an enum inside self.entries array. """ - - # Ignore members marked private - proto =3D KernRe(r'\/\*\s*private:.*?\/\*\s*public:.*?\*\/', flags= =3Dre.S).sub('', proto) - proto =3D KernRe(r'\/\*\s*private:.*}', flags=3Dre.S).sub('}', pro= to) - - # Strip comments - proto =3D KernRe(r'\/\*.*?\*\/', flags=3Dre.S).sub('', proto) - - # Strip #define macros inside enums + # + # Strip preprocessor directives. Note that this depends on the + # trailing semicolon we added in process_proto_type(). + # proto =3D KernRe(r'#\s*((define|ifdef|if)\s+|endif)[^;]*;', flags= =3Dre.S).sub('', proto) - # # Parse out the name and members of the enum. Typedef form first. # r =3D KernRe(r'typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;') if r.search(proto): declaration_name =3D r.group(2) - members =3D r.group(1).rstrip() + members =3D trim_private_members(r.group(1)) # # Failing that, look for a straight enum # @@ -823,7 +879,7 @@ def dump_enum(self, ln, proto): r =3D KernRe(r'enum\s+(\w*)\s*\{(.*)\}') if r.match(proto): declaration_name =3D r.group(1) - members =3D r.group(2).rstrip() + members =3D trim_private_members(r.group(2)) # # OK, this isn't going to work. # @@ -867,7 +923,7 @@ def dump_enum(self, ln, proto): for k in self.entry.parameterdescs: if k not in member_set: self.emit_msg(ln, - f"Excess enum value '%{k}' description in '{= declaration_name}'") + f"Excess enum value '@{k}' description in '{= declaration_name}'") =20 self.output_declaration('enum', declaration_name, purpose=3Dself.entry.declaration_purpose) @@ -889,66 +945,34 @@ def dump_declaration(self, ln, prototype): =20 def dump_function(self, ln, prototype): """ - Stores a function of function macro inside self.entries array. + Stores a function or function macro inside self.entries array. """ =20 - func_macro =3D False + found =3D func_macro =3D False return_type =3D '' decl_type =3D 'function' - - # Prefixes that would be removed - sub_prefixes =3D [ - (r"^static +", "", 0), - (r"^extern +", "", 0), - (r"^asmlinkage +", "", 0), - (r"^inline +", "", 0), - (r"^__inline__ +", "", 0), - (r"^__inline +", "", 0), - (r"^__always_inline +", "", 0), - (r"^noinline +", "", 0), - (r"^__FORTIFY_INLINE +", "", 0), - (r"QEMU_[A-Z_]+ +", "", 0), - (r"__init +", "", 0), - (r"__init_or_module +", "", 0), - (r"__deprecated +", "", 0), - (r"__flatten +", "", 0), - (r"__meminit +", "", 0), - (r"__must_check +", "", 0), - (r"__weak +", "", 0), - (r"__sched +", "", 0), - (r"_noprof", "", 0), - (r"__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +", "", 0), - (r"__(?:re)?alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\) +", "", = 0), - (r"__diagnose_as\s*\(\s*\S+\s*(?:,\s*\d+\s*)*\) +", "", 0), - (r"DECL_BUCKET_PARAMS\s*\(\s*(\S+)\s*,\s*(\S+)\s*\)", r"\1, \2= ", 0), - (r"__attribute_const__ +", "", 0), - - # It seems that Python support for re.X is broken: - # At least for me (Python 3.13), this didn't work -# (r""" -# __attribute__\s*\(\( -# (?: -# [\w\s]+ # attribute name -# (?:\([^)]*\))? # attribute arguments -# \s*,? # optional comma at the end -# )+ -# \)\)\s+ -# """, "", re.X), - - # So, remove whitespaces and comments from it - (r"__attribute__\s*\(\((?:[\w\s]+(?:\([^)]*\))?\s*,?)+\)\)\s+"= , "", 0), - ] - - for search, sub, flags in sub_prefixes: - prototype =3D KernRe(search, flags).sub(sub, prototype) - - # Macros are a special case, as they change the prototype format + # + # Apply the initial transformations. + # + prototype =3D apply_transforms(function_xforms, prototype) + # + # If we have a macro, remove the "#define" at the front. + # new_proto =3D KernRe(r"^#\s*define\s+").sub("", prototype) if new_proto !=3D prototype: - is_define_proto =3D True prototype =3D new_proto - else: - is_define_proto =3D False + # + # Dispense with the simple "#define A B" case here; the key + # is the space after the name of the symbol being defined. + # NOTE that the seemingly misnamed "func_macro" indicates a + # macro *without* arguments. + # + r =3D KernRe(r'^(\w+)\s+') + if r.search(prototype): + return_type =3D '' + declaration_name =3D r.group(1) + func_macro =3D True + found =3D True =20 # Yes, this truly is vile. We are looking for: # 1. Return type (may be nothing if we're looking at a macro) @@ -966,91 +990,73 @@ def dump_function(self, ln, prototype): # - atomic_set (macro) # - pci_match_device, __copy_to_user (long return type) =20 - name =3D r'[a-zA-Z0-9_~:]+' - prototype_end1 =3D r'[^\(]*' - prototype_end2 =3D r'[^\{]*' - prototype_end =3D fr'\(({prototype_end1}|{prototype_end2})\)' - - # Besides compiling, Perl qr{[\w\s]+} works as a non-capturing gro= up. - # So, this needs to be mapped in Python with (?:...)? or (?:...)+ - + name =3D r'\w+' type1 =3D r'(?:[\w\s]+)?' type2 =3D r'(?:[\w\s]+\*+)+' - - found =3D False - - if is_define_proto: - r =3D KernRe(r'^()(' + name + r')\s+') - - if r.search(prototype): - return_type =3D '' - declaration_name =3D r.group(2) - func_macro =3D True - - found =3D True - + # + # Attempt to match first on (args) with no internal parentheses; t= his + # lets us easily filter out __acquires() and other post-args stuff= . If + # that fails, just grab the rest of the line to the last closing + # parenthesis. + # + proto_args =3D r'\(([^\(]*|.*)\)' + # + # (Except for the simple macro case) attempt to split up the proto= type + # in the various ways we understand. + # if not found: patterns =3D [ - rf'^()({name})\s*{prototype_end}', - rf'^({type1})\s+({name})\s*{prototype_end}', - rf'^({type2})\s*({name})\s*{prototype_end}', + rf'^()({name})\s*{proto_args}', + rf'^({type1})\s+({name})\s*{proto_args}', + rf'^({type2})\s*({name})\s*{proto_args}', ] =20 for p in patterns: r =3D KernRe(p) - if r.match(prototype): - return_type =3D r.group(1) declaration_name =3D r.group(2) args =3D r.group(3) - self.create_parameter_list(ln, decl_type, args, ',', declaration_name) - found =3D True break + # + # Parsing done; make sure that things are as we expect. + # if not found: self.emit_msg(ln, f"cannot understand function prototype: '{protot= ype}'") return - if self.entry.identifier !=3D declaration_name: - self.emit_msg(ln, - f"expecting prototype for {self.entry.identifier= }(). Prototype was for {declaration_name}() instead") + self.emit_msg(ln, f"expecting prototype for {self.entry.identi= fier}(). " + f"Prototype was for {declaration_name}() instead= ") return - self.check_sections(ln, declaration_name, "function") - self.check_return_section(ln, declaration_name, return_type) + # + # Store the result. + # + self.output_declaration(decl_type, declaration_name, + typedef=3D('typedef' in return_type), + functiontype=3Dreturn_type, + purpose=3Dself.entry.declaration_purpose, + func_macro=3Dfunc_macro) =20 - if 'typedef' in return_type: - self.output_declaration(decl_type, declaration_name, - typedef=3DTrue, - functiontype=3Dreturn_type, - purpose=3Dself.entry.declaration_purpo= se, - func_macro=3Dfunc_macro) - else: - self.output_declaration(decl_type, declaration_name, - typedef=3DFalse, - functiontype=3Dreturn_type, - purpose=3Dself.entry.declaration_purpo= se, - func_macro=3Dfunc_macro) =20 def dump_typedef(self, ln, proto): """ Stores a typedef inside self.entries array. """ - - typedef_type =3D r'((?:\s+[\w\*]+\b){0,7}\s+(?:\w+\b|\*+))\s*' + # + # We start by looking for function typedefs. + # + typedef_type =3D r'typedef((?:\s+[\w*]+\b){0,7}\s+(?:\w+\b|\*+))\s= *' typedef_ident =3D r'\*?\s*(\w\S+)\s*' typedef_args =3D r'\s*\((.*)\);' =20 - typedef1 =3D KernRe(r'typedef' + typedef_type + r'\(' + typedef_id= ent + r'\)' + typedef_args) - typedef2 =3D KernRe(r'typedef' + typedef_type + typedef_ident + ty= pedef_args) - - # Strip comments - proto =3D KernRe(r'/\*.*?\*/', flags=3Dre.S).sub('', proto) + typedef1 =3D KernRe(typedef_type + r'\(' + typedef_ident + r'\)' += typedef_args) + typedef2 =3D KernRe(typedef_type + typedef_ident + typedef_args) =20 # Parse function typedef prototypes for r in [typedef1, typedef2]: @@ -1066,21 +1072,16 @@ def dump_typedef(self, ln, proto): f"expecting prototype for typedef {self.entr= y.identifier}. Prototype was for typedef {declaration_name} instead\n") return =20 - decl_type =3D 'function' - self.create_parameter_list(ln, decl_type, args, ',', declarati= on_name) + self.create_parameter_list(ln, 'function', args, ',', declarat= ion_name) =20 - self.output_declaration(decl_type, declaration_name, + self.output_declaration('function', declaration_name, typedef=3DTrue, functiontype=3Dreturn_type, purpose=3Dself.entry.declaration_purpo= se) return - - # Handle nested parentheses or brackets - r =3D KernRe(r'(\(*.\)\s*|\[*.\]\s*);$') - while r.search(proto): - proto =3D r.sub('', proto) - - # Parse simple typedefs + # + # Not a function, try to parse a simple typedef. + # r =3D KernRe(r'typedef.*\s+(\w+)\s*;') if r.match(proto): declaration_name =3D r.group(1) @@ -1179,7 +1180,7 @@ def process_name(self, ln, line): # else: self.emit_msg(ln, - f"This comment starts with '/**', but isn't = a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst\n{line}") + f"This comment starts with '/**', but isn't = a kernel-doc comment. Refer to Documentation/doc-guide/kernel-doc.rst\n{lin= e}") self.state =3D state.NORMAL return # @@ -1263,7 +1264,7 @@ def is_comment_end(self, ln, line): self.dump_section() =20 # Look for doc_com + + doc_end: - r =3D KernRe(r'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') + r =3D KernRe(r'\s*\*\s*[a-zA-Z_0-9:.]+\*/') if r.match(line): self.emit_msg(ln, f"suspicious ending line: {line}") =20 @@ -1474,7 +1475,7 @@ def process_proto_function(self, ln, line): """Ancillary routine to process a function prototype""" =20 # strip C99-style comments to end of line - line =3D KernRe(r"\/\/.*$", re.S).sub('', line) + line =3D KernRe(r"//.*$", re.S).sub('', line) # # Soak up the line's worth of prototype text, stopping at { or ; i= f present. # diff --git a/scripts/lib/kdoc/kdoc_re.py b/scripts/lib/kdoc/kdoc_re.py index 612223e1e7..2dfa1bf83d 100644 --- a/scripts/lib/kdoc/kdoc_re.py +++ b/scripts/lib/kdoc/kdoc_re.py @@ -16,7 +16,7 @@ =20 class KernRe: """ - Helper class to simplify regex declaration and usage, + Helper class to simplify regex declaration and usage. =20 It calls re.compile for a given pattern. It also allows adding regular expressions and define sub at class init time. @@ -27,7 +27,7 @@ class KernRe: =20 def _add_regex(self, string, flags): """ - Adds a new regex or re-use it from the cache. + Adds a new regex or reuses it from the cache. """ self.regex =3D re_cache.get(string, None) if not self.regex: @@ -114,7 +114,7 @@ class NestedMatch: =20 '\\bSTRUCT_GROUP(\\(((?:(?>[^)(]+)|(?1))*)\\))[^;]*;' =20 - which is used to properly match open/close parenthesis of the + which is used to properly match open/close parentheses of the string search STRUCT_GROUP(), =20 Add a class that counts pairs of delimiters, using it to match and @@ -136,13 +136,13 @@ class NestedMatch: # \bSTRUCT_GROUP\( # # is similar to: STRUCT_GROUP\((.*)\) - # except that the content inside the match group is delimiter's aligne= d. + # except that the content inside the match group is delimiter-aligned. # - # The content inside parenthesis are converted into a single replace + # The content inside parentheses is converted into a single replace # group (e.g. r`\1'). # # It would be nice to change such definition to support multiple - # match groups, allowing a regex equivalent to. + # match groups, allowing a regex equivalent to: # # FOO\((.*), (.*), (.*)\) # @@ -168,14 +168,14 @@ def _search(self, regex, line): but I ended using a different implementation to align all three ty= pes of delimiters and seek for an initial regular expression. =20 - The algorithm seeks for open/close paired delimiters and place them - into a stack, yielding a start/stop position of each match when t= he + The algorithm seeks for open/close paired delimiters and places th= em + into a stack, yielding a start/stop position of each match when the stack is zeroed. =20 - The algorithm shoud work fine for properly paired lines, but will - silently ignore end delimiters that preceeds an start delimiter. + The algorithm should work fine for properly paired lines, but will + silently ignore end delimiters that precede a start delimiter. This should be OK for kernel-doc parser, as unaligned delimiters - would cause compilation errors. So, we don't need to rise exceptio= ns + would cause compilation errors. So, we don't need to raise excepti= ons to cover such issues. """ =20 @@ -203,7 +203,7 @@ def _search(self, regex, line): stack.append(end) continue =20 - # Does the end delimiter match what it is expected? + # Does the end delimiter match what is expected? if stack and d =3D=3D stack[-1]: stack.pop() =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181036; cv=none; d=zohomail.com; s=zohoarc; b=jDV3oT+NFQsxpGRR7Qv7wwRVhnx+onSpJ+uNg4trdK4ILttMgIo14qRVYUffKTZcEOzRouPUlBj9UkvRc7fEC8M9YTXY7O0K2IjFD8eOQNcm4+Xh6TEXuQ1/KvGdrGWFiO4obIgHjefLghNulvJxduhPi3YlFuqhXDyEn+UbXoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181036; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ZNP6KP85dajoQNFC5dSv+ufczUFqWljygvZZe+JtVzc=; b=hZ9V6wHFgvzwPX0EIFmN2T1odrrEUpu6UhBvoJHZAjnrivI29u0wd1ERaWgiiNSGv1PrtzHZnXXUxFMfJUxw31e4gvAgo1Q5CCpeGmsRZMNYMumf2N4N18sxVhh0m0ptbY/307lH3rYnnlrAdDeqfcem1Y7thcJG0bDfwRJT8LU= 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 17691810369640.10752828737338405; Fri, 23 Jan 2026 07:10:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIne-00077c-5p; Fri, 23 Jan 2026 10:10:14 -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 1vjInG-00071w-W3 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:52 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInE-00030q-Ag for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:50 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-42fbc544b09so1789582f8f.1 for ; Fri, 23 Jan 2026 07:09:47 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180986; x=1769785786; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZNP6KP85dajoQNFC5dSv+ufczUFqWljygvZZe+JtVzc=; b=rxhMrSuElgmAKBNBTY1Aa5a0ieypPpHum85xaYIRFcC531SZKyL9eV+5aO+KX/AGp9 A176XpdxIBqTaqWHHWtAB2Pkgb7pfoKnRGqluky96ixbTjE6pw22/XwrlRB0RooHX7fs YelhJqmiRYgrfRgmjm+JZ9qjPd93lniUtFKKZy3h0dzbuDIbSq9/biIKJQe9QMGGBz6M u7jdBr3etHQ1Tbl50isJWAlUVqb78qWbI2jUdEbA74L8fXm05536K+4gfDU66vRf9qbU wXZ74MpIC8AinKCydj2z2NkgWCxPCrsWzE/MmQRsNAN5KpgeI8tyzMH+5oOiM3bFYGSc utzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180986; x=1769785786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ZNP6KP85dajoQNFC5dSv+ufczUFqWljygvZZe+JtVzc=; b=is2F+2iamLdxorx8sBv43zFDq34d4dG+AxKxk18DkbK73uriWOMbSPWWd7+1PKfD39 WUtUgNHuVhoXPneG77O+1lVWieCcFbCTuS7httQI4yhyQN75u6GvjmKGagHNUn+VZEuZ tQaB65aBzYcDnJzXB2EUbkM7ZEZ/hio4hmShpWjVwalTnyBFdT7hO7LdXDO+EbNR23wh WPxxbq+awxXPxBJH3mDCie7h30u1cj4it0Mh7gws1B3PKwEitDf7N57je3ekFnFCH0Yu HH2Om5Ey/IkDok0Ooad9/LGoTRCSkx+RZ6NTWYVhZlYGUd6STtBSs/tHD/L6gIX9AZCZ yntw== X-Gm-Message-State: AOJu0YzkF7RsSgkTFqHWsdORkyg8xb8QKocrTCnyZ0qqHHjymoi9SgIf AUzAUl+k0Mp6MGcYpzv8+3ja/x02R2Cglv5uuOYFp0y7L+yIO0T4LQ+kWYEtnJd2lYIX3bGEGrT yCQrxJSE= X-Gm-Gg: AZuq6aKGTBiAzSgcU3fFDu7rxk1OyPSsrsXZZy175ovAD3oFEzeQHDBsTDFaPhdwND1 61kBq6mvA+KhjghPJp4V9wvvpEZNY5FsM01CNXfLahECNvfzxgX0B0sXs7aFv/OHm/kyyPdN0XK V9S0eGu8RP76jZAqDnCNs7ZYgEPEB6d+ydbDkdVcHgWmI7q6IBJpwpMdgddJPt6mX0iE0WHsdHl AfNMN5xhJsILJzGEfpBHXi3VFLS0IERPONW/O3/nZ8O8IiD8L9Uof5txzbjHi385lYjFi9OptuF tM6noS6J0vhh0YGxDSU9pWDrA1ECvVzgXoOqrxh/XbQbA9KI+VLgN3JhIved+2mKFmlAvEZWUZI lgMFNB/dGb1TMg4i/X0ztCdnfGbf+2ZIziDZgzV1xb2T5lUcO6WjNPnyKsNZYV+UDNsFSxBDNEL Q1RiP1ACo5Nyte6py1AAiTHkLfj6tqOeB2WGbbE+MLMPxYjynLgapI X-Received: by 2002:a05:6000:2dc8:b0:435:9cf1:2833 with SMTP id ffacd0b85a97d-435b1587944mr6717384f8f.12.1769180986217; Fri, 23 Jan 2026 07:09:46 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/22] docs: Be consistent about capitalization of 'Arm' (again) Date: Fri, 23 Jan 2026 15:09:22 +0000 Message-ID: <20260123150941.1877768-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, WEIRD_QUOTING=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181038398154100 The company 'Arm' went through a rebranding many years back involving a recapitalization from 'ARM' to 'Arm'. As a result our documentation is a bit inconsistent between the two forms. It's not worth trying to update everywhere in QEMU, but it's easy enough to make docs/ consistent. We last did this in commit 6fe6d6c9a in 2020, but a few new uses of the wrong capitalization have crept back in since. As before, "ARMv8" and similar architecture names, and older CPU names like "ARM926" still retain all-caps. In a few places we make minor grammar fixups as we touch the sentences we're fixing. Signed-off-by: Peter Maydell Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260115150545.669444-1-peter.maydell@linaro.org --- docs/devel/testing/qgraph.rst | 8 ++++---- docs/devel/vfio-iommufd.rst | 2 +- docs/specs/fsi.rst | 2 +- docs/system/arm/aspeed.rst | 6 +++--- docs/system/arm/b-l475e-iot01a.rst | 2 +- docs/system/arm/nrf.rst | 4 ++-- docs/system/arm/stm32.rst | 12 ++++++------ docs/system/arm/xlnx-versal-virt.rst | 16 ++++++++-------- docs/system/guest-loader.rst | 2 +- docs/system/replay.rst | 2 +- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/devel/testing/qgraph.rst b/docs/devel/testing/qgraph.rst index 43342d9d65..ca63d1ea98 100644 --- a/docs/devel/testing/qgraph.rst +++ b/docs/devel/testing/qgraph.rst @@ -8,7 +8,7 @@ take care of booting QEMU with the right machine and device= s. This makes each test "hardcoded" for a specific configuration, reducing the possible coverage that it can reach. =20 -For example, the sdhci device is supported on both x86_64 and ARM boards, +For example, the sdhci device is supported on both x86_64 and Arm boards, therefore a generic sdhci test should test all machines and drivers that support that device. Using only libqos APIs, the test has to manually take care of @@ -195,7 +195,7 @@ there. The ``arm/raspi2b`` machine node is listed as "UNAVAILABLE". Although it is reachable from the root via '' -> 'arm/raspi2b' the node is unavailable be= cause the QEMU binary did not list it when queried by the framework. This is exp= ected -because we used the ``qemu-system-x86_64`` binary which does not support A= RM +because we used the ``qemu-system-x86_64`` binary which does not support A= rm machine types. =20 If a test is unexpectedly listed as "UNAVAILABLE", first check that the "A= LL @@ -214,9 +214,9 @@ Here we continue the ``sdhci`` use case, with the follo= wing scenario: =20 - ``sdhci-test`` aims to test the ``read[q,w], writeq`` functions offered by the ``sdhci`` drivers. -- The current ``sdhci`` device is supported by both ``x86_64/pc`` and ``AR= M`` +- The current ``sdhci`` device is supported by both ``x86_64/pc`` and Arm (in this example we focus on the ``arm-raspi2b``) machines. -- QEMU offers 2 types of drivers: ``QSDHCI_MemoryMapped`` for ``ARM`` and +- QEMU offers 2 types of drivers: ``QSDHCI_MemoryMapped`` for Arm and ``QSDHCI_PCI`` for ``x86_64/pc``. Both implement the ``read[q,w], writeq`` functions. =20 diff --git a/docs/devel/vfio-iommufd.rst b/docs/devel/vfio-iommufd.rst index 6928b47643..78bcdffac7 100644 --- a/docs/devel/vfio-iommufd.rst +++ b/docs/devel/vfio-iommufd.rst @@ -122,7 +122,7 @@ container: Supported platform =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -Supports x86, ARM and s390x currently. +Supports x86, Arm and s390x currently. =20 Caveats =3D=3D=3D=3D=3D=3D=3D diff --git a/docs/specs/fsi.rst b/docs/specs/fsi.rst index af87822531..f7d86d3e37 100644 --- a/docs/specs/fsi.rst +++ b/docs/specs/fsi.rst @@ -40,7 +40,7 @@ for the implementation are: (see the `FSI specification`_= for more details) MMIO-mapping of the CFAM address straight onto a sub-region of the OPB address space. =20 -5. An APB-to-OPB bridge enabling access to the OPB from the ARM core in the +5. An APB-to-OPB bridge enabling access to the OPB from the Arm core in the AST2600. Hardware limitations prevent the OPB from being directly mapped into APB, so all accesses are indirect through the bridge. =20 diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index 4fa1739cb5..97e14b7d33 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -5,7 +5,7 @@ The QEMU Aspeed machines model BMCs of various OpenPOWER sy= stems and Aspeed evaluation boards. They are based on different releases of the Aspeed SoC : the AST2400 integrating an ARM926EJ-S CPU (400MHz), the AST2500 with an ARM1176JZS CPU (800MHz), the AST2600 -with dual cores ARM Cortex-A7 CPUs (1.2GHz). +with dual cores Arm Cortex-A7 CPUs (1.2GHz). =20 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, etc. @@ -279,7 +279,7 @@ Aspeed 2700 family boards (``ast2700-evb``, ``ast2700fc= ``) =20 The QEMU Aspeed machines model BMCs of Aspeed evaluation boards. They are based on different releases of the Aspeed SoC : -the AST2700 with quad cores ARM Cortex-A35 64 bits CPUs (1.6GHz). +the AST2700 with quad cores Arm Cortex-A35 64 bits CPUs (1.6GHz). =20 The SoC comes with RAM, Gigabit ethernet, USB, SD/MMC, USB, SPI, I2C, etc. @@ -453,7 +453,7 @@ Aspeed MiniBMC and Platform Root of Trust processor fam= ily boards (``ast1030-evb =20 The QEMU Aspeed machines model mini BMCs and Platform Root of Trust proces= sors of various Aspeed evaluation boards. They are based on different releases of the Aspeed SoC = : the AST1030 (MiniBMC) -and AST1060 (Platform Root of Trust Processor), both integrating an ARM Co= rtex M4F CPU (200MHz). +and AST1060 (Platform Root of Trust Processor), both integrating an Arm Co= rtex M4F CPU (200MHz). =20 The SoC comes with SRAM, SPI, I2C, etc. =20 diff --git a/docs/system/arm/b-l475e-iot01a.rst b/docs/system/arm/b-l475e-i= ot01a.rst index 2adcc4b4c1..31a40e3b3b 100644 --- a/docs/system/arm/b-l475e-iot01a.rst +++ b/docs/system/arm/b-l475e-iot01a.rst @@ -2,7 +2,7 @@ B-L475E-IOT01A IoT Node (``b-l475e-iot01a``) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The B-L475E-IOT01A IoT Node uses the STM32L475VG SoC which is based on -ARM Cortex-M4F core. It is part of STMicroelectronics +an Arm Cortex-M4F core. It is part of STMicroelectronics :doc:`STM32 boards ` and more specifically the STM32L4 ultra-low power series. The STM32L4x5 chip runs at up to 80 MHz and integrates 128 KiB of SRAM and up to 1MiB of Flash. The B-L475E-IOT01A boa= rd diff --git a/docs/system/arm/nrf.rst b/docs/system/arm/nrf.rst index eda87bd760..e0ea6a8b7e 100644 --- a/docs/system/arm/nrf.rst +++ b/docs/system/arm/nrf.rst @@ -1,7 +1,7 @@ Nordic nRF boards (``microbit``) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D =20 -The `Nordic nRF`_ chips are a family of ARM-based System-on-Chip that +The `Nordic nRF`_ chips are a family of Arm-based System-on-Chip that are designed to be used for low-power and short-range wireless solutions. =20 .. _Nordic nRF: https://www.nordicsemi.com/Products @@ -18,7 +18,7 @@ supported by QEMU. Supported devices ----------------- =20 - * ARM Cortex-M0 (ARMv6-M) + * Arm Cortex-M0 (ARMv6-M) * Serial ports (UART) * Clock controller * Timers diff --git a/docs/system/arm/stm32.rst b/docs/system/arm/stm32.rst index 511e3eb9ac..23b03f9029 100644 --- a/docs/system/arm/stm32.rst +++ b/docs/system/arm/stm32.rst @@ -1,24 +1,24 @@ STMicroelectronics STM32 boards (``netduino2``, ``netduinoplus2``, ``olime= x-stm32-h405``, ``stm32vldiscovery``) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The `STM32`_ chips are a family of 32-bit ARM-based microcontroller by +The `STM32`_ chips are a family of 32-bit Arm-based microcontrollers by STMicroelectronics. =20 .. _STM32: https://www.st.com/en/microcontrollers-microprocessors/stm32-32= -bit-arm-cortex-mcus.html =20 -The STM32F1 series is based on ARM Cortex-M3 core. The following machines = are +The STM32F1 series is based on an Arm Cortex-M3 core. The following machin= es are based on this chip : =20 - ``stm32vldiscovery`` STM32VLDISCOVERY board with STM32F100RBT6 microcon= troller =20 -The STM32F2 series is based on ARM Cortex-M3 core. The following machines = are +The STM32F2 series is based on an Arm Cortex-M3 core. The following machin= es are based on this chip : =20 - ``netduino2`` Netduino 2 board with STM32F205RFT6 microcontroller =20 -The STM32F4 series is based on ARM Cortex-M4F core, as well as the STM32L4 +The STM32F4 series is based on an Arm Cortex-M4F core, as well as the STM3= 2L4 ultra-low-power series. The STM32F4 series is pin-to-pin compatible with S= TM32F2 series. -The following machines are based on this ARM Cortex-M4F chip : +The following machines are based on this Arm Cortex-M4F chip : =20 - ``netduinoplus2`` Netduino Plus 2 board with STM32F405RGT6 microcont= roller - ``olimex-stm32-h405`` Olimex STM32 H405 board with STM32F405RGT6 microco= ntroller @@ -29,7 +29,7 @@ There are many other STM32 series that are currently not = supported by QEMU. Supported devices ----------------- =20 - * ARM Cortex-M3, Cortex M4F + * Arm Cortex-M3, Cortex-M4F * Analog to Digital Converter (ADC) * EXTI interrupt * Serial ports (USART) diff --git a/docs/system/arm/xlnx-versal-virt.rst b/docs/system/arm/xlnx-ve= rsal-virt.rst index 640cc07f80..8d31369f71 100644 --- a/docs/system/arm/xlnx-versal-virt.rst +++ b/docs/system/arm/xlnx-versal-virt.rst @@ -27,12 +27,12 @@ Versal """""" Implemented CPU cores: =20 -- 2 ACPUs (ARM Cortex-A72) with their GICv3 and ITS -- 2 RCPUs (ARM Cortex-R5F) with their GICv2 +- 2 ACPUs (Arm Cortex-A72) with their GICv3 and ITS +- 2 RCPUs (Arm Cortex-R5F) with their GICv2 =20 Implemented devices: =20 -- 2 UARTs (ARM PL011) +- 2 UARTs (Arm PL011) - An RTC (Versal built-in) - 2 GEMs (Cadence MACB Ethernet MACs) - 8 ADMA (Xilinx zDMA) channels @@ -51,12 +51,12 @@ Versal Gen 2 """""""""""" Implemented CPU cores: =20 -- 8 ACPUs (ARM Cortex-A78AE) with their GICv3 and ITS -- 10 RCPUs (ARM Cortex-R52) with their GICv3 (one per cluster) +- 8 ACPUs (Arm Cortex-A78AE) with their GICv3 and ITS +- 10 RCPUs (Arm Cortex-R52) with their GICv3 (one per cluster) =20 Implemented devices: =20 -- 2 UARTs (ARM PL011) +- 2 UARTs (Arm PL011) - An RTC (Versal built-in) - 3 GEMs (Cadence MACB Ethernet MACs) - 8 ADMA (Xilinx zDMA) channels @@ -134,7 +134,7 @@ Direct Linux boot of PetaLinux 2019.2: -device virtio-rng-device,bus=3Dvirtio-mmio-bus.0,rng=3Drng0 \ -object rng-random,filename=3D/dev/urandom,id=3Drng0 =20 -Boot PetaLinux 2019.2 via ARM Trusted Firmware (2018.3 because the 2019.2 +Boot PetaLinux 2019.2 via Arm Trusted Firmware (2018.3 because the 2019.2 version of ATF tries to configure the CCI which we don't model) and U-boot: =20 .. code-block:: bash @@ -188,7 +188,7 @@ Run the following at the U-Boot prompt: fdt set /chosen/dom0 reg <0x00000000 0x40000000 0x0 0x03100000> booti 30000000 - 20000000 =20 -Boot Linux as Dom0 on Xen via ARM Trusted Firmware and U-Boot: +Boot Linux as Dom0 on Xen via Arm Trusted Firmware and U-Boot: =20 .. code-block:: bash =20 diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst index 304ee5d531..12436cc791 100644 --- a/docs/system/guest-loader.rst +++ b/docs/system/guest-loader.rst @@ -32,7 +32,7 @@ size. Additional information can be passed with by using = additional arguments. =20 Currently the only supported machines which use FDT data to boot are -the ARM and RiscV ``virt`` machines. +the Arm and RiscV ``virt`` machines. =20 Arguments ^^^^^^^^^ diff --git a/docs/system/replay.rst b/docs/system/replay.rst index 28e5772a2b..fd78bd1f73 100644 --- a/docs/system/replay.rst +++ b/docs/system/replay.rst @@ -23,7 +23,7 @@ Deterministic replay has the following features: the memory, state of the hardware devices, clocks, and screen of the VM. * Writes execution log into the file for later replaying for multiple tim= es on different machines. - * Supports i386, x86_64, ARM, AArch64, Risc-V, MIPS, MIPS64, S390X, Alpha, + * Supports i386, x86_64, Arm, AArch64, Risc-V, MIPS, MIPS64, S390X, Alpha, PowerPC, PowerPC64, M68000, Microblaze, OpenRISC, SPARC, and Xtensa hardware platforms. * Performs deterministic replay of all operations with keyboard and mouse --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181156; cv=none; d=zohomail.com; s=zohoarc; b=f6lEAV/oyTMKKs3OATMtXGezUvFrQkEHce3Kjnn2st4ZDadbVBJyNpYyTwhc/F+0omPQs13QISiyik9UEOiHkBah1TGWcHXVTaDUQMgLJ8Vm0cT56pPkUbUxQF8z6clCYLHj4J9ay6IYz0mIfSo0K4+h1W+zrSkYMzwJY35/E1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181156; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JToHbgugDjxEqzfYF8RbKzovJI7DlyaCfgxEoUD7oT0=; b=c2fa4SYhBOtXaW39jQJKwvvCuZd8Ku9VtDvwlq00q4tH/rVt5e5KNVZoN5opwfhv3J0A8alJzlBKsjH3220tGqYuIXZcRCC9THsAN0wqPMpD12umb1iE60/oA7dQ8KOyKeFcTJjTTpBvuCeqNbaZjpQ6vQfiuKeeKDsS8U8fcKY= 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 1769181156559658.8817521111029; Fri, 23 Jan 2026 07:12:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInV-00076t-Qq; Fri, 23 Jan 2026 10:10:14 -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 1vjInG-000711-CZ for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:50 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInE-000327-NG for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:50 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4801d7c72a5so17095175e9.0 for ; Fri, 23 Jan 2026 07:09:48 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180987; x=1769785787; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JToHbgugDjxEqzfYF8RbKzovJI7DlyaCfgxEoUD7oT0=; b=utkMeuLB/Os4AR0jr0raOFdqMEuEJNc/guPhcB4f+B4kzzJunZ7WY1IViFTbABYvqc 8f3WMkcVVz8chPcV832MZkl4JPeEovNxuZ6CTM88n7EMbyYbN6iWMafh+XFfhbKVzjl1 51896a8sUD1OdsKuZGQGBg8rcL9aDJGsz/WzhtI18h2/XC/BRKsc67nIeAk2vBLKoKZE DHr9lRyfR1Rqe+Qp8+M/BEqxbiqK2fPQFvkCfAzyzu7chfmXipr5FBTpFYko8ryj/huE 0Hg/lcWRtPne1Wgzyzk+kHIRS/QA97EzwBzwMdIVC4XodAiA48WNZWrZ4F6qms0kvJIR NDtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180987; x=1769785787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JToHbgugDjxEqzfYF8RbKzovJI7DlyaCfgxEoUD7oT0=; b=XJVbmEI90i5JlJOfKE0Eag1RngMDXwUs3IwUkvaQJXE6c9UAb4IB3NG8Gidxmcy6iR F2s/Qu8r5yq9z/Xh+0+5NOC1Gj92dXzGgB08Tz/51ceBIsBf2b70cQjGBtZJjjDiHbMr EI6wVnQd5uOsKhCpt4cLSHQAc+U6ZAaRXwOwavx0UyDsC+UCAix3TE1C6ymY9MwWfuEc 3MpEJ2cmVld6Yeuf3ggWdjhPP9DKmaDv9fSobPE7CdZE6f1jwwGj1tezCQU/9oAZ3O8T YG2CGrGDbJE1NQFfmQaV+zja2Wv9U43kBv9FzFa8YByPq1FfFH27I/Qu52Foggo8YdjW mqVQ== X-Gm-Message-State: AOJu0YwRdgyk5YGTPzdT4hbfqWjFsnrS82rBB5mfhaQy2deVKF4E0yqA ntjNaArpJge7nF0pVSqzfGeNJdfND4UBelVfvTU5S+1CGBiaYeFnrQqXuaW4iOOP3vXZwGKpxCV dI9N2UIo= X-Gm-Gg: AZuq6aKjApocstzRB9EZtqPwQ+Wr61d5PxqKIkIHt1AX23Jl51iP8ueOMO4N6+xJb+d 5OeuzeQi3yEX3dN3tuzgBNhJ+dL1tfAAWjBCUSdS4NkIcf5OHe9GjVRLZID8FnOlx0WTFJaYnF/ 0m1Y/CCP0ViMseKWw3SpcpwLbo/jqOwsRZdkhMDS0z8eXoN8SpPzmouLOnuzKuLs2JvuEJPnbgN MrC3J3G8fBP7n4RNqRxJtmRzvJs3QBUmF0+dKnUC5c26Z/sTEXaMbHv/gfqf6HFwlo1YRRSbpyS i2eZlQcNfzLc0aevNTlEXOpiLTZYHwGJgsnMZCvWKeGGAWwD6+LFcHUjpJSeApf78RN7ZYplIuV NyYkLgR9SZ0RTllznX1A4X66SSkz6GeaRhTBuWFhX1ht6VtvRnvJuufOoz4egLJvc9GT9B9hY9b FOvcRxMywMn4ajsggTCPsD7fIkgB8xAoB1MwL9SKY4wNxsPT+k3jKUbA68Yvnhn18= X-Received: by 2002:a05:600c:1f84:b0:47a:814c:eea1 with SMTP id 5b1f17b1804b1-4804c9cac70mr61882825e9.35.1769180987038; Fri, 23 Jan 2026 07:09:47 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/22] scripts/clean-includes: Allow directories on command line Date: Fri, 23 Jan 2026 15:09:23 +0000 Message-ID: <20260123150941.1877768-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181164223154100 Content-Type: text/plain; charset="utf-8" Currently clean-includes supports two ways of specifying files to check: * --all to run on everything * specific files There's no way to say "check everything in target/arm". Add support for handling directory names, by always running the arguments through git ls-files. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260116124005.925382-2-peter.maydell@linaro.org --- scripts/clean-includes | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index 25dbf16c02..07c0fd44e4 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -14,7 +14,7 @@ # the top-level directory. =20 # Usage: -# clean-includes [--git subjectprefix] [--check-dup-head] file ... +# clean-includes [--git subjectprefix] [--check-dup-head] file-or-dir ... # or # clean-includes [--git subjectprefix] [--check-dup-head] --all # @@ -28,7 +28,8 @@ # # Using --all will cause clean-includes to run on the whole source # tree (excluding certain directories which are known not to need -# handling). +# handling). This is equivalent to passing '.' as the directory to +# scan. =20 # This script requires Coccinelle to be installed. =20 @@ -86,11 +87,14 @@ if [ $# -eq 0 ]; then exit 1 fi =20 +# --all means "scan everything starting from the current directory" if [ "$1" =3D "--all" ]; then - # We assume there are no files in the tree with spaces in their name - set -- $(git ls-files '*.[ch]' | grep -E -v "$XDIRREGEX") + set -- '.' fi =20 +# We assume there are no files in the tree with spaces in their name +set -- $(git ls-files "$@" | grep '\.[ch]$' | grep -E -v "$XDIRREGEX") + # Annoyingly coccinelle won't read a scriptfile unless its # name ends '.cocci', so write it out to a tempfile with the # right kind of name. --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181068; cv=none; d=zohomail.com; s=zohoarc; b=EEsfL7MRpdjeADJC1zzy+5jeCV4C4+UFjMDyAHs7TcOG8S2/lNZR/2U5s2P9Po5lXIAd2YD963w83FFzaF48599fse159Z+BxCQOPLJ9DyS2Asi95Nz7Dwr3pyWyevGUlDYjUSYrvl5V3k51i8iPLfn1pxG7rYjRB8WXIqEva7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181068; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=EClQisP1WNR7DbiLNLpY4ZP3UfFIJ6LXMnztCRYK/to=; b=FBB7YvlXzQZ8aut9Mv2WL6I8JgyyN9BPX8hbwrGv52+zE+wRYazkjlWJyNftIzSKn/gZrB3IR7/HSA7sNJsc9k8KS+UKviObbn/U0upaq5Mui4hbuFy0DU0ue8z/MOWXVNdOY3JnKOLHogM6XUe+/xjO+Mp9WKva/Z3b6eJDy8g= 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 1769181068020966.74497896874; Fri, 23 Jan 2026 07:11:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInm-0007La-4I; Fri, 23 Jan 2026 10:10:23 -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 1vjInH-00072f-LC for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:52 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInF-00033C-GJ for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:51 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4801d24d91bso25551025e9.2 for ; Fri, 23 Jan 2026 07:09:49 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180988; x=1769785788; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EClQisP1WNR7DbiLNLpY4ZP3UfFIJ6LXMnztCRYK/to=; b=oJrGdoOTxCE46auDHQs7pkVpy3rK6XcNkyZ7DMcE+Bw5uJbiM3Brv/VW2QWepDQNkj KbE22I++J5ZBjyXGv1E7g0ZvETjQgxGKTwa8knQwEftu1PUyDrE5CwUp10Gc5TwY7DU/ yxD8r3V9biWfsybAgOofpjxZKKl3iWiqAZSXqCunLrpM93bukorkFVcUYn8mPR7tnl// 7cIAbNjx2KLk4b4HFIKgyjtuOOVc4xWAx2nwKKthWZnSEQ3ERGt4LhIoPXpwQ4UyaXL+ +4iXe3Pi8mmHFGlnAVi6RIgb+Wj360cKY/wV4LJOM0jftxDmXMHK35PUIt2z9KQtc+Sx GIyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180988; x=1769785788; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=EClQisP1WNR7DbiLNLpY4ZP3UfFIJ6LXMnztCRYK/to=; b=iwrUDWWEeIkXJEQTjKioORBuceuSEZ92wPw8C/Y3npMaIYFKrcrDn/WluahVf4Z8E1 DwZrvo+thcrQZiiLQ2uuxTTMozCEtXjV7eir5cNxsDMcnt1Tt92CtjnJz5CFpq2HJqgq F8gh9AFbBc6iQO33jGulWVCH+No405vBkX9jcAAcd9ETI/2QWtxRqNmo8+pcEMPFN397 ttGmI35N62qO2bs2blFWGsJFaYMRdpI5IO45VBFbQDW4weS8aPNdhM9LJw1eDPGpNuRi 36GQbSzQr10spC2CzbIBjuwcB9EsHURzy2Oj2L8e5NEVZmZcOHzw344QhfSMyj6uXl/X HsUQ== X-Gm-Message-State: AOJu0YwCDfoOJ+hinVFCAsMzCuG2G2zZ3lwE7FGekDAyCg8XXp38v5GZ OAjnBpFlfYDDXuzb3eC3gQQTOJBdAcquvrkjwTllNd7DXIG759cHjJxkMwm4tVpyb1A05fNt+0+ tHqceSO4= X-Gm-Gg: AZuq6aI10IpjDujbG9qeYX907oM9IFEZwAmxeexdO/uHl7NdBYpryYTsPS7B9wT3Tad /dyGvym8scCP3PaPYE7nSH+CnKovEmO08sSRZOWiaYiq33sQbMitn1RyvvzcWUfUUyjxEedvJvg GrzUhkTs55bH/VCQ1wbhvEXOdcAVCFwsGx1oA1LlAth9Xseu9EjsHx2krRaqRg1wcGLXwqey/YQ LpRg7j2wDIVtj6tg21a46MNUYBL3QnX0tysncKljvcBmdsy2V0YXo83RPmlNVY3CYBi8pc+Ciru mOCO+1tOW15y+BWAXDYsuZE89Zc+OEub4EuYCydzZ5Pfxr5RqUMK9zO9Cm2A19AHzQC+4zmtQ0S bS1XZmjl/Pxb2EObafAy7qQFgPcJuzWM1MV7FWLQmkcWXE4ZcyfEEOHm87OyDim+rRukq5dkGvo PTKSzjhn+ATUseaSrH9PAWYXSZWHDGfKUATC+cjEkHnIu63+7UDel0ZJ2yrsQGOOY= X-Received: by 2002:a05:600c:4ed0:b0:475:e09c:960e with SMTP id 5b1f17b1804b1-4804c9c9c02mr50627655e9.32.1769180987955; Fri, 23 Jan 2026 07:09:47 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/22] scripts/clean-includes: Remove outdated comment Date: Fri, 23 Jan 2026 15:09:24 +0000 Message-ID: <20260123150941.1877768-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181070784154100 Content-Type: text/plain; charset="utf-8" Remove an old comment suggesting a manual shell line to use to find files to run the script on. The script's exclude-list and its support for directory names make this irrelevant. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260116124005.925382-3-peter.maydell@linaro.org --- scripts/clean-includes | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index 07c0fd44e4..568033ee9c 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -39,15 +39,6 @@ # removed. # Other files (including C++ and ObjectiveC) can't be handled by this scri= pt. =20 -# The following one-liner may be handy for finding files to run this on. -# However some caution is required regarding files that might be part -# of the guest agent or standalone tests. - -# for i in $(git ls-tree --name-only HEAD) ; do test -f $i && \ -# grep -E '^# *include' $i | head -1 | grep 'osdep.h' ; test $? !=3D 0 &= & \ -# echo $i ; done - - GIT=3Dno DUPHEAD=3Dno =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181102; cv=none; d=zohomail.com; s=zohoarc; b=Q33tm0nNxMAO1G2sQtKrhCk7DnpFRCCtnJpsm19cUHw6soN3CYJiLoFOPSdT6bF/j24KNM22t10nTBHyQG5cdPFUc2bVO0axqP0anI4V50UBLMk+7pTtD70nHthyfYvaGGYIB5F6ZNnd2/MNviZ+MIymvEjfbrnO4QNoONYcesU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181102; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=ftyJkzXc1aEPf2Cr4rOQCy1QIrr3zSHt535wBH/zjVs=; b=j2JQueXGml66b5ICiohXG2senGWhrNsvyn30z6LoxFt5u+h1SmQAIf3KlRhxU2dS24hgpm2tGkejrVFmY8gdshlOT+ZJ6Xstrk5UCwa28UTW8NF54H8UM2dnZOxabcTqsJShOxmC81TKNrs7GNZQfeR+cBFD9Mp8vWehUXjbaZI= 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 1769181102746169.01614167994796; Fri, 23 Jan 2026 07:11:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIoM-0007tR-Cs; Fri, 23 Jan 2026 10:10:59 -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 1vjInI-00072j-2s for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:53 -0500 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 1vjInG-00033R-AU for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:51 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-47d63594f7eso19861425e9.0 for ; Fri, 23 Jan 2026 07:09:49 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180989; x=1769785789; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ftyJkzXc1aEPf2Cr4rOQCy1QIrr3zSHt535wBH/zjVs=; b=G8SQjkBt/bOVqPzlh3qoLmihxGNUiKVgfuzdojRiWqE8EVVNtjFR3z6lPccsQzNpCC C//7ib1nP8vF09KuJZNjby3Ls3q4qsVMtNEPCcw8EZLwm9I84SJA2pUk+pSgoYLjO2S2 QWIC4t5XXItFMkaECo4elT+hGP3zPC+3Q5B4805gPy5BUdPNKWv7l9DVBMfczPlyGz4i kGfZ1lFbIb+b0GbxWA2LTRzXARufai0qfHhzInjd3d8wfEUCq7ZtC/A/hLQ2J9BX9VkZ qu67vdYvnrIjQubCswFMWyEncXYE6jpyyAT6nHY3G5O2SRw0BOJHQKUadhLwbWiEI17d wkLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180989; x=1769785789; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ftyJkzXc1aEPf2Cr4rOQCy1QIrr3zSHt535wBH/zjVs=; b=LU5cWHiMnSS0qaVX0DWSgfq9KD00aT57/b54/n1Xs0DtwheEIoiA8pfoG8XevKfIms o21p5XaEp3W19Eie4t6FX/nVRqdvuxRzTwyjy1JOuHVUTOY6c7myRZ+dDHGclA65qkBE B9d1s7Y7n4xJ5Q4Jm9YiHEModdBeKibg24/YaF5TJtEqU2+FonWbs2GcMK5LHZlnx5ZK i9Btwx9hEVO6W2EPyheZLTXZG/KVBHWe1lWcVC0ZtbKZDaK17GkwsZKxtWkj/DT8JfAz WmAGm7tW7NGEL6i0oB6ZSD4qC7ByVELA5VvPQCtBJHBBSqFEU95kQwyC9OvcOte12NQS bJvA== X-Gm-Message-State: AOJu0YzMvCxMWGtLVPkfWdNQVSj6IB8xZ8C8SculjIEGx+rCHMjH5uST iLTJRCBPmJkSsOFGofgZzvWPlREHyqCznlAAda/wcThW8+liO6UDDcC2AgEJIMm3Kq7NctvBRFi WL5cyHVA= X-Gm-Gg: AZuq6aIvJHyY1CK/RQd0ya6K3ICPM3/9vYtERKv62TgpEmIwHtVOx0X1exjOiL+WrMH mb+koRhbG+mSw5GauYrc/XznQyD2ZFxhTf81CZ4OuLqrlWr4xDHu5Ay94vmon8zRN6KUl6M193F Anh0AEN1eMusW0veCznvwDprjRSP7B1xi3ExLoqVrsUExXQg1mg4ISigdQm7789mtJ5aGfhHE4S 8n6J4vuJx0DCkI8/cuga4y74u5XGj+yN5FREoozJe4qqWEm9AE0IHIlYWU5kOH2DC9gXABhkgoK Xtc/G+RzcaHdx7A6ZYshV+bPXHUy8OSu6VbcF3ziKwmJdvKcXKB1WemO/FtJuSgPmpFwqQC0vKx DRs9xvZDphST2JwljwOgFCBgZ+lJK0bgZjq9iuC0qdPNUIwdkclj1u00G2diPTPint+E5Ddy9Qs n4VtKOSVqRlpFGA/goj0LltFe+rfJwkyLEkqlZcbhHIixYvrtcb39F X-Received: by 2002:a05:600c:1c05:b0:477:9cdb:e337 with SMTP id 5b1f17b1804b1-4804c944fc3mr60269745e9.7.1769180988787; Fri, 23 Jan 2026 07:09:48 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/22] scripts/clean-includes: Make ignore-regexes one per line Date: Fri, 23 Jan 2026 15:09:25 +0000 Message-ID: <20260123150941.1877768-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32f; envelope-from=peter.maydell@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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181105482154100 Content-Type: text/plain; charset="utf-8" Currently we have a single extended regular expression defining files that clean-includes should ignore. This is now very long and awkward to read and edit. Switch to having a list of newline-separated EREs that we write to a file for grep's -f option, so we can express them more legibly in the shell script. We allow for comments in the regex list, which lets us document why we have put the exclusions in. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260116124005.925382-4-peter.maydell@linaro.org --- scripts/clean-includes | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index 568033ee9c..5ab3b07196 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -42,8 +42,6 @@ GIT=3Dno DUPHEAD=3Dno =20 -# Extended regular expression defining files to ignore when using --all -XDIRREGEX=3D'^(tests/tcg|tests/multiboot|tests/fp|tests/plugin|tests/uefi-= test-tools|pc-bios|subprojects|contrib/plugins|tools/ebpf|ebpf/rss.bpf.skel= eton.h|linux-user/(mips64|x86_64)/(cpu_loop|signal).c)' =20 while true do @@ -83,15 +81,33 @@ if [ "$1" =3D "--all" ]; then set -- '.' fi =20 -# We assume there are no files in the tree with spaces in their name -set -- $(git ls-files "$@" | grep '\.[ch]$' | grep -E -v "$XDIRREGEX") - # Annoyingly coccinelle won't read a scriptfile unless its # name ends '.cocci', so write it out to a tempfile with the # right kind of name. COCCIFILE=3D"$(mktemp --suffix=3D.cocci)" +REGEXFILE=3D"$(mktemp --suffix=3D.regex)" + +trap 'rm -f -- "$COCCIFILE" "$REGEXFILE"' INT TERM HUP EXIT + +# List of extended regular expressions defining files to ignore +# Comments starting with '#' are permitted +grep -v '^#' >"$REGEXFILE" <"$COCCIFILE" < (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 176918121595446.984901956889075; Fri, 23 Jan 2026 07:13:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInp-0007SX-34; Fri, 23 Jan 2026 10:10:25 -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 1vjInJ-00072s-5L for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:53 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInH-00033k-I4 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:52 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-42fb2314eb0so2072697f8f.2 for ; Fri, 23 Jan 2026 07:09:51 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180990; x=1769785790; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OscJg3dXrkhUjYsDycoGawVwLO3SVAen9cLVTEr2T6g=; b=LXnr5B2xApc6xxEpaNGSQp9DR5K5juGp/6SceYOU9A3jOWVNB750TuqN18Ic0yvUtG H/0ZCYRLVn7YwlDaEbdo/DfmQDfE0hLdN/o3SPK8SHW2xGUaPLYn/imTlYb0FGhZcDFg goHyvn/wpmxbnwyRgk+36XPLLBWS97pmXxV07VCoiC0LEEVXkTKjzKDIoiPR08+iyBvN Vt4TnGFVHOxp5VUdSOiX06E2KTgypNtSxsFN3PrLZ8/JtFmjWqHtaM2I5RnY4ccnWUuk NIFt32bb3f9vJemYdbfLFrD5FDtLa7QBvh0PiB8TNGZf2hbfeuj0xwmvG3tGihuWye/d rsig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180990; x=1769785790; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=OscJg3dXrkhUjYsDycoGawVwLO3SVAen9cLVTEr2T6g=; b=fahMBPURP3zSUGla02qZnvqRXa2q4btTycBOYXalHpiu9r8HPnrm6xl2kqYSTjQXFY f8hroBPr5W/5fDX3wPhLWmrcglyNsYDSCNM59UQqSKUsIFzOEKnnmvIKh6BMea+6ar33 pHDf9IPegdjuYftA9F6IOmnz5MGCqcFpA6QkLdxcQ+EblRpClMQ0JmgaTEdH+QhjFlgv GD8yAu/mcITeZDVsI7sJvjOO/aACbIxu8DZUYs8M0r22nvjfY5C+94eejG9FpIGLvSCh +gu96lXjv10ARepEgvpOuco1lhpHROEmiDJkqP8eETVn8l2ecyqcL6oWNzGcD9yyBzX3 Jb1Q== X-Gm-Message-State: AOJu0YzT6KXdkS6rJuAtsqVFZubdt6h4VOA5AJaofSudXOUNIpJbjDAq QxqbrXXXxW0a0ID2lC1gi0S7tlal/K8kS9tvRp8DWKx8AiKCqbKfNHCBLB2VfviEVVK5IpidE+W BkBp/3qs= X-Gm-Gg: AZuq6aJb0iauwV4iKpsVGqQsn2f2m14reXXzucII/VZOStcq4qNh2PokJ4oinZwqOEe emelnIOltgbw+5xjEvHZV0TY/VEFseT7KxVyMxhEmcOSKk2b++C5FHzhSz0iluT82Ck9Oml7wwi 1KAResaXW9y5OJ6U+JdvnCH8Yyh37B19qeWX6ERd2Ds1cu6erodvZh9tlx2+a6FSviGRDt3mVj0 2moM2bIaUvrrJ9Fk/6z3OyIPdLC3w6cp+rcT0cwQAkR4/kOA0SsN7ceUNBnocS2A4De8Ul8AqLo gSxjHDKHV68IfjqMr3JZPO6WW5A+N2mQxKZNCvTPpNqqKVvlyaslz4XQ5L3/+4Q/DraTMbsQpp0 NBGCOWXHVhuGBO43LEUuPxpYsqyaY9HEfMvI1UYBKaomjp0MjnVAwB9iPorrfSWRNe35eFN5fCp m2qy+WJQ7HVxTIqv1cjDbF+LosGf8D1J5qbsjf+518MHb1/ua1Wxxf X-Received: by 2002:a5d:5f54:0:b0:430:fcda:452d with SMTP id ffacd0b85a97d-435b15946cfmr5374042f8f.22.1769180989844; Fri, 23 Jan 2026 07:09:49 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/22] scripts/clean-includes: Do all our exclusions with REGEXFILE Date: Fri, 23 Jan 2026 15:09:26 +0000 Message-ID: <20260123150941.1877768-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181217110154100 Content-Type: text/plain; charset="utf-8" We currently have two mechanisms for excluding files: * the REGEXFILE which excludes by regex * special cases in the "loop over each file" which make us skip the file Roll all the "skip this" cases into REGEXFILE, so we use a single mechanism for identifying which files to exclude. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260116124005.925382-5-peter.maydell@linaro.org --- scripts/clean-includes | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index 5ab3b07196..a45421d2ff 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -104,6 +104,15 @@ grep -v '^#' >"$REGEXFILE" < (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 1769181116402532.8881163204344; Fri, 23 Jan 2026 07:11:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIoN-0007wv-Rw; Fri, 23 Jan 2026 10:11:00 -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 1vjInJ-000732-Ov for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:53 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInI-000347-7a for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:53 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-42fbc305914so2028193f8f.0 for ; Fri, 23 Jan 2026 07:09:51 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180991; x=1769785791; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Gs7ODs1UnR7WI5J2KyYg/zU1R/LCdmQqHDFDVqt5Yp0=; b=EFAhuKBY0WYsd9OOts51jcqf4NPifzzC15I4vwPrRX9p6N+8dU/6HJQM5Pzpedsucf FdkYjo8Omyg11InSC0eZDMv7D+2OrjH0qz9y72LxB62ipEnkbOaAPGx6VBu+Okf962UI fMqik4YVcpOUrru3iVbSFINvHsyNPnvTRKoN1HYZLYijfv3gOzGxP9/WE0fksJCt5FSn vSyb9JYWhLFUZgtwZrM+dtxCsRCiq6WfRusg1N0BLfvW6QLWa53hb1tB+Dmmhfs6Se7k C04kMxqq+ASoJxbhqTGXKpjzj2Q65qEWGFuq9piITfJlX9aASgiTWdB44ezwR+w95YVA XL9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180991; x=1769785791; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Gs7ODs1UnR7WI5J2KyYg/zU1R/LCdmQqHDFDVqt5Yp0=; b=JAs4e2NZxHnY7vZ9aHI/6Kz/G83olUMOz88Qm0xroWKi30IeN10RMa508Q3fnBcg7Q Z5hBaYZ4y14SpYAUjniyYQ6RmJJYkUvTN8FQkR25tQwQg7ISUXviJc495GU3Hlgb8mHC DxfjdUELpec9Nhzc7lHZbHg+kHXKWWjryGx0WgHBu6PCEAqbMAp/f0M1pb52TZvNQTF5 XYvUPAaPksr1uC0lcLSG4UqlSiA/idmengR8QuN1RUEt6YlExkQFO5J+ufPljuMY6nUn NqDj8R9SCg/8oNqohcgGU16dbp7PKh663U9lm4Jp++zzDZV+PGKF6VEzuTxqQC5CUArJ 08KA== X-Gm-Message-State: AOJu0Yx8Dx690lnUujvhbsQJmqcNlw13JdNnHG+oLYL0s0Wd24UPf897 0X95Sxg41iLUHmocsXsyhUcl35KW+JBAjzj8bJWPzrISRJfXJWJA096lIt+HC/S2tAvhJYBLGPj lfqfypOs= X-Gm-Gg: AZuq6aItjVhvB9eCBdowPZjGomOdEgbh0MV4nD/oVXx1QUh5iju8eHft9KjPMwV9hj+ UO67+ub5gJRwNjgqYzImD0xissH745tQMze6s6XJhpuujobJjxSl3bkHpv6GRMOWIkezi1PR5Fh +u8vrF0AJyNhdSoAHCVliMRWr9Hl0yFsJOVHu6uI9wWaKyOkI6s5fwVJok/PgV9XfGuLayF+vtw MQMsJ8if9ap74wT/6PCsVQT263cR9vlJIp7sGJQHKoUoAp1Wr4Wq4MTVeMRTv2ax0MdNxxvJ9u3 fD2Hw3wx8OBKKFEjJG9zJ2zkXUUylUvuxxtg3M0+VHM//vh7nnl/YI9NwDWtbunXokJnFFhwK34 ay3nnG6ojF83MJs0p5TPFtzeq36pOhCO3IDpiwRdPfkJHs+fp0ZMBB+kBOI5t7g0skvJWDGmHlA Se7tXdE8lSRzB5Z27GeMRe7nbvsjEmxk2X9m0caHu5GWqgJBPBDvjH X-Received: by 2002:a05:6000:2404:b0:435:9882:234e with SMTP id ffacd0b85a97d-435b161ffa3mr4872275f8f.59.1769180990654; Fri, 23 Jan 2026 07:09:50 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/22] scripts/clean-includes: Give the args in git commit messages Date: Fri, 23 Jan 2026 15:09:27 +0000 Message-ID: <20260123150941.1877768-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181118599158500 Content-Type: text/plain; charset="utf-8" If clean-includes is creating a git commit for its changes, currently it says only "created with scripts/clean-includes". Add the command line arguments the user passed us, as useful extra information. Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster Message-id: 20260116124005.925382-6-peter.maydell@linaro.org --- scripts/clean-includes | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index a45421d2ff..064e532037 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -42,6 +42,26 @@ GIT=3Dno DUPHEAD=3Dno =20 +# Save the original arguments in case we want to put them in +# a git commit message, quoted for the shell so that we handle +# args with spaces/metacharacters correctly. +# The quote_sh() function is the same one we use in configure. + +quote_sh() { + printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&'," +} + +quote_args() { + while [ $# -gt 0 ]; do + printf "%s" "$(quote_sh "$1")" + shift + if [ $# -gt 0 ]; then + printf " " + fi + done +} + +QUOTEDARGS=3D"$(quote_args "$@")" =20 while true do @@ -198,7 +218,8 @@ if [ "$GIT" =3D "yes" ]; then git commit --signoff -F - < (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 17691812742131002.6923654821419; Fri, 23 Jan 2026 07:14:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIoP-00080S-IQ; Fri, 23 Jan 2026 10:11:02 -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 1vjInK-00074h-Ss for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:55 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInJ-00034U-8n for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:54 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-435a517be33so1441102f8f.0 for ; Fri, 23 Jan 2026 07:09:52 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180992; x=1769785792; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/RF6pl6Z24KJwErQfhxFPKK9HJeqT7Vndl2qEdlgPW0=; b=CmiNpXMker+Yw9RGURhvQKSgkRp5sRzEEUMlnvrcKn0vfAPqBl5gBRT/mZcDrTl6Qc bTEY6XtxiXJzY6cD7zSCaxqimXkuZ0pc1G0WvzjJESAuIRZ8aYtLpq1bj8VGQbjJfL7o bXhCXBs6+0TP8k+XOD6GJ78zUcS3OmFGV+T0FJRH+cIKp6bYz12zTkE+vBxQKx52KHQC WDEdcTg1WjdJfvFOIF4otoEQnFHynhVFezOlforlXDwlZogN1DGswNY67GwGloP+1JQ3 PncWoA2B60wKIgwY/7y2ek5OSx4VJX1YaYr0dyLBSDCOWCxegpcSTXWPwChqgF9de7n3 srLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180992; x=1769785792; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/RF6pl6Z24KJwErQfhxFPKK9HJeqT7Vndl2qEdlgPW0=; b=F5fPDkn2iq7cJPiDdRFsNpU82djb08VA+V6kUz6RexV4taXZA4vkSTyaCd1A6eWMx4 tSY6BI43CKhvk6qpy6fKhUO/S3Q/JsG/CpIzQ9LCuZpXo7TFaafAYFDM4Pd+YpMPTM9e bPT2Ry8m/q0u40VWmruw8dhzW0If2NkVa1RQTi3noIPAVWRZjS41jZnfwLXqkednn9oi or8USTTp/OXq0WcCh/hEHTvJlvSGH2Vfrw8WDYRszuQA47e66ncLL7HmckVhXO3dzSL8 +gxsNHeRw4Lq7xunKOh8229alggIBa5Gyzv3aknZEjRa8Bpyf2yknGUWeY2OJnkuyN9w je1A== X-Gm-Message-State: AOJu0YyYG5amlO8jBjIAqgd1ONsIhCGgB7xHaaL/EHosrwqKRpVPuj47 F8b1NX+OFBr3PS/UKWN4P8oSwB2KguZaMQWCNp7CfwhAIwG1KP6oTbOvfOJzbXpkBUb//ojw7hV aoWrKvGU= X-Gm-Gg: AZuq6aKU/QNJugJYmMDrd8NCV7wVvYP9pgtXs6xxWwxKopRk6QumwBRilD2f6GGiiYs 9ft9ZS1BorOHvDujZ6/C5kb8jnKTjoSqY1xgJR3dAMyx+Q6IzKRnRwlry0MQGYoDTbyEZHDNeUb BRwnzhoka97oVq8v8ImgSJDg1Y8TRLntNEzwqdr9BhkirEbY+tuUsqLQulJlInveZCDVZJzl8mb GbWGjqMbt3wEaTLooeDOkhVztW2Yxiol6qqo+xI4XdiO8/qlyST/RZDCr/1DJnS+P2TShMXrAF8 0HCQl2p/6bDNFAEQHKPXlD1Jju3c5HDO3NqNZjv48mOl8PSNmdr7r6frvsh0G7cIQK3QY7eO0kL YA5oVCqhCbJHevnqeWNFw9wzk/WclxTXQYKo92lsJLsRAZM9Uof/kXoQHCkiz4ESIYcdrZnxhlj OcJBEiuJmalvhzaOVpCmpi+BIN2l2Y40xnn9lzDlkHVp8ANMG10lWg X-Received: by 2002:a05:6000:4210:b0:431:104:6dc2 with SMTP id ffacd0b85a97d-435b158d740mr4706845f8f.8.1769180991597; Fri, 23 Jan 2026 07:09:51 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/22] scripts/clean-includes: Update exclude list Date: Fri, 23 Jan 2026 15:09:28 +0000 Message-ID: <20260123150941.1877768-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181275375158500 Content-Type: text/plain; charset="utf-8" Remove from the exclude list: * tests/plugin, which is a non-existent directory. This was probably intended to exclude tests/tcg/plugins/, which is caught by the tests/tcg exclude pattern anyway Add to the exclude list: * rust/ -- the headers in here are purely for input to bindgen * target/hexagon has some standalone tools used at build time * linux-user/gen-vsdo.c -- another standalone tool * linux-user/mips64/elfload.c just includes mips/elfload.c * scripts/xen-detect.c is feature-detection code used by meson.build * tests/tracetool/simple.c is autogenerated * tests/unit/ has some "C file just includes another one" files * include/system/os-wasm.h is like os-posix.h and os-win32.h and shouldn't be adjusted Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260116124005.925382-7-peter.maydell@linaro.org --- scripts/clean-includes | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/clean-includes b/scripts/clean-includes index 064e532037..874dfd0974 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -113,10 +113,12 @@ trap 'rm -f -- "$COCCIFILE" "$REGEXFILE"' INT TERM HU= P EXIT # Comments starting with '#' are permitted grep -v '^#' >"$REGEXFILE" <"$REGEXFILE" < (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 1769181261652682.2086704151815; Fri, 23 Jan 2026 07:14:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjInp-0007SL-4W; Fri, 23 Jan 2026 10:10:25 -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 1vjInL-00075q-Lv for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:56 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInK-00034o-2F for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:55 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-432d28870ddso1272918f8f.3 for ; Fri, 23 Jan 2026 07:09:53 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180993; x=1769785793; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oDxdvyymPUYfJ1YVYQgwZ0tgWpDlX8YBdNsrFKEuuxM=; b=cQSYnY54a2WwgFHQWqVRyzFbF0QaEoZ9/FxzMl9JL/efBl7GGSqjOkX5KuXjzdBVfo lo7bYvR4lM/a4Rfw0R82YEA3jZ+qgcKh0pGZA0QC+zdBi+LCI8qfyM8z3dS4nuH12BQN 3h457K5/ykzFgj+ELxjghpgYdjHSS9AqyyM9JOova2gbEnutbF5t+4XOEmSls5Z0VViu erevzOh/Og5JJh9FYSFS3wnXgL8wzVywloVRhJ02LF/me47PzQkUNb61LV9HfDZ7+aC2 dzHEPbIC3q0mq3wRak+JTHjdKKCzBzPbTFyuoLa74hEC9v3SjCEWj1P1TC9heb2Kqs/4 bXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180993; x=1769785793; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oDxdvyymPUYfJ1YVYQgwZ0tgWpDlX8YBdNsrFKEuuxM=; b=SQPNEtrzZlSArWEQJG3GRBSfo6I/bOvkq6JQjIs3Oh3zO7ee161I6eN3fz69m0+xEc 0l6/yw9BTrC8YRrXA8CFmMdRXeWAzbjFvsOrO4QR4AN0gSToKFTw1vJ7uWCuI/1AvG0Q 2uJUg0wZxA6/xEfkvUpevdG3P91H/12z9wPCntyKePKHG2PEJZTgEA3kqby0qokmQoQB zF/dy3wLiiOMJlHZ6Z+XzVhw2xV7RUFPg7KAplEJxVbjw+2DKPTRWDhUjR9+Mu5NzpTh ANsCVp39m5sq9M6gECpiHSYdgEefhKO6+wSM94QC5YXpkMLwBN4qFy6jJA6Skc50739P tzwQ== X-Gm-Message-State: AOJu0YyphVSN4ZKG6ze9awQxiS3NNJ3G/FXkZMoVaiJU2TSzGnrC8C9p 2usRdAaobiFHjW+YUtSZ0ExCV/WmchXtQQ9a626CZ2AX8p+3VxCnk4+7hVa0b1slX7ouJdvzwo5 EXF6upYU= X-Gm-Gg: AZuq6aLuJIBlvzzLmkGo8L6c6j+EjrRFaEdNUL0Vt3b4pf+PIve64aZakenyDJu/h8O ii9l8yHjOJk0e4lDHRE7GnONVUjzF9XEliuN/FztXESeTxVAWf3A8O/SByodtwh3jKpcPpDM4NI Ho+HyhVGjpBVyobWp1oR3XE2l1DEc9Lo+MVrq9vOsgJmj7J6oziCWvzI/9pQyys+feqPJ47/xlg J/tmIZYJg6QHjNg3rWihahfKEZDnzaDf0CMMbXrgsLBWMo/UVxe5JUCgDWidXP5upapZGrKSAsD hcyi63GVBUd0zl15nQE7WbtwfTOcMAQwtVgBVE5yajn7h55wvodzw3JSd45KtKTutFmTBE+bPTk gbz85gCMMJhuk65XhWQNqP3CNmp7M3H3FSL84ZSpPVPA7Dqwh2UP2+PdqdrZeDREyxonCxvGia8 UtLyVhbiV2p+pj0GQ3ieH/n7LUnqXxPixsmP+k0Q+tXk2j276+Cff5 X-Received: by 2002:a05:6000:200f:b0:435:b6ab:6c1a with SMTP id ffacd0b85a97d-435b966a98fmr2988462f8f.49.1769180992424; Fri, 23 Jan 2026 07:09:52 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/22] mshv: Clean up includes Date: Fri, 23 Jan 2026 15:09:29 +0000 Message-ID: <20260123150941.1877768-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181263323158500 This commit was created with scripts/clean-includes: ./scripts/clean-includes '--git' 'mshv' 'accel/mshv' 'target/i386/mshv' 'i= nclude/system/mshv.h' All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260116125830.926296-2-peter.maydell@linaro.org --- accel/mshv/irq.c | 3 +-- accel/mshv/mshv-all.c | 1 - include/system/mshv.h | 1 - target/i386/mshv/mshv-cpu.c | 1 - target/i386/mshv/x86.c | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/accel/mshv/irq.c b/accel/mshv/irq.c index adf8f337d9..3c238c33c3 100644 --- a/accel/mshv/irq.c +++ b/accel/mshv/irq.c @@ -10,8 +10,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 -#include "linux/mshv.h" #include "qemu/osdep.h" +#include "linux/mshv.h" #include "qemu/error-report.h" #include "hw/hyperv/hvhdk_mini.h" #include "hw/hyperv/hvgdk_mini.h" @@ -20,7 +20,6 @@ #include "system/mshv.h" #include "system/mshv_int.h" #include "trace.h" -#include #include =20 #define MSHV_IRQFD_RESAMPLE_FLAG (1 << MSHV_IRQFD_BIT_RESAMPLE) diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c index 4675cb886f..bed0fa298e 100644 --- a/accel/mshv/mshv-all.c +++ b/accel/mshv/mshv-all.c @@ -41,7 +41,6 @@ #include "system/reset.h" #include "trace.h" #include -#include #include =20 #define TYPE_MSHV_ACCEL ACCEL_CLASS_NAME("mshv") diff --git a/include/system/mshv.h b/include/system/mshv.h index 8b1fc20c80..75286baf16 100644 --- a/include/system/mshv.h +++ b/include/system/mshv.h @@ -14,7 +14,6 @@ #ifndef QEMU_MSHV_H #define QEMU_MSHV_H =20 -#include "qemu/osdep.h" #include "qemu/accel.h" #include "hw/hyperv/hyperv-proto.h" #include "hw/hyperv/hvhdk.h" diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c index 1c3db02188..586383b882 100644 --- a/target/i386/mshv/mshv-cpu.c +++ b/target/i386/mshv/mshv-cpu.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/memalign.h" -#include "qemu/typedefs.h" =20 #include "system/mshv.h" #include "system/mshv_int.h" diff --git a/target/i386/mshv/x86.c b/target/i386/mshv/x86.c index d574b3bc52..0700cc05ef 100644 --- a/target/i386/mshv/x86.c +++ b/target/i386/mshv/x86.c @@ -13,7 +13,6 @@ #include "cpu.h" #include "emulate/x86_decode.h" #include "emulate/x86_emu.h" -#include "qemu/typedefs.h" #include "qemu/error-report.h" #include "system/mshv.h" =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181403; cv=none; d=zohomail.com; s=zohoarc; b=XUofFUpnoBKFnX68oBHM1xCuzgCN+Fx93tGzBcro6HzsTfn2NUqj05gEbyytx5DVjerX49bLsF1IkZV5SDPdCEJaxKI4gzK8I3dmehHbGsTS6PH57Wka2NHAeFZprdIzhD6WbEdh4z7WFp1/fm0S02wLqj5wpT6txU9olU2eWyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181403; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=TEHOQ0P1nVV/r/Ov+TtdJ+mMxJLPwQFjgLDhjatGonI=; b=EYgpsu2/cwSgoz7zJlCnGyfcEuCj2pRuojx8gzmjHW6ubgPxKsRpn3X0urr7wFRaYEecgNPD6w29Y2IiymBZ/F7O/iBS6Vvf7wlXyojOy8h6NzXPXZMa8xRvA12HvWcq+O16UrBiCUl0JX0QkuShG0r3kQX/k+oDohVHHDgx4Kc= 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 1769181403273771.7438919186716; Fri, 23 Jan 2026 07:16:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIop-0000Zw-79; Fri, 23 Jan 2026 10:11:27 -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 1vjInP-00077K-Q8 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:05 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInM-00035a-JB for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:59 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-47d59da3d81so21750955e9.0 for ; Fri, 23 Jan 2026 07:09:56 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180995; x=1769785795; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TEHOQ0P1nVV/r/Ov+TtdJ+mMxJLPwQFjgLDhjatGonI=; b=beSe4JCZxHy6QLjowL3TZd4KHvWECocCfH2CTVaQCo1TyQWN6JGzto/GhcT2ukRSaW 92hkJa1afN6rdpBHPUPUBFnnV83kIc2U3A7p/ll7D9JFRLXuh/xfNWZP1z5UXDo0wVUh cKP3KJSimg8ubYLrqeBQFJ4+GMaD26ISJKmACNfTPOl+Qwmz3KGRVjeqEHximvmRaFNV yNhql6nIZ00338k9PJqWEBHieBnkIMmDt4gTLB48Rwm9p/HOBLHXProk2fiZdTKxh1OE QO0fjLwxq8XSBTv8AhPujEIDPkxRxCrY1I4usi5ILBXalzCZdZwbV1TQ2gRUFexQ9z+f dUlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180995; x=1769785795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=TEHOQ0P1nVV/r/Ov+TtdJ+mMxJLPwQFjgLDhjatGonI=; b=RBp/AwcWidKNdThxh8d/Vk8qSlY18Dx6BuqMu5B5pbWd382Gpm5Ocjmw5PolWm0SFx EWq4xJvBLc3q4Wm9A9GwKPsz7MY2WcjFbgDugdS9quIoCkPAvS6SP0YK61PHgPnvipoM h/bbSwY+HIlT8SWCfswpD/aK1EsQvBkm9JakmQQ2c/gl2/60yC1si7lA4vtTZFCDydN1 7MtkmmrKkQJDwG8rCr1SVnK5INSExAvyYz3FYSwDKqnNpSAKY+TRChet3Y6+l26fXBwv K5mOI4yoLnBHNGLUOMvcBslrGkgpL/cgYXycoh9AmHNKDXpEjymHMhjM0bvhzJUcuVUW NwrQ== X-Gm-Message-State: AOJu0YzAFNRe5CsABB0rzNgvA+2JNqnqvMOhqrbZ5Wbnxtl8T+vNiOn1 WkSIvtOGPnGDqq6BqB0Dwa2OrWSJR/Jwj8B2PZXhoqnmDhYo6bCOdiGdizrgA6cOZLhnLXzpBoK T5zFowCI= X-Gm-Gg: AZuq6aLm5aBMu/9Cn0+eNRC4jU8hgu8b1vMJ2JMpl3WZv8elSZp9dXT3un7Q3aUI8it uvJu8qWxsKCE+J9MXA1uWMPoVHUg/LiEsBdNqQ8GH8dADMBnWjg7CjYtZPA+Scpk0qkLo+1cPYh HpqP3RcdfrZPPB7IIde8HeWISWQzVqxeAgtSBpS6u+dV4fkeOEgIXOQtaxI1z7w/8FEey6VBLqj bl7h/DuCje6IWtRfRlZFsQomFR6BZ3hgvE18n7r7u9eK7ZAnuEDaEqIWLE085RYm4hRXxgflUMy nQGMD17KVYoBBiQ3ihv5dPt9Jcl5EphQk8O0mSBMmCx3UWcpKnJXx/C8ofL6sHFQ0nJOnuIzuT3 +Kb92/VvOx1eImrPmG/I4LL9/ppEQyXT5iUV13jaTsy1Zq7NwKQXwpfYbZBFjrPiDm/3lkzI8LS gNWYm3vOMHy/z7Zv749mwCFuQA+w2oGtsJsQpLq50pNikUWHGLxZuP X-Received: by 2002:a05:6000:400a:b0:431:2ff:128f with SMTP id ffacd0b85a97d-435b1ab836dmr6238018f8f.6.1769180993842; Fri, 23 Jan 2026 07:09:53 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/22] bsd-user: Clean up includes Date: Fri, 23 Jan 2026 15:09:30 +0000 Message-ID: <20260123150941.1877768-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181404092154100 This commit was created with scripts/clean-includes: ./scripts/clean-includes '--git' 'bsd-user' 'bsd-user' All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Warner Losh Message-id: 20260116125830.926296-3-peter.maydell@linaro.org --- bsd-user/bsd-mem.h | 3 --- bsd-user/bsd-proc.c | 1 - bsd-user/freebsd/os-proc.h | 2 -- bsd-user/qemu-bsd.h | 1 - 4 files changed, 7 deletions(-) diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index 416d0f8c23..a118e57260 100644 --- a/bsd-user/bsd-mem.h +++ b/bsd-user/bsd-mem.h @@ -49,11 +49,8 @@ #ifndef BSD_USER_BSD_MEM_H #define BSD_USER_BSD_MEM_H =20 -#include #include -#include #include -#include =20 #include "qemu-bsd.h" #include "exec/mmap-lock.h" diff --git a/bsd-user/bsd-proc.c b/bsd-user/bsd-proc.c index ca3c1bf94f..8dcac9608d 100644 --- a/bsd-user/bsd-proc.c +++ b/bsd-user/bsd-proc.c @@ -19,7 +19,6 @@ #include "qemu/osdep.h" =20 #include -#include #include #include #include diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h index 3003c8cb63..cc53215138 100644 --- a/bsd-user/freebsd/os-proc.h +++ b/bsd-user/freebsd/os-proc.h @@ -23,10 +23,8 @@ #include #include #include -#include #include #include -#include =20 #include "target_arch_cpu.h" =20 diff --git a/bsd-user/qemu-bsd.h b/bsd-user/qemu-bsd.h index ffc64bb244..56affcd31d 100644 --- a/bsd-user/qemu-bsd.h +++ b/bsd-user/qemu-bsd.h @@ -20,7 +20,6 @@ #ifndef QEMU_BSD_H #define QEMU_BSD_H =20 -#include #include #include #include --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181404; cv=none; d=zohomail.com; s=zohoarc; b=UBK9aOa1VN8U54VTMJ2pgsQ3d36mNknsYrxrM7/V0p/EdmmSbCLnXFelTRgvwPE5I/frfK/Tl+TBbckzPraTE7T/HV0PN4402aW+Aq2YF3TwgPZQ0Gxw3MO/XZWsT7XbkUQX1WI9y6wlUzBMV1hr1g0zrtpp4whM/GJx2e+Ui9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181404; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=B4a7e8a1Ek2vHXva6lSoEeVRPpCC/Zyr9kF8XLCIMcc=; b=BaSeGR6CcJ5UaJ4iXDXYo6xOjHBx6nwKYbxCQLPz4itnWwsWAwK39DYov7uS8AFyNARPFCfS2s606bfAbVlhdI4POEo3anVO66NIJ++E9QxaQXlBIFjljZ7+aELpjOLWvoltcnQ9DBREXvk5cPZ7D3oXy3KTUfxRSUrMkseoPXI= 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 1769181403941796.012021648886; Fri, 23 Jan 2026 07:16:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIob-0008Qj-97; Fri, 23 Jan 2026 10:11:13 -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 1vjInP-00077M-UV for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:05 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInM-00035d-Mq for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:09:59 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-4359a16a400so2160824f8f.1 for ; Fri, 23 Jan 2026 07:09:56 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180995; x=1769785795; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=B4a7e8a1Ek2vHXva6lSoEeVRPpCC/Zyr9kF8XLCIMcc=; b=D4GkSk9IHsXhGU5XdVh6Rz8dmbM3eCGz7+Zpi/BOVerSGYDJkJJrqfMYQmsycrKy60 G2XPHNHM8h2Zqft4Pjz7xQQKPlF6D43AD34yCTNgRBg+7U3u1QUPvtjL9ob207LfFfw0 AOFIEj3CeKMMCEcHj6v4H1c6TSgZGAP/swsooy3OOaTwHEen/6z7Jc83UIwWZC28Mhfw pexOpAvHk85omTf4PGQk8wdclXKqiHJhxMJNoJrMM9ormFKKBWAbbKCGK5XK2ro/SOzC 5ldIt9LUQjBIPFTRgc8DXjOSD/3ZdLC+oMT23yV5Xexmrnk4UDuziy9OuCMxS4w5dSKW DB/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180995; x=1769785795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=B4a7e8a1Ek2vHXva6lSoEeVRPpCC/Zyr9kF8XLCIMcc=; b=bBZRof/Oufx0qK6ioCi6Z6uH0qfK6ebRSlTGxdTmnN0nFIMtTum0bqz7wDZvvf2bnr HrQ0qQb5Dn4cG+BaQBHuRmr17Vv/rFV8Y2OQ1BHYNRbIU05/9SQ700hsWgzA8KndpKbn yqMsYjT5EppVRKHzu3SVqgnokjJyI0AwgxZP6Vk8L3b+2DADiyA0fOg3sxSn+yQmXCCf DZ2ypM4ngA6FAJyLhma7L9XE9c3sfuyI5J9TuJmBErTP2XGmp+GlruWBeta4VJ5epZhS amUdJ+rMLOIV4dGhMb1g3TWP7R9Y0PYy2/uk5FgDKucMKK7g5LqleiwjTZ9by9nY2TVK +Vgg== X-Gm-Message-State: AOJu0YynoKcSqVZwWNtRtfKUPk+TSDRxrjkQ2MyhpBFOyDUafsYmeMGK HYWgdreVk0BkA89Dx135e21mq5qz42IUv6tdZ2wfGCz/3HTEzvfQyWkitvw5aMSbdJPtXbBBO0g wcFgE1QY= X-Gm-Gg: AZuq6aKhMV2MSELEoGy+eiYA6TeztMnGPP8c4XsGhxh7dNrE7cqHkA2/zSxq51BT1hB H96L65WV/uVfnwlesNXitYAsPVkr9JEwkJ1jnf+yu+qBOpisVOIGyyDxWOmTCbdNKYeygekaZY/ hQX80l7FQfpy8qOUKTbCkHu6NgfxPybEYcRRI0jR947krcsyYSwANhdmAV01PNZrTD8/k7sDR89 JSHeRojlYITaOpBXvBRxd5SngMxE38k85+V0oXtWkVnwjl/rSIehTZ5l7ujbJbQI85X6mxAdE1A Q7jd1utwPz71dAujZH15VZ5UOar/zH1r2nZwjCgngSQOAFmsGQzjq3K4pyfGHPpnf/C3CYAztCn bT7Oi1L0oE1pBbjrcrUgK2zC7to8QAIpu9tMM/hTbEUf3165qs0y/tLb7glmHa1oQAJtP+oudST cHW/hGmRf4k7VLFweZU6XgDkcDn113R1o8zWv84D20HiZrL688410m X-Received: by 2002:a05:6000:184f:b0:435:a287:82c with SMTP id ffacd0b85a97d-435b1589573mr5616219f8f.1.1769180994882; Fri, 23 Jan 2026 07:09:54 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/22] misc: Clean up includes Date: Fri, 23 Jan 2026 15:09:31 +0000 Message-ID: <20260123150941.1877768-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181406269158500 This commit deals with various .c files that included system headers that are already pulled in by osdep.h, where the .c file includes osdep.h already itself. This commit was created with scripts/clean-includes: ./scripts/clean-includes '--git' 'misc' 'hw/core' 'semihosting' 'target/ar= m' 'target/i386/kvm/kvm.c' 'target/loongarch' 'target/riscv' 'tools' 'util' All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260116125830.926296-4-peter.maydell@linaro.org --- hw/core/machine-qmp-cmds.c | 1 - semihosting/arm-compat-semi-stub.c | 1 - target/arm/cpu32-stubs.c | 1 - target/i386/kvm/kvm.c | 1 - target/loongarch/csr.c | 1 - target/riscv/csr.c | 1 - tools/i386/qemu-vmsr-helper.c | 1 - util/cpuinfo-aarch64.c | 1 - 8 files changed, 8 deletions(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 79cbcdd63e..e62cb4ec88 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -30,7 +30,6 @@ #include "system/runstate.h" #include "system/system.h" #include "hw/s390x/storage-keys.h" -#include =20 /* * QMP query for enabled and present accelerators diff --git a/semihosting/arm-compat-semi-stub.c b/semihosting/arm-compat-se= mi-stub.c index bfa3681e26..40199c9842 100644 --- a/semihosting/arm-compat-semi-stub.c +++ b/semihosting/arm-compat-semi-stub.c @@ -6,7 +6,6 @@ =20 #include "qemu/osdep.h" #include "semihosting/semihost.h" -#include =20 bool semihosting_arm_compatible(void) { diff --git a/target/arm/cpu32-stubs.c b/target/arm/cpu32-stubs.c index f0ce159572..9e50bb1b0b 100644 --- a/target/arm/cpu32-stubs.c +++ b/target/arm/cpu32-stubs.c @@ -3,7 +3,6 @@ #include "qemu/osdep.h" #include "target/arm/cpu.h" #include "target/arm/internals.h" -#include =20 void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp) { diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 7b9b740a8e..0c940d4b64 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -21,7 +21,6 @@ #include #include #include -#include =20 #include #include diff --git a/target/loongarch/csr.c b/target/loongarch/csr.c index 332a1396cc..fff2312f87 100644 --- a/target/loongarch/csr.c +++ b/target/loongarch/csr.c @@ -2,7 +2,6 @@ /* * Copyright (c) 2025 Loongson Technology Corporation Limited */ -#include #include "qemu/osdep.h" #include "cpu.h" #include "csr.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 05c7ec8352..5064483917 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -31,7 +31,6 @@ #include "qapi/error.h" #include "tcg/insn-start-words.h" #include "internals.h" -#include =20 /* CSR function table public API */ void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops) diff --git a/tools/i386/qemu-vmsr-helper.c b/tools/i386/qemu-vmsr-helper.c index 6c0f4fe870..f12fd3c3e8 100644 --- a/tools/i386/qemu-vmsr-helper.c +++ b/tools/i386/qemu-vmsr-helper.c @@ -20,7 +20,6 @@ =20 #include "qemu/osdep.h" #include -#include #include #ifdef CONFIG_LIBCAP_NG #include diff --git a/util/cpuinfo-aarch64.c b/util/cpuinfo-aarch64.c index 57468890c3..288074c08f 100644 --- a/util/cpuinfo-aarch64.c +++ b/util/cpuinfo-aarch64.c @@ -26,7 +26,6 @@ #if defined(__OpenBSD__) && !defined(CONFIG_ELF_AUX_INFO) # include # include -# include # include #endif =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181117; cv=none; d=zohomail.com; s=zohoarc; b=jVnmfaEcowgdGWolq63OThfPZxpD/h4uzb8mInAZQCqOkUgIc8Qx9NLP2zUtUOLbYvHULdse7vgIUZQQu95Rz4Bapdz65nX88jBrrpVei2czyF2OL/D9sx5uyb6M5rBIgGXOUNWi5/JGGFCM4LbhaoVo4km2jfi1CdB5rgeOQKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181117; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lT9cpKsejMrXAad2lZ8Jg34cGKKa9EKIzdv2dgEDJFo=; b=JmHqHz0Sn4IC5rcV8fKwURoVrkvbemBiXN9yevAhuxu4NX5AnYfjy6Z66xugEEcV2xpu1qn0e+VcSYiMyvtjpg6Ah8SrgxF48vLVvtn4lcU/9Nk4ylfXXPxWm22olAGPK/NJsjHF/2U+Q8bc8j04Ik/zYc19o9E21WZ1u6ReioY= 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 1769181117659410.27182521307714; Fri, 23 Jan 2026 07:11:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIo6-0007es-9j; Fri, 23 Jan 2026 10:10:46 -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 1vjInR-00077s-C8 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInO-00035q-CD for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:01 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-47f3b7ef761so16493615e9.0 for ; Fri, 23 Jan 2026 07:09:57 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180996; x=1769785796; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lT9cpKsejMrXAad2lZ8Jg34cGKKa9EKIzdv2dgEDJFo=; b=aJTbYKhlv9av8OFfBIXQli/Efy0cyp+J8B72LiEfE/SgPDbhfFoVgmPKXRDv4vnNuR Dq32cgjH0xlKRV/kxJQ5mWr9NItjBpQa9JhLL5/y7ZJm+rYj9FNkitKc6+5y7ZTyj19m wCGpfdPgw20dJaQAPaFwBxrnHFjXm+Rijp3RmgaKZp0mszjQLgJW6TKLEn0aExb4eUDV D3UKjfvDLDckPNgpVexLQPeKknrA9KlGM6LXvV2lZR5PeYdvGq9n5YkBpGc5r1Mx19kb mX0mkDJhnDZGIDFmVAXzKIMEZ4X76+2ssFXHwluv4/ld7FQ4HwdZ8d7hODvtCZafsIPA RpUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180996; x=1769785796; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=lT9cpKsejMrXAad2lZ8Jg34cGKKa9EKIzdv2dgEDJFo=; b=wYYvrDqVrsWMlr/3YuEIa7qsjHuz+MohYb9UIURS7hA0LQOIYn3pYIukGG/WZTs74x mcTVrkb3hYIc72zQWREbnAviZZeuvpzTgHGyRv90uUxD5nkVCZCueqWCbfX3DYzplBpk PGsFQZncdA0n4f38QDhN3r/UXZ1M4O6bukn1qKAcIyWcL68slDeZfWxXisL90PmvvJk1 1iPgW8s1PCebnm09lZwn7JL7gYrk/V2HyXCQUBlYWliX4g+vx0FLLMZMvrlOBnUIznaa Ab6mS0ka77OyZcnQRgvJR8qULZ+1NOiwstWk2jxD3lup28fQinBrznXwdRF11uVD6A2G 3Wew== X-Gm-Message-State: AOJu0YyLF9Qlg+a40SXMysJ1JooMeuLEq+i3Y6HIALcAElZ7ZVX60scz ypjnDWVO8OyK76vDsDM7OiyNNdsESb6ATkS2ZAg19WqTqcYwo/NOn/9O7XVdD2bp4P3rGd4rdRl kH1bRt0Q= X-Gm-Gg: AZuq6aIv7BTNhiGsl9G9scOq9ukFInkBLkvlBmX9+Jr/eSl3Ldz89ynSIoir53bNAuR kxEtZhJjZyKVqIfSkH9KwLGtBndso6iUKoZ8ZO58YhRRz7/4wGEfPFx8UalIxjhgeDKn3kABqHD HSw/rsW7WRm3PwekbXmPqG/COWUZkeG3zQK8hfmI10mYHF5kASt6uktVDhS3Qtdhjc/Kg1Zd/JA cZn/nyo5O0q16losuxQvVZwMtytefcF+WUux6aaJfDCd2+2j23ZTt9gKsHUEQ1omecuZfavfaDm /PblN88Evgzgqjm0iggEW2zxkYrQBZnSdJoWC8bFVq56f2KEwbNwzF0DQBeB/lgT/TDsNJTM1ZL aadI1VcNVSlxz3kyw/gGQ7uiM/kxoWP6Ineiahpnn7mmrfgy/CEBaybsCBKRSN0vELwTqzBkXQe 2dAD0Ujs/7Br380WmoxbDKCqjLYPiSWVQ+WcV4ReiS1d5+2hWr+GJN X-Received: by 2002:a05:600c:8707:b0:480:3338:292d with SMTP id 5b1f17b1804b1-4804c9b7c19mr55064795e9.31.1769180995834; Fri, 23 Jan 2026 07:09:55 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/22] all: Clean up includes Date: Fri, 23 Jan 2026 15:09:32 +0000 Message-ID: <20260123150941.1877768-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181118669158500 This commit was created with scripts/clean-includes: ./scripts/clean-includes '--git' 'all' '--all' and manually edited to remove one change to hw/virtio/cbor-helpers.c. All these changes are header files that include osdep.h or some system header that osdep.h pulls in; they don't need to do this. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260116125830.926296-5-peter.maydell@linaro.org --- hw/scsi/lasi_ncr710.h | 1 - hw/scsi/ncr53c710.h | 1 - include/hw/core/loader.h | 1 - include/hw/i386/tdvf.h | 1 - include/hw/ppc/spapr_fadump.h | 1 - include/hw/riscv/iommu.h | 1 - include/system/accel-irq.h | 1 - linux-user/alpha/target_proc.h | 1 - qga/commands-windows-ssh.h | 1 - qga/vss-win32/vss-debug.h | 1 - target/i386/kvm/vmsr_energy.h | 2 -- 11 files changed, 12 deletions(-) diff --git a/hw/scsi/lasi_ncr710.h b/hw/scsi/lasi_ncr710.h index 99be001fc3..450fb7e1c3 100644 --- a/hw/scsi/lasi_ncr710.h +++ b/hw/scsi/lasi_ncr710.h @@ -15,7 +15,6 @@ #define HW_LASI_NCR710_H =20 #include "hw/core/sysbus.h" -#include "qemu/osdep.h" #include "exec/memattrs.h" #include "hw/scsi/scsi.h" #include "hw/scsi/ncr53c710.h" diff --git a/hw/scsi/ncr53c710.h b/hw/scsi/ncr53c710.h index a8dc92f4ef..00b6a01577 100644 --- a/hw/scsi/ncr53c710.h +++ b/hw/scsi/ncr53c710.h @@ -15,7 +15,6 @@ #ifndef HW_NCR53C710_H #define HW_NCR53C710_H =20 -#include "qemu/osdep.h" #include "hw/core/sysbus.h" #include "hw/scsi/scsi.h" #include "qemu/fifo8.h" diff --git a/include/hw/core/loader.h b/include/hw/core/loader.h index dd22cbb5e8..d9431e8a8d 100644 --- a/include/hw/core/loader.h +++ b/include/hw/core/loader.h @@ -1,7 +1,6 @@ #ifndef LOADER_H #define LOADER_H #include "hw/nvram/fw_cfg.h" -#include "qemu/typedefs.h" =20 /* loader.c */ /** diff --git a/include/hw/i386/tdvf.h b/include/hw/i386/tdvf.h index e75c8d1acc..4d7362ad65 100644 --- a/include/hw/i386/tdvf.h +++ b/include/hw/i386/tdvf.h @@ -9,7 +9,6 @@ #ifndef HW_I386_TDVF_H #define HW_I386_TDVF_H =20 -#include "qemu/osdep.h" =20 #define TDVF_SECTION_TYPE_BFV 0 #define TDVF_SECTION_TYPE_CFV 1 diff --git a/include/hw/ppc/spapr_fadump.h b/include/hw/ppc/spapr_fadump.h index fde2830e94..82681fb9a6 100644 --- a/include/hw/ppc/spapr_fadump.h +++ b/include/hw/ppc/spapr_fadump.h @@ -6,7 +6,6 @@ #ifndef PPC_SPAPR_FADUMP_H #define PPC_SPAPR_FADUMP_H =20 -#include "qemu/osdep.h" #include "cpu.h" =20 /* Fadump commands */ diff --git a/include/hw/riscv/iommu.h b/include/hw/riscv/iommu.h index 25f1a8b159..999384fc89 100644 --- a/include/hw/riscv/iommu.h +++ b/include/hw/riscv/iommu.h @@ -19,7 +19,6 @@ #ifndef HW_RISCV_IOMMU_H #define HW_RISCV_IOMMU_H =20 -#include "qemu/osdep.h" #include "qom/object.h" =20 #define TYPE_RISCV_IOMMU "riscv-iommu" diff --git a/include/system/accel-irq.h b/include/system/accel-irq.h index 671fb7dfdb..a2caa06f54 100644 --- a/include/system/accel-irq.h +++ b/include/system/accel-irq.h @@ -12,7 +12,6 @@ #ifndef SYSTEM_ACCEL_IRQ_H #define SYSTEM_ACCEL_IRQ_H #include "hw/pci/msi.h" -#include "qemu/osdep.h" #include "system/kvm.h" #include "system/mshv.h" =20 diff --git a/linux-user/alpha/target_proc.h b/linux-user/alpha/target_proc.h index 6b491ffa3a..71949d380d 100644 --- a/linux-user/alpha/target_proc.h +++ b/linux-user/alpha/target_proc.h @@ -6,7 +6,6 @@ #ifndef ALPHA_TARGET_PROC_H #define ALPHA_TARGET_PROC_H =20 -#include "qemu/osdep.h" #include "target/alpha/cpu.h" =20 static uint8_t alpha_phys_addr_space_bits(CPUAlphaState *env) diff --git a/qga/commands-windows-ssh.h b/qga/commands-windows-ssh.h index 40ac67c4d9..c35d945a89 100644 --- a/qga/commands-windows-ssh.h +++ b/qga/commands-windows-ssh.h @@ -11,7 +11,6 @@ */ =20 #include -#include typedef struct WindowsUserInfo { char *sshDirectory; char *authorizedKeyFile; diff --git a/qga/vss-win32/vss-debug.h b/qga/vss-win32/vss-debug.h index 7800457392..506cee6698 100644 --- a/qga/vss-win32/vss-debug.h +++ b/qga/vss-win32/vss-debug.h @@ -10,7 +10,6 @@ * See the COPYING file in the top-level directory. */ =20 -#include "qemu/osdep.h" #include =20 #ifndef VSS_DEBUG_H diff --git a/target/i386/kvm/vmsr_energy.h b/target/i386/kvm/vmsr_energy.h index 151bcbd642..415d64f51c 100644 --- a/target/i386/kvm/vmsr_energy.h +++ b/target/i386/kvm/vmsr_energy.h @@ -14,8 +14,6 @@ #ifndef VMSR_ENERGY_H #define VMSR_ENERGY_H =20 -#include -#include "qemu/osdep.h" #include "io/channel-socket.h" #include "hw/i386/topology.h" =20 --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181075; cv=none; d=zohomail.com; s=zohoarc; b=Pm9Amg1kl7ayFnuMp44tGYlPUrSKEDOimSabGvZdFl9/K4YXbe+yjGQi9fVN9euYbvhOPacGeDWDwsgKkmyAirscvclz4oSfxDIDNENSPNzqDsh7jvY9Eoe1rw1qAeMjA4zKeR33m6OwxbuZX/cuw30U1AJq+mkmNUHlhiVr37g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181075; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=h9XoevUjmVvgSA/1RTS8XxR8NPila3khvNmpvFgd9i8=; b=WCfAE3hoxl1PFFvCcEVGiy6rkt9/mJdBdT7ooDx84H4LS/JKk75TYeKmDw+bUbd/5GvYOYn4lb8bskZz/NGl6AfGy8V2Bc6pPxpuZQyN1jb6ShOOeEZiW2yGNkYjoE3MAt5PKQrJksGU0FJTr1pi1XrrAbt/JVbjqYlYY4vEEsg= 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 1769181075839832.2581736281379; Fri, 23 Jan 2026 07:11:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIns-0007XZ-96; Fri, 23 Jan 2026 10:10:29 -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 1vjInR-00077k-3X for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInO-000364-CF for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:00 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-47ee07570deso17973475e9.1 for ; Fri, 23 Jan 2026 07:09:57 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180997; x=1769785797; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=h9XoevUjmVvgSA/1RTS8XxR8NPila3khvNmpvFgd9i8=; b=bGuH4Qe1PiYunZkwZO5pjYoaE0Uot1/xZc/TmcFAtGnNZpDfb9hVdLusV756RO/VXX WXoupXJfXWzFmrH8uxGp7l9AQ2M3/iH3Ie1pO+/JvdRso0RHpHeLAYly9x18SzBD4NcI 7TBFEIT1y/wy6P4v0JBhk1oyJBaN2zsJzKoQWnl9hMZLFTAzhjcqN0T9rJmhZtVLjTMS /dHnqMeJBoae7IQC5YqAOkIQcF2d2TN04FI0tuHdZzm7QHAiQv2DCyz0EuuB9jzEz37c ZjTHmMa9i67bSU1JchwJl19MKSkG57i1Craa0loLIy/wi55brY9lOap3Rsx0b5HqSemk 7V8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180997; x=1769785797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=h9XoevUjmVvgSA/1RTS8XxR8NPila3khvNmpvFgd9i8=; b=U1M8W2NsabFR1MjGSvXfx+7KUCxmZaFBe2n7ssWlhbgnYxi0UY2MO6l4hDfWn8A5U6 8JIoNfHAZ6J97C5oxJ02/LLu6Akxqzw31Q5jcsaiGyyJ1YD27MUTPVaQdOi5fnoHYKAe 9P/S9TLWPpbC252cG9WBgD2Zk3/0SfDxBfhFYuC9CyVsqwCFPSim9DBhQPocuYvvE9PF WcHmxAf119dlpv4b0VKZolwjIu3mNQK7qIYmlVXFWnICAtQQiOC+Kvgz3G7pIsvuI6qF yERyGanxDj7bjCg4svRRTG7N3aSYMZcpeW3XRkIlJDYgfm04LRUuXgCessSyesLclCtY HP4Q== X-Gm-Message-State: AOJu0YwkzVGYxSO2bs8fAGLIzAX5Re8+lo/P4djlG2lJ1XHu8vlmwWmg AvozMJ4f9sFBFHdpPnV1jUDponTzfxy0PoxibWQ46At4mhbkkm3Awxh5HygDjqoCHX8gJUwN8Oa Lknnd8SA= X-Gm-Gg: AZuq6aI0/PpVPnCHYq3kKIt1y7Q0zfJOuW8rUCUZ3bbyPqh7ggyXezI6QR/kY6XJyj/ BsUGtSYJDh3VvXFXg5xsebb0hsGp/ENN/Dth+g8P6N0Ft7yieYXDNbcGe49IpBjSpJChJuJ5ec6 q9EUZnLLflnqu06291/LfcbJ4rGwppwCllgmAvKv2lrztgrXFfP/QxqvWwtejuKttPyyKKHTtWn YxBxtUbkx0whp59Vkp9BqVX0dh025XNEhDJD+HFawvHPQd5JxzNDzyWUZHb+fvySnzewq61vNDN RUgpSui+u+UV/WgNro0n12esHdgxXwXq4HOjc+rIGGk9ZvslCVtBy2505TybE3DrtJKQCNjN/dE AO2rCSXGaYNTHlsPyPXOfQr8xZwW0eFG4f7i9KoXf2wuKPNClej3Y6F3KXO4/kndtYkTgpXKIW8 uQeZHnhK981NqwmS4WP6GytcKU9fSm+SBDzc7egx+7mlz6I+u5+GDK X-Received: by 2002:a05:600c:8b6d:b0:47d:586e:2fea with SMTP id 5b1f17b1804b1-4804c95caa1mr61219255e9.15.1769180996657; Fri, 23 Jan 2026 07:09:56 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/22] hw/intc: declare NVIC regions as little endian Date: Fri, 23 Jan 2026 15:09:33 +0000 Message-ID: <20260123150941.1877768-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181078845158500 From: Alex Benn=C3=A9e The NVIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. Indeed the Armv8-M architecture reference manual declares: All accesses to the Private Peripheral Bus (PPB) are always little-endian, which means that the PE assumes a little-endian arrangement of the PPB registers. This should have no functional effect as the NVIC cannot be instantiated on a BE system but will help the single binary efforts. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260121105932.135676-2-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- hw/intc/armv7m_nvic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 3a31eb56f3..28b34e9944 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -2467,7 +2467,7 @@ static MemTxResult nvic_sysreg_write(void *opaque, hw= addr addr, static const MemoryRegionOps nvic_sysreg_ops =3D { .read_with_attrs =3D nvic_sysreg_read, .write_with_attrs =3D nvic_sysreg_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static int nvic_post_load(void *opaque, int version_id) --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181118; cv=none; d=zohomail.com; s=zohoarc; b=UdqQgOE7V0Uuee6ZE0kzdu5nkaLw6Quf9y8DTSjlZCJsPHEFHocy3AEjVqiV0lhvXctwQC2j5QPWQn2Gn3vr2SL/DynJhbdRUiR/tCV7x3DSIixvy2CnwpM1FmbTdZYuV0s5g/BiRPA2wDgw0KA4zsLizvHtGUsWePc1vRyskS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181118; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Zd1I64gLFEX+HyqWTrjp/BrmEmETb82V0nNznQxNN2w=; b=G0cClV3lFyFOgZOcYAmh9bPd6lWq7Qja0Ax2OLPiKFqnSXhOa0ayckozcECUcCzqH8AIXoJQmTIge6LkIsY2S89Kx1kbR5xPWsUy4cq30oYG+Ls8RK9fidih0rUAOvadzP44secwYueCckEAe4DQVUVQvmMTiV0eqXLKrQF1cHQ= 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 1769181118883484.91958836719346; Fri, 23 Jan 2026 07:11:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIno-0007Qy-TV; Fri, 23 Jan 2026 10:10:24 -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 1vjInR-00077r-At for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInP-00036A-3j for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:01 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4801d7c72a5so17096085e9.0 for ; Fri, 23 Jan 2026 07:09:58 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180998; x=1769785798; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Zd1I64gLFEX+HyqWTrjp/BrmEmETb82V0nNznQxNN2w=; b=Vzw68KQGVFFqNZtscHGehMm2/OgjLjAnBx1VW03pRqQfCZ5HGD2J1gggx3QxPP34iU Bc4WMD1UTLyW0EkrEdKXLL5FENXY487K7kNlf0BDkGE/td2Iw6UlZhOM7Prpvi6or3lR yf6ITegc2qbkDPfz+0XNY37Bvib/k85msvo9RhH/VS1ds1iqURMzv+0ugsNzmL1j5Mjc dC+2Bo/ll1lRup+XwgNH8owocBun+GDX2j2dskmsAA30tourptxZDd7w3hSwe3LxRvJv oxQ8UOfMdZ7hUF4uXUimzQipItS38MZo9xb3l7iLBD6T6GPqwt0zCTBlDbFcQ9DaVvZm f6TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180998; x=1769785798; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Zd1I64gLFEX+HyqWTrjp/BrmEmETb82V0nNznQxNN2w=; b=h1bqcqhEYUU9BwjiXQOg+b0She1Ahd7+avnZjn4GJtWG9C2Kvu3Nsoan5gVn0+leov h+ogdFsiyOtJqQIU2Y8owTLCEp5+XxP3jMFBwBCK9tju1xNyvP+BWRs3Y1Iup1MvUdUA YHJxz/SAihfzIkH9ZodR7entxgsA6yZoOBwIXTeCXH/7tafzIwLQmErPtVXH2yS/xYZ4 FKy6VSjMPq1moRTR528r9SuCRYFqjnGDoBOmVXjysHSIAkYUJOLXt33yEFd2LK3nEiZo 8BDvz/AASvr1Pvu50iA4UWby+CSzcv2VBwt2POF0/ahXixTsFkXo88iEyHZqRxKLZSNb ksOA== X-Gm-Message-State: AOJu0Yz3VczlY0MmZ9a1lgKOgpsOmns2kLruXu+EPx+C8VCac17XNuYJ Mtm9nQcm8N27mJ9v+teU1K+DcMt1do3ySwfzyNTfBGxdvjUYLaOpA+DdyLMU5qCNgjRboMtYS9/ jNl3Qxp0= X-Gm-Gg: AZuq6aJHQQGH3NSObEGMbC7wtMw3MmMXU14Rkj/A6jbj/ecrPJ4B2Nd1gOSSSC/VYtE vZPkLJidqg1tZnMuxikgPEbYFvjfQJZU/lx+uNgIZ+fRh9d7H+cadECBBaXbBUQHrkLWQvt1JBb rTVlZXoCSBoRZvfgfU1wcqMBXvcg0sYuvaxVe245+1zUpSD8yF8ktBfG489M0oNGjfukkYtidFe lLbdsws3ZF5fkUEZhwBeai1pqaZZvKpNkTBjxJCdfdNZpDqBMw8o554bvBxh2QWJSLeTYU4cbZi w4AST9hwPF2urrVBOVAdjE6+JaE5BomNnMAEK2vHoKWwHRaiTapiQyis2zR7Nl2rRpD5V8HL70D g2gexlPigJWtSvZXvG7L5vjberfHhRhl96bkoW1iczxv1gNthW/GEhANjqjkqv9Wu6QH8S9K8Hk NrxVijXpEAaOKQ7Yf8PhsWS06daYYMYQkysSJSCPGsWPA2y4Q88OCIkndvVvQ9RXs= X-Received: by 2002:a05:600c:524d:b0:480:3a72:5c10 with SMTP id 5b1f17b1804b1-4804c95c6e0mr61071695e9.16.1769180997455; Fri, 23 Jan 2026 07:09:57 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/22] hw/intc: declare GIC regions as little endian Date: Fri, 23 Jan 2026 15:09:34 +0000 Message-ID: <20260123150941.1877768-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181120613158501 From: Alex Benn=C3=A9e The GIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. This should have no functional effect as the GIC cannot be instantiated on a BE system but will help the single binary efforts. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260121105932.135676-3-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 4d0cb125a6..4d4b79e6f3 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -2062,38 +2062,38 @@ static const MemoryRegionOps gic_ops[2] =3D { { .read_with_attrs =3D gic_dist_read, .write_with_attrs =3D gic_dist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }, { .read_with_attrs =3D gic_thiscpu_read, .write_with_attrs =3D gic_thiscpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, } }; =20 static const MemoryRegionOps gic_cpu_ops =3D { .read_with_attrs =3D gic_do_cpu_read, .write_with_attrs =3D gic_do_cpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps gic_virt_ops[2] =3D { { .read_with_attrs =3D gic_thiscpu_hyp_read, .write_with_attrs =3D gic_thiscpu_hyp_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }, { .read_with_attrs =3D gic_thisvcpu_read, .write_with_attrs =3D gic_thisvcpu_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, } }; =20 static const MemoryRegionOps gic_viface_ops =3D { .read_with_attrs =3D gic_do_hyp_read, .write_with_attrs =3D gic_do_hyp_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void arm_gic_realize(DeviceState *dev, Error **errp) --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181337; cv=none; d=zohomail.com; s=zohoarc; b=ia0LJbuSNSoNEz7+WcRmi+cJUN3VxIUxYCPmWZiqRq3PjCjGDYAQGPLAyDCpIv+pA1lkhzuijR7F+A6tMcmaWt+HrvA2JQusu2ViblJd5FoBk29VnojzC4vMsrsqNL3bQLlDB62TG6x7LY9xSJoJ15mJotv24xjR5kETBtfkBjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181337; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=pO2f6DBNywpKXf5TNbSH8YRsyqs1ZqsJjw5WvM1u2rE=; b=j4DcpgLUlZTMsjWO/syxZUU0239yF7Mzan77m0ToFc2mz36GfnXAV2kM/iH6ZBKhHKuV+HWA+57P5a0lkHroymuMy3zRv3gBsjy8IjF1McXPIBCc428aAIb8dFh9H6+6zYDXrdcT5JH1kmuto3PN/Eksl5NDiSETPUy4P3dcuag= 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 1769181337271143.37752190112758; Fri, 23 Jan 2026 07:15:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIor-0000sH-8p; Fri, 23 Jan 2026 10:11:32 -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 1vjInS-00077y-31 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInQ-00036H-2Y for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:01 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47edd9024b1so19556895e9.3 for ; Fri, 23 Jan 2026 07:09:59 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180998; x=1769785798; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pO2f6DBNywpKXf5TNbSH8YRsyqs1ZqsJjw5WvM1u2rE=; b=N/tfKVopmCYmShLSsfxOaPwVo9S/W1f6MlY90Q7bxPkTdgb/DJ02Uo830yY/VW1709 5xp3l9vo6da5tzLqL0gxD46zOJUKktWP1qkQwk2nV5WJBA+78O2gqQFa66yMywoXGcgI 5btoHvrsceFOO215pYGx95STV1GPF1j5iekXaFDB3vEjJJOsK5HZqzWtyA26b+vFxdjw ob/rS0kbQK3d11pKTNAzTPn+2Df8NcXnIwj5KjbLdYN4q4Sk5imMnC9hG2rYi53rGXlZ mQ24rK3GTNAnA28f+F20rjZ1GxJIAD3Gh20KbSqmnpIfxrMEVKOk6c63tk8kY69shm1W palg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769180998; x=1769785798; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pO2f6DBNywpKXf5TNbSH8YRsyqs1ZqsJjw5WvM1u2rE=; b=oojKsECy1fwjk11QCoNeKfqxYX3M9x5kvVcKGUmlY3YVd2azpzf3wh4OLWFEGs9UqK NxU8h7iZPUFCwocDOhnwroguXdAK6kpCQwdykl+uGks9fWmKVgYMBrgRVW77jae7LcEE cD1maUYg6lPcBHv7M1BrP/7RBpHVHW2Wkp+aSX6iHI+qTWVFTC80Se+zAoymHbnbf6xf 5duFW/Q+2e5QJG1bXKesHmL65U50Ok7fIXTyn0GikKIaaZ3KLW789UytGI5yP8fGjgdQ dh9ueGJmf23rjbEWcOc2V692lpNzNFJY7YYfqpr4YilstMNkc8mWNmMzP5NIbCb91H7o i9jA== X-Gm-Message-State: AOJu0Yz6ideGjTdykafOKI7Hckr13Y+LsViXGKGQtvG2WyMhMlotklu3 Rklh1cn3fMhBeZ7Y7+RwxNHinjsyUKoEgonnE0khVd/ok0xVljuyB7/A5z2OAutZ9PRD7rvIl9A VwB3Z1M0= X-Gm-Gg: AZuq6aJ/ILvJsK+t2LoTwIfe5+ZqUyQrpS1gfpX1ZoLB9uYkKTyyKBZel+mWhoLHppD m5slt+r9b8FWaQrcdCCEa4foTD8dbzsrN6GfyqokfL3HG7D47oVoXmwjCl3h8lo2EtGCfqwVSQv 4oOJajJzqmmt8GEhFrnz4BKq5gSzM+lc5OWEU85XMfIOK3DsHik2M1+UEOgQ07CEaluAV6FwAqd G+Ty75KMR0oSZcYzLGumM8eisycKH2sMTZbBMRbOPmDmHzA8mLfVvgl4Njon7bQmyg/UOVsHrv1 ZXKiaAcAhA2ZJ+BUMEaly+TS9tNSVlFely1xxWIRGSsyb4A1CNUIgYJOf+8RVjiERatG+4+SPBo j1EKZWKtuQ7fd4ZYDxWq8rjZpkiVGgucDMmp7DZ4aDo0LBKLEtKIbQ6YMUdfMDgDGxJ7qnw3H/l EhP6vvMW2M3K7Eq/yuE0YrGNrhTAmr1WMAWSC1BwqPxdgWjSpCmuQI X-Received: by 2002:a05:600c:1d2a:b0:477:2f7c:314f with SMTP id 5b1f17b1804b1-4804c959823mr54621575e9.10.1769180998265; Fri, 23 Jan 2026 07:09:58 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/22] hw/intc: declare GICv3 regions as little endian Date: Fri, 23 Jan 2026 15:09:35 +0000 Message-ID: <20260123150941.1877768-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181339855158500 From: Alex Benn=C3=A9e The GIC should always be a little-endian device as big-endian behaviour is a function of the current CPU configuration not the system as a whole. This should have no functional effect as the GIC cannot be instantiated on a BE system but will help the single binary efforts. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260121105932.135676-4-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3.c | 4 ++-- hw/intc/arm_gicv3_its.c | 4 ++-- hw/intc/arm_gicv3_its_common.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/intc/arm_gicv3.c b/hw/intc/arm_gicv3.c index 6059ce926a..542f81ea49 100644 --- a/hw/intc/arm_gicv3.c +++ b/hw/intc/arm_gicv3.c @@ -417,7 +417,7 @@ static const MemoryRegionOps gic_ops[] =3D { { .read_with_attrs =3D gicv3_dist_read, .write_with_attrs =3D gicv3_dist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 1, .valid.max_access_size =3D 8, .impl.min_access_size =3D 1, @@ -426,7 +426,7 @@ static const MemoryRegionOps gic_ops[] =3D { { .read_with_attrs =3D gicv3_redist_read, .write_with_attrs =3D gicv3_redist_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, .valid.min_access_size =3D 1, .valid.max_access_size =3D 8, .impl.min_access_size =3D 1, diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c index cce3486d74..b639c03b67 100644 --- a/hw/intc/arm_gicv3_its.c +++ b/hw/intc/arm_gicv3_its.c @@ -1906,7 +1906,7 @@ static const MemoryRegionOps gicv3_its_control_ops = =3D { .valid.max_access_size =3D 8, .impl.min_access_size =3D 4, .impl.max_access_size =3D 8, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static const MemoryRegionOps gicv3_its_translation_ops =3D { @@ -1916,7 +1916,7 @@ static const MemoryRegionOps gicv3_its_translation_op= s =3D { .valid.max_access_size =3D 4, .impl.min_access_size =3D 2, .impl.max_access_size =3D 4, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 static void gicv3_arm_its_realize(DeviceState *dev, Error **errp) diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c index e946e3fb87..9fc51ad1e0 100644 --- a/hw/intc/arm_gicv3_its_common.c +++ b/hw/intc/arm_gicv3_its_common.c @@ -97,7 +97,7 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hw= addr offset, static const MemoryRegionOps gicv3_its_trans_ops =3D { .read_with_attrs =3D gicv3_its_trans_read, .write_with_attrs =3D gicv3_its_trans_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, + .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 void gicv3_its_init_mmio(GICv3ITSState *s, const MemoryRegionOps *ops, --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181253; cv=none; d=zohomail.com; s=zohoarc; b=CNqf0JyP/6Z/y8qC3PozG6ycpEUGiVjawQw4qIuMd4cpJGiKDcbEQvs4aGyVkiKQlig9wncHtBBVj0yLrNMShHLVsfz6pUnwr5sf8hZm4xxHKaWJW5bbwjiENJDqWB5JC4R6aNASVowHZqc8dRJh6VhbjqEvq71uromyS9ELu4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181253; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=VYPv2joWEy7NQbj1wDZIlmJyo9qqTDgvEnE16RTvAgs=; b=P9G65DhWJA+xKsen4yYBwO0nqH+6Trzv0xsB8GxoNVUrFrFw7LuOemv+e9La5x2D5dBrgPVvdDGE0sXDkEGO8UpcWtVEUJnlXujr591l3QcEAx+C/iz5y1OP2M6l98CeehZIp33AmVBgbz+8ZtjV4ksK8NaJrL+cnzrwn2KRfXg= 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 1769181253621163.7378662605339; Fri, 23 Jan 2026 07:14:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIpD-0001SZ-W7; Fri, 23 Jan 2026 10:11:52 -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 1vjInT-000781-7f for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInR-00036i-4z for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:02 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-42fbbc3df8fso1509609f8f.2 for ; Fri, 23 Jan 2026 07:10:00 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769180999; x=1769785799; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VYPv2joWEy7NQbj1wDZIlmJyo9qqTDgvEnE16RTvAgs=; b=w620DCyzyR6e0krcDkUKmOg5jNCsoszq6Vep0ZM06tWPzdLteeZpi+upLmoBYYd3n6 GlQ4IGBrluozhl7wDrYnizNgtJjyIoG/OHPGHuFAxWDNP3YsBDxBXbhAhbdvTWJC3yqk tEecHwXotBPh0bS0VrgiCEQ5YYXh0UBUdpdG0PsuFcxZR1R+uNtKo6nH/GX4sCjyYVvL L8Yneio+yIbvQxthDAYUSYFTMibKdni6dzNg1D9TiHyDGm6fgcAv+eMqEIJPI0L+KiBb 5d/Iknw4LgQGy4OTxNOHbSzcFNPX9gAOy/iGS2Vl0N/w4iQyzAsyz7oPnYbZX/krrR91 FSkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769181000; x=1769785800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=VYPv2joWEy7NQbj1wDZIlmJyo9qqTDgvEnE16RTvAgs=; b=ZiTjIX51ggErosIEHRbY6PAkXUxZQZkyQHfCERIFcf/hZ4TSdmmw1tPx/mU1XQ4tsg M9dMvbvKexrhFZIXiVzsiyMpRN41mHwFPqb8t1c7isBUZM+RHyTIr9aOqrofPoFkugWq rRRdk9xv4G4tGtg7bMPPoWJynRXV7VY5SRgIipaClXyhbfm72nY2SP0cwPzNf3F1nzCa R8BzlVaqtneKg1MIrsER2MvTejLWA7jOe1b2k+Q1dJ9BxG93AdcAm05RD79tM/XoIU4J cgJpEhGSjiSlSoVqfIG4aqYsTXUai8AT4CEjKFHpPfy0bRuuqFWu/1RB0OB43NTupeRa JI8A== X-Gm-Message-State: AOJu0YyB0YR3XYNegSsKZNjS8BeoUQf/T+QzqTk7x0H87v4rbk10oD5n K77/XSQwr43KOrE8hGJzU0Qzm9gm1XCj82vqW37xJSBWWqv70FQFwdxt/LBm4sKTLtU3LVPHvN7 UyMOkS5g= X-Gm-Gg: AZuq6aJCaWD2OQTJe5Zug4BB6lmlDxyqoWcA5Qr16RSGXvE9CmkwWkB+OdNxv1tFIPG MrESrBc+TkJJGoJStoKjJ8+hYnCBdBScKUH4I3QxYxZ221APb6basDPkTftNd7htpEeIWjgBQ4t +gGHGJI1qGKKohbyvSbjLJN/wPErLZIct917ceK4i44piBLFrSIo78rQK7nenYo2DT5CqtfVE35 dlGp49Kjp7Lj218MnWlArTuV4UBJ2ltJQA3LPvU7hFk0AoZPJsJGSCzSALF9BnqZwcJfjoKZYjK huzxcQo80wAcbXJhIxxbF0VN6rfYP0dTnLFJJiOo7B12cJ0EqJwjVLOJoKAiekaz9+aST7fTG+c W9PSTSDypI/0pOXEkaXVhOL9PbmaJKM2MHQq8+IuqsCkAq04Dm21rwp++bmP+Blmr5vm8g35xlw V7q2sgPuBgDDP3v+CXBLMF4zUk6gQEtce2MMjirY8i1K0qtYQYQDy9hFbpnJuv4Ls= X-Received: by 2002:a5d:5d0d:0:b0:435:a2f8:150d with SMTP id ffacd0b85a97d-435b1750380mr4795804f8f.59.1769180999399; Fri, 23 Jan 2026 07:09:59 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/22] hw/intc: avoid byte swap fiddling in gicv3 its path Date: Fri, 23 Jan 2026 15:09:36 +0000 Message-ID: <20260123150941.1877768-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181255577154100 From: Alex Benn=C3=A9e This allows us to keep the MSI data in plain host order all the way from the MemoryRegionOps write method to the final KVM_SIGNAL_MSI ioctl. This fixes a theoretical bug on big-endian hosts because we were using different size byte swaps which would have truncated the data. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Message-id: 20260121105932.135676-5-alex.bennee@linaro.org Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_its_common.c | 2 +- hw/intc/arm_gicv3_its_kvm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c index 9fc51ad1e0..60a5abd8d3 100644 --- a/hw/intc/arm_gicv3_its_common.c +++ b/hw/intc/arm_gicv3_its_common.c @@ -81,7 +81,7 @@ static MemTxResult gicv3_its_trans_write(void *opaque, hw= addr offset, if (offset =3D=3D 0x0040 && ((size =3D=3D 2) || (size =3D=3D 4))) { GICv3ITSState *s =3D ARM_GICV3_ITS_COMMON(opaque); GICv3ITSCommonClass *c =3D ARM_GICV3_ITS_COMMON_GET_CLASS(s); - int ret =3D c->send_msi(s, le64_to_cpu(value), attrs.requester_id); + int ret =3D c->send_msi(s, value, attrs.requester_id); =20 if (ret <=3D 0) { qemu_log_mask(LOG_GUEST_ERROR, diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index ae12d41eee..a8d6d4fb54 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_kvm.c @@ -58,7 +58,7 @@ static int kvm_its_send_msi(GICv3ITSState *s, uint32_t va= lue, uint16_t devid) =20 msi.address_lo =3D extract64(s->gits_translater_gpa, 0, 32); msi.address_hi =3D extract64(s->gits_translater_gpa, 32, 32); - msi.data =3D le32_to_cpu(value); + msi.data =3D value; msi.flags =3D KVM_MSI_VALID_DEVID; msi.devid =3D devid; memset(msi.pad, 0, sizeof(msi.pad)); --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181230; cv=none; d=zohomail.com; s=zohoarc; b=cQxQvY88IrnNDgkO613mhUgC83SDIelZCAyPAgXRmEsj+s4OKHvUL7mufCK5DGACTHFDroBQvdEwYXVO/XjOlfAi9clZuwbF0kwJ6ZH4x1/wg93pXtU9DLJyUE9B8tKuGeEEJZ50JGGiochgI08o81yStbc9lZsfu0niQtimLKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181230; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=mP+whJkVyK+SSs6Mqc5tBKekpoTk7ckeOTEMEVQCY7c=; b=hiW2Wrzbe3sn01myf7owZeDgfJR44jMup3KS8wWkaW0BBHmdIx2l3VMx4gSQxV+WPEP001mhg1MWIZGx3DJ2CXfvvsDBsnM3PySAOUz9XDZWyEMKnyYUIbq/KBGp/EUpDCZPdVzuLcyA7gatu5xsMW8L+w7Y2l4igvjk2p2G5Xk= 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 17691812305091007.8587830104436; Fri, 23 Jan 2026 07:13:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIpH-00025G-Fv; Fri, 23 Jan 2026 10:11:55 -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 1vjInU-00078G-DV for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:09 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInR-00036v-Ts for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:04 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-42fb4eeb482so1581491f8f.0 for ; Fri, 23 Jan 2026 07:10:01 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.09.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769181000; x=1769785800; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mP+whJkVyK+SSs6Mqc5tBKekpoTk7ckeOTEMEVQCY7c=; b=NDRk5GDKkxY3hWkbfcRfxV+cGZvu+X/mfIZnqMsbJXIKLQmDoXQz3bHqKtrl3/11/U hvXzcK8EYEpN3ym1W8Ne9DO+H0WCQ4Z/lPN53hOOmWElhZ8Vsto3o91ILr8RmChBaXcn xXpE/SGnQa0C7vk5TfQQbQoQ8rlmfcxcef7VEsOF3r7p55yG+hzx9+7sRcml6q+rG1pI GZ90KKCIKD8K5g64AQnolHHj+xDr98ySyTo303b9t+hmNAFC8vOiApxaQ3vvOj6R87in 0re/h/R7td1sDMaK3yUpPrYe8bEBdgcq3yA227WpO6eIelxe8Gk42acRH0kv6N+xdSlZ JZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769181000; x=1769785800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=mP+whJkVyK+SSs6Mqc5tBKekpoTk7ckeOTEMEVQCY7c=; b=vFR9ok9mjZN/vPjE6MNJO/V617VEeXqhheYLwunGClahpReVrJVq/uGo1RxtO9eTid Eohqa0zzrezU0MaS4P+amwnf1aLJENllnL0xWvSEwFt0S5CYo4USsyLGE74qHFkf48GV fT+K6igw3GO0ALiw3CBYNBR/Pbo6YPItnWci+WD93k76U9uKWqrHEfcclldijP7hMncb X9bLJGDQfQdDq9wXIue71NbsEXdtxy1JWzLzvrbdpfII0PgLIYrz0fJS42N9qxUl0a62 C+CdSftOoZflsd0+CoTUrian7ShOMETu5kYNUv2zVoxyTdblEho0rcZf+SSRxj/WaFtg FYOA== X-Gm-Message-State: AOJu0YwPoVG1FFWTT+JKHN5k/Wl0mXlD/MVWhxh3o/Cq9Wj3kx8eHRy1 zgBMWrNAJUgeFZZEyct9MuM3m4/y7wh61xSs+dpz06xLhlhIWWuLdKtsBgekSIACetUQxdWOV5p okXM15PU= X-Gm-Gg: AZuq6aKDynzbotTbfKHdgLTS7gTuEoAbfO1Bo/PfeXtzuh2HDRMUnO1Q5D0XP3SOV9z iFuHbJfgRxTkQtK8SgB7J0X3/3Y0bQhfSMBuWi5C6UgY1twOZcuEeDedQorsN2c60Ejjp6XbtZ2 2eGIF/6XGiIZ9wQL1cv7Fw7CwQHz8RhyRFlNPpF/DoD6hTOjwMogy0R9UXQ9GS8yI3UJVLI91BV Q/cF835o4kvWOyBRRfv4q8ItwY2YVTJTbDaD4xmUKV/KwJS+OquP3Ycz8v6V8RqKzBjcbpGWAPF vH84Iyjbf5xZdfnV39gU/m2vzQ/A121p8fP+tX6z9ymDFe84hN/XfQG7nqHoEQ6RqSIZeY2/SXy fYax1Q8o/GbDIRPPJN8dBUxwuAu/W6/BkBNyDS184Nl+9mTGr9JMjE1k5v7boHwiumy0w+jFEpo N2S1zZUYZnhBJw4W0jw4vRhhN4JAZ7jCU9izJMN0UisoRDFRoLobSn X-Received: by 2002:a05:6000:288c:b0:430:fd60:93fb with SMTP id ffacd0b85a97d-435b160378dmr5408499f8f.32.1769181000246; Fri, 23 Jan 2026 07:10:00 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/22] docs/system/arm/xlnx-zynq.rst: Improve docs rendering Date: Fri, 23 Jan 2026 15:09:37 +0000 Message-ID: <20260123150941.1877768-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, WEIRD_QUOTING=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181231184158500 Make some minor improvements to the rendering of the docs for the xlnx-zynq-a9 board: * use a proper hyperlink rather than a bare URL for the link to the reference manual * drop the hex address of the SMC SRAM: the bare '@' is rendered as bogus mailto: hyperlink, and the information is not very interesting to the user anyway * expand out the abbreviations in the list of Cortex-A9 per-CPU devices * correct the bullet-point list markup so it doesn't render with odd highlighted lines * capitalize 'Arm' correctly Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Zhang Chen Message-id: 20260115142629.665319-2-peter.maydell@linaro.org --- docs/system/arm/xlnx-zynq.rst | 51 ++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/docs/system/arm/xlnx-zynq.rst b/docs/system/arm/xlnx-zynq.rst index ade18a3fe1..aa37df2926 100644 --- a/docs/system/arm/xlnx-zynq.rst +++ b/docs/system/arm/xlnx-zynq.rst @@ -4,32 +4,35 @@ The Zynq 7000 family is based on the AMD SoC architecture= . These products integrate a feature-rich dual or single-core Arm Cortex-A9 MPCore based processing system (PS) and AMD programmable logic (PL) in a single device. =20 -More details here: -https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Zynq-7000-SoC-Technic= al-Reference-Manual - -QEMU xilinx-zynq-a9 board supports following devices: - - A9 MPCORE - - cortex-a9 - - GIC v1 - - Generic timer - - wdt - - OCM 256KB - - SMC SRAM@0xe2000000 64MB - - Zynq SLCR - - SPI x2 - - QSPI - - UART - - TTC x2 - - Gigabit Ethernet Controller x2 - - SD Controller x2 - - XADC - - Arm PrimeCell DMA Controller - - DDR Memory - - USB 2.0 x2 +The SoC is documented in the +`Zynq 7000 Technical Reference manual `__. + +The QEMU xilinx-zynq-a9 board supports the following devices: + +- Arm Cortex-A9 MPCore CPU + + - Cortex-A9 CPUs + - GIC v1 interrupt controller + - Generic timer + - Watchdog timer + +- OCM 256KB +- SMC SRAM 64MB +- Zynq SLCR +- SPI x2 +- QSPI +- UART +- TTC x2 +- Gigabit Ethernet Controller x2 +- SD Controller x2 +- XADC +- Arm PrimeCell DMA Controller +- DDR Memory +- USB 2.0 x2 =20 Running """"""" -Direct Linux boot of a generic ARM upstream Linux kernel: +Direct Linux boot of a generic Arm upstream Linux kernel: =20 .. code-block:: bash =20 @@ -44,4 +47,4 @@ For configuring the boot-mode provide the following on th= e command line: =20 -machine boot-mode=3Dqspi =20 -Supported values are jtag, sd, qspi, nor. +Supported values are ``jtag``, ``sd``, ``qspi`` and ``nor``. --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181403; cv=none; d=zohomail.com; s=zohoarc; b=Knwsn19mWg7LpeZhZwOEe26baVPKeki2rF25cCzEkyJJudQuU8Gc71kBLnqF6O59wkryotysIBzzV+fLszZ2SL9cuEp0kuUmDrtjIsyx+vGug6JVNGuftsKxIb6e4HusBqGCuoJwj9gOVZ0pgGuFzCFQZ376QQpFpC2J+6wCMEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181403; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=p02jhIrgK2AlS8/sbyLkAFwAYh/TNkGIGrDj8xF3nHM=; b=iHyUfDXbIBgZ0SvXz3acSefkcc7ePuW/7WnruP3dYgMs/c5mYggXizMJH2LhzLQHEUUk4H40WIA3OmgPPJ51w4qrxFP+jeJfyBQPp5hYNZ4+m6QkE22uT/uEeHRHZ/sk3GVE8DLx+6Jw7Dq9xB6liJQ0m53UGkIDYWVCvl4Qb5Y= 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 176918140307316.525429169505628; Fri, 23 Jan 2026 07:16:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIpF-0001iB-KD; Fri, 23 Jan 2026 10:11:53 -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 1vjInW-00078O-4g for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:14 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInS-00037Y-WE for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:05 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-47eddddcdcfso14171195e9.1 for ; Fri, 23 Jan 2026 07:10:02 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.10.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769181001; x=1769785801; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=p02jhIrgK2AlS8/sbyLkAFwAYh/TNkGIGrDj8xF3nHM=; b=b36s7vd6k4h4/r8lXWHw7up2/9fI0TQWk1XBGk8CkCon2uxHx+3ICA6lxVAxxc8D4j AJDtnIhy8JbVisVLMLEAn0AvN5F3b0d0Hs9KsE75Ia7TcfYYFrBALcpjxmUz5Pe6R281 /S4YWCE+iUzKEY+d/A1ajX/rWHKW20s1D7kDE9d+S4xIWSDXcXplEedq3YaXZ6csvjJS s8zBVpbvF1ch7bc44R3Zhs3VNBRLJTs/gQZvMHWWahU1NnZwJ/8rU+nyDFLtk5QcEPBa 5kRKySKRaANaLSC43bDgxCC3d6EcFJw+BkwQb/RFVFR2fDZQzB075+ae31OWhQpObYjf +nnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769181001; x=1769785801; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=p02jhIrgK2AlS8/sbyLkAFwAYh/TNkGIGrDj8xF3nHM=; b=iUafxMI9JxKFeSscxR5f06IJ/DvAmbi8KhoJ01uWC36CgeJ2bFW2ICCGOxZbCMvCnO znRtPwmc903ASzpVLGJQMI9ZTIFPOzYzDRoBOK+y9CKuNYR5UgsOEwJXSpoPFsEYSFIO Kguwn+Qh3c+24Z3VXJxEYZ+qSE0dVKJslKsHifuw3m4LMBzGt0YI5lwYE/Ebeu3SBwDz FrXG4CSPBMJ59cd/DKkfgNO7bbcQWbfzkAp2YwoSD3lXZGZRe70wG2nc6XZvSMRIQ7pv DvHiko24GeIvTg067GNyqkOZUEcsITcEG7Fqs2XDFnuLhEBv71EUg6lqwzfArWu77kt6 s88Q== X-Gm-Message-State: AOJu0Yx6TDh4k3rqsc2dln+IlMwMl6zn5M/RGvPTXyxKdK3V8WRCVRtz oGmWc6QTfx9EqC2wNO9Y2Chqvlvp2t9GZbvumy2/3zCO9/Zow0htzIo8KrF+OE1iYwakJ1wGKXE i5yGxT2s= X-Gm-Gg: AZuq6aIkHMiAXrPkDPMBDVfJvamsJID4UvJNqZLtvswZJiIM+wUQJot2WQo1C7nPZLw 46gg3UYgS4yushwXFVgxUg4Cwy1MgkKn1ZdRFthBsITsB6MItx3x1tYhA64eqhNuD9pIjXtTR2d 5B7yA+7aKZ+8Y49ypitG4F0ZXnvDEnSDeqIG5bPWOgu+Vs5rhfG1GtErkK2hG7hKVKYAXjw4Mc9 0ysxrzJItsJo87AJYtJnTa4v6AknPW8GtxFxk34x/u5ffnMDgDJwR1LiNHtvvsDkH/fTxbRAn0G Sm7DbUBrfnWaDKo/vsViq/Hqstlhof0CVaC5uB0SP9TJ1Olz1EUej8EhPiu6NLWkpkUoQeXxpmI 73ijxl1ucwxNapI29lQrxbbw00gdC0nAZWbu2vsJd9gVeV2hRygGJyffvJIhDsJ1LWJgkvxuFBf reQtQNWTzghcVQhRjzLiwcluWJcDnbpj/1x6/7UG2me7L0Z4yrRod/ X-Received: by 2002:a05:600c:1e24:b0:47e:e946:3a72 with SMTP id 5b1f17b1804b1-4804c9beb33mr47302985e9.27.1769181001161; Fri, 23 Jan 2026 07:10:01 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/22] docs: avoid unintended mailto: hyperlinks Date: Fri, 23 Jan 2026 15:09:38 +0000 Message-ID: <20260123150941.1877768-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181404250154100 In rST documents, an '@' character in normal text or a parsed-literal is assumed to be an email address and will result in a 'mailto:' hyperlink in the generated HTML. In several places we have mailto: hyperlinks that are unintended nonsense; correct these by either escaping the @ character or making the text use ``...`` preformatted rendering. This commit covers only the simple cases which can be trivially fixed with escaping or ``..``; the remaining cases will be handled in separate commits. Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Zhang Chen Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260115142629.665319-3-peter.maydell@linaro.org --- docs/devel/submitting-a-patch.rst | 2 +- docs/system/device-url-syntax.rst.inc | 4 ++-- docs/system/vnc-security.rst | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-pa= tch.rst index dd1cf32ad3..5ccd09a397 100644 --- a/docs/devel/submitting-a-patch.rst +++ b/docs/devel/submitting-a-patch.rst @@ -18,7 +18,7 @@ one-shot fix, the bare minimum we ask is that: =20 * - Check - Reason - * - Patches contain Signed-off-by: Your Name + * - Patches contain ``Signed-off-by: Your Name `` - States you are legally able to contribute the code. See :ref:`patch= _emails_must_include_a_signed_off_by_line` * - Sent as patch emails to ``qemu-devel@nongnu.org`` - The project uses an email list based workflow. See :ref:`submitting= _your_patches` diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url= -syntax.rst.inc index 43b5c2596b..aae65d138c 100644 --- a/docs/system/device-url-syntax.rst.inc +++ b/docs/system/device-url-syntax.rst.inc @@ -33,7 +33,7 @@ These are specified using a special URL syntax. =20 .. parsed-literal:: =20 - |qemu_system| -drive file=3Discsi://user%password@192.0.2.1/iqn.2001= -04.com.example/1 + |qemu_system| -drive file=3Discsi://user%password\@192.0.2.1/iqn.200= 1-04.com.example/1 =20 Example (CHAP username/password via environment variables): =20 @@ -79,7 +79,7 @@ These are specified using a special URL syntax. =20 .. parsed-literal:: =20 - |qemu_system| -drive file=3Dssh://user@host/path/to/disk.img + |qemu_system| -drive file=3Dssh://user\@host/path/to/disk.img |qemu_system| -drive file.driver=3Dssh,file.user=3Duser,file.host=3D= host,file.port=3D22,file.path=3D/path/to/disk.img =20 Currently authentication must be done using ssh-agent. Other diff --git a/docs/system/vnc-security.rst b/docs/system/vnc-security.rst index 4c1769eeb8..97e94ff407 100644 --- a/docs/system/vnc-security.rst +++ b/docs/system/vnc-security.rst @@ -182,9 +182,9 @@ When not using TLS the recommended configuration is This says to use the 'GSSAPI' mechanism with the Kerberos v5 protocol, with the server principal stored in /etc/qemu/krb5.tab. For this to work the administrator of your KDC must generate a Kerberos principal for the -server, with a name of 'qemu/somehost.example.com@EXAMPLE.COM' replacing -'somehost.example.com' with the fully qualified host name of the machine -running QEMU, and 'EXAMPLE.COM' with the Kerberos Realm. +server, with a name of ``qemu/somehost.example.com@EXAMPLE.COM`` replacing +``somehost.example.com`` with the fully qualified host name of the machine +running QEMU, and ``EXAMPLE.COM`` with the Kerberos Realm. =20 When using TLS, if username+password authentication is desired, then a reasonable configuration is --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181403; cv=none; d=zohomail.com; s=zohoarc; b=cMlguE461lZ2DcaHyricW5I5ypR9qmsxqjQru0hwbBc/8SQgWXhZ4qffxali1aD/z6tXiawnG6ml14I534oWgFZU9G8G61DtDmQa0Pe+Ocdp3D+n/is13ntEsHkseiqPq7s62j12n0h5QEWpcSOHjHeB2zVB+GQzOGklqrSyqyU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181403; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/fXCaA5bXzHvSSDa/5l0SGDQ+8xhd8q1UpBSEVCLj+c=; b=YGm2gAsZJD0pWjXYSpDexiNK6s03buGDpjvlAvd7CwDgmGTIUt0wm+Di6It5B2R/ugeJnNYNw06iXuGPsY1jw8OqVWKbgYK2tVRF/WiVB5W8vbH+k3YElA9R60CvtPgMEtYnk24a+nQyMyBeFbGzIoLqdt/tZEa9uNhbFt549ow= 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 1769181403704373.7945786981081; Fri, 23 Jan 2026 07:16:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIoA-0007ml-HG; Fri, 23 Jan 2026 10:10:48 -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 1vjInW-00078P-4d for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:14 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInT-00037j-S7 for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:05 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48039fdc8aeso12306225e9.3 for ; Fri, 23 Jan 2026 07:10:03 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.10.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769181002; x=1769785802; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/fXCaA5bXzHvSSDa/5l0SGDQ+8xhd8q1UpBSEVCLj+c=; b=a6Xw2ju8Fd7ER1PiQFzfNVNntF15C++7EJq/NIo/XLuKqzzVyrp1NhnDVwtyhpBQOb sT2tfmnDBnkVghsUC5iGN7rjm94HVwsHKJw0pnWZhoaPhYpCo0glI0oVczSlt+yYPZJE XVFeAqgbC19WwKfXHotbgk++tI7s7Fe4BHIk4s5COJdPukBtAWgzoi7b3KDLo9Hp5BKG g2zm4MBtbLekA3e3Apu7F/LzwZHIOuRo4AT4Md3tdKLy2IWLRy97Q/Hrlom6/SSIoz0P m+QoKlnjRxolUk2yIeztXhj+rC/QTH7DGpYHnBvu2aH4Y7bkW0GT5MIYkSxS49LwXnZU lnBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769181002; x=1769785802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/fXCaA5bXzHvSSDa/5l0SGDQ+8xhd8q1UpBSEVCLj+c=; b=GHL/2bPygGZeIzlsVNKj94Wj4OvnH04GVRymntm0f8C7NHMXx1Bq53UlaaekeDrVNy tnWEp1Ll6wzkpqT0FhvrzJYNeFX3zNZUeaGs9+b8IuWs8oDOck+pi5C5emrcv15Wa+30 oJUitPOT/h5/wuffZkEONwZ4LS62RrHM6T9oze767iBQKQxLPF67HAS5AAuUkrebVDxt wu8+y+V0SLUGmSHEN92pmQnSX5ZoTzcWXr4ihdLAsKpQxq+ZgWv7DzB5gcP0ERlseaD8 zLsSiprmvMn8/LmwFhWDMIht1tXxvUMYyWWfycariIGjOJ3Y38zGiC4CMMZlGBltRopp hy5g== X-Gm-Message-State: AOJu0Yxhi0Lmd73TaRJBTQwAqSO1v6jUuJ/Wzma+AW/FKv5WEhk/TWfq CLYLvv2IKuCAlbDGL7wHFyzFPqVhVU5xu2TUkLYT/ovZ/X7JmfFyo2XhfBT2lWekYJa1LKHgA9d qOfj0h70= X-Gm-Gg: AZuq6aLtwVQDZLM1m54WlNh6P0oEZixWK2g0MYvSmj6nG9gVA2pat0mlhHmN2Hi8/c4 kIxDPTFwDlZvPTWkIIZUxSrCCtQhLgOLrVF+vgWxq7S/rlI4Dd+YV+mJ9uUh6DreHzaMJG3w/Vn r+UxIrnU75/NMnQXBkjhIvAvNNQG/Y2zbR+/IS0JSY+/OIqheGeoU8uTAN+KvLC0vP5VpNpgPam gCou1K9zlgCzZNOizBktXB3pESQ8wIr3a0QrpyZBfPhG/thV7mjnSXEBjeaPGrSC7Qj4GTwTUjv GtKQsTfe5FMCPnQ9f6Tg4nlWrV+juHYHHMASAKc7WjXt2alQasCk8g3kok9S6UZKYChuYrHYwF7 23vgNrziZBV5MuhdmN2NASHnDLCx2ncEb69Q+tHsiUgrv8lenczCSLBqEvOpvI1tUqQPae2o6Q5 fFBCDJvDiaykL5Tu2B+P6D+SPbDdHgPAgPzyLMpWHXp4Asu5IUKlse X-Received: by 2002:a05:600c:6814:b0:480:46c6:bf4b with SMTP id 5b1f17b1804b1-4804c943ea3mr54058645e9.5.1769181002041; Fri, 23 Jan 2026 07:10:02 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/22] qemu-options.hx: Drop uses of @var Date: Fri, 23 Jan 2026 15:09:39 +0000 Message-ID: <20260123150941.1877768-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181405968154100 A few entries in qemu-options.hx use the syntax "my-option=3D@var{name}" (or @var{} with no name specified) when documenting an option that takes an argument. This syntax isn't consistently used, and the documentation generation has no support for it: it just appears literally in the HTML output. Switch these uses to the more common "my-option=3D". This also doesn't have any particular support in the documentation generation and so appears literally in the output, but it is a little less odd looking to the end-user. The other common pattern we have is "my-option=3Dname" with no marking at all that the right hand side of the '=3D' is not literal text; using <> seems preferable to me, as it makes it more distinct from cases where the right hand side is documenting that only certain values are permitted, as in "my-option=3Don|off". This patch doesn't do anything about existing uses of this pattern (except in one case which was so confused as to use "my-option=3D@var{}" in the --help output and "my-option=3D" in the RST output, where we change both for consistency), but prefers not to add more of them. We don't change the uses of @var in the colo-compare documentation, as that part deserves a slightly more wide-ranging overhaul that is better in its own commit. Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Zhang Chen Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260115142629.665319-4-peter.maydell@linaro.org --- qemu-options.hx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 455b8be890..862b6c7661 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -36,7 +36,7 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ " dea-key-wrap=3Don|off controls support for DEA key wr= apping (default=3Don)\n" " suppress-vmdesc=3Don|off disables self-describing mig= ration (default=3Doff)\n" " nvdimm=3Don|off controls NVDIMM support (default=3Dof= f)\n" - " memory-encryption=3D@var{} memory encryption object t= o use (default=3Dnone)\n" + " memory-encryption=3D memory encryption object to = use (default=3Dnone)\n" " hmat=3Don|off controls ACPI HMAT support (default=3Do= ff)\n" " spcr=3Don|off controls ACPI SPCR support (default=3Do= n)\n" #ifdef CONFIG_POSIX @@ -100,7 +100,7 @@ SRST ``nvdimm=3Don|off`` Enables or disables NVDIMM support. The default is off. =20 - ``memory-encryption=3D`` + ``memory-encryption=3D`` Memory encryption object to use. The default is none. =20 ``hmat=3Don|off`` @@ -180,7 +180,7 @@ SRST =20 -machine cxl-fmw.0.targets.0=3Dcxl.0,cxl-fmw.0.targets.1=3Dcxl= .1,cxl-fmw.0.size=3D128G,cxl-fmw.0.interleave-granularity=3D512 =20 - ``sgx-epc.0.memdev=3D@var{memid},sgx-epc.0.node=3D@var{numaid}`` + ``sgx-epc.0.memdev=3D,sgx-epc.0.node=3D`` Define an SGX EPC section. =20 ``smp-cache.0.cache=3Dcachename,smp-cache.0.topology=3Dtopologylevel`` @@ -4530,7 +4530,7 @@ DEF("compat", HAS_ARG, QEMU_OPTION_compat, " Policy for handling unstable management interfaces\n", QEMU_ARCH_ALL) SRST -``-compat [deprecated-input=3D@var{input-policy}][,deprecated-output=3D@va= r{output-policy}]`` +``-compat [deprecated-input=3D][,deprecated-output=3D]`` Set policy for handling deprecated management interfaces (experimental= ): =20 ``deprecated-input=3Daccept`` (default) @@ -4546,7 +4546,7 @@ SRST =20 Limitation: covers only syntactic aspects of QMP. =20 -``-compat [unstable-input=3D@var{input-policy}][,unstable-output=3D@var{ou= tput-policy}]`` +``-compat [unstable-input=3D][,unstable-output=3D]`` Set policy for handling unstable management interfaces (experimental): =20 ``unstable-input=3Daccept`` (default) --=20 2.47.3 From nobody Sun Jan 25 10:15:39 2026 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769181343; cv=none; d=zohomail.com; s=zohoarc; b=Vn2vIwhzeKdLBt6gB9UIP6Jm5qbwP11Vd99Ir/ISmb7tfCdNpColU7DnbRx4b7xXLGqmgikA+hvqX48PjL4Cf0srcvTS/9T0D3NpReXNgnKxnNTFy0eH/th+vovu0uFjmKHyj+/xRTmNv2AqjjksVPfh45gIUYI65c8bN2j7xjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769181343; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=yGwNzjlczVKCMAyj5rVvNgbSDpwbzU8o5quzCmk6erU=; b=dr0QF31A5vyt7jFcrzy35TXYSW5jEiMNB8JAmL/mnHSv8mRMTI8IXAW/NYWCKJsnOxrXzTK0caUGwRQW3gVp2fmfMWvdbAqKCEm7w9K0OVvY6efrMLjHUN5O5wD8Njz8T/hDFD3rcLNuGwWHNk23XlaCW/f7BviJJyeC7xF5GMQ= 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 176918134319776.37809362442908; Fri, 23 Jan 2026 07:15:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vjIp8-0001L8-4h; Fri, 23 Jan 2026 10:11:47 -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 1vjInY-00078T-1d for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:14 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vjInU-000383-NK for qemu-devel@nongnu.org; Fri, 23 Jan 2026 10:10:07 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-42fbc305914so2028365f8f.0 for ; Fri, 23 Jan 2026 07:10:04 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435b1e71503sm8255641f8f.25.2026.01.23.07.10.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 07:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769181003; x=1769785803; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yGwNzjlczVKCMAyj5rVvNgbSDpwbzU8o5quzCmk6erU=; b=pfXdrGX3bHgW2A8ykwCIxXqMSlz7HVFq/LhPxejiAXp0PQj0GGDOGu55iPTU+CwK17 TVXdgGUD/htopV0R0mb/V21tEajzgSKSzu8jFm8pnRkLGHLiC0ze71++ZtDl3lFLmAtF DcOEQD90r3L/gK6T0pmgieSbKfmO/YBzVEHFJYp9lU7w5QWLUtL88u5PyiLWXEHLthVR iXDkTD0WA3qOnKTsknTuZIfSOpcsnmPeKGzMS0m4T8jIa1eEtjOGm5k5e/6OMo8GMwep RkaLa8Xe6h8BRqRSGxvTkez9JxY5R0pX0Fdb9ibErM92SAh+THtX5PMuP49azufN7Vi9 APDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769181003; x=1769785803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=yGwNzjlczVKCMAyj5rVvNgbSDpwbzU8o5quzCmk6erU=; b=AoMmA/iZSn8fntlIlheRFYdQeLSMa+4G/y+6lCJMaEH8ht6nKPQ1maUszSUiMr2/ae CiuzA0cZRBhCPAZUOkQNbwu4dQGu8Xi6kL7bz/O8+BV18SPYHTqdajJrIMD1CyE+E8pt 5UIngxl+sbSIFH4A3U8bATCi8vpylE6xRfXAN5B+/baw9OvQfwh9g0dLGAatHNt2HvCy y26sZNNaN/cCP0Q6l1Ylr4GnxUPxWlCCGHJe8csMZtg4O0iP4upU/Bjnrq7o9rZjcz3Q 7J7JKiMleuJO5SGczJX/HYdP01yXKevC+kXKpYFeVfcNKU3Iz/924Hwe2gzdu/4PqCBo UKAw== X-Gm-Message-State: AOJu0YwaeRpmS2oFduqaccjssqqrQvsreYND7IeQWj/D7uLVqfZ0wxNv 9fkZ8bul/+nKpj4Q46z7UrEHa6Cc04sY0g3sdG57+pkfGTdcNc2W1xWzy6jaEBv4aHKntMq0I1P K8myuV4g= X-Gm-Gg: AZuq6aK3zycJ1V/CfGRhFs6FOWw5d8WPSlwDH4lfZWurHYZHmmA4ZiA66z/l6J6pheQ nhw1oQ29WCy/EXeLLjVoFFkuU/amoXAT+Janj4qyhIBfgjBAR0NzHmJEHc7A2eONkqD/fNFpA72 sagmsHTjRTA+001AYTy0EbwHpu+bJyL9W4FlvxC1HiJOnly1uxN4RmyukDidA0gxWbIX+t1037G SqYtr7NlvElXaUQHZiaDVpEPpG38ETf29xQDBuZvISgYFP2zc6L76TZKmHsz6x9jR4Oe2l+z7RP CSpXKEizXgRa6ZqP8MpkRD7UIJfHdqhkqld2C9QTKs+K6oKXlGezTUisQBr06XFSRVq3Es5kA+7 fCKU4KuRxdj69l3pn6rvF2STV6Sjo3ua3wkDg5SNxYDQFVKhklyqjuWCaafbM5Ff/5Hhj94fAdR c6g/+1m/4TfjOlaDbnjFsZ2k46aoXdzTqgskhT9vO2eNzYcbm1AD3T X-Received: by 2002:a05:6000:2211:b0:435:9691:d525 with SMTP id ffacd0b85a97d-435b1588264mr5100058f8f.13.1769181002929; Fri, 23 Jan 2026 07:10:02 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/22] qemu-options.hx: Improve formatting in colo-compare docs Date: Fri, 23 Jan 2026 15:09:40 +0000 Message-ID: <20260123150941.1877768-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260123150941.1877768-1-peter.maydell@linaro.org> References: <20260123150941.1877768-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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=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: qemu development 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 @linaro.org) X-ZM-MESSAGEID: 1769181343799158500 The colo-compare option documentation has some formatting issues: it uses a "@var{...}" syntax which is not used elsewhere and which is rendered literally into the HTML documentation. The bare "@" sign also results in an unintended 'mailto:' hyperlink. Rewrite this into the style we seem to use most in the rest of the command line options, where an option which takes an argument is written as "my-option=3D". We take the opportunity to make the documentation a little clearer by splitting up the long paragraph and using preformatted-text markup for the names of the suboptions. Signed-off-by: Peter Maydell Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Zhang Chen Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260115142629.665319-5-peter.maydell@linaro.org --- qemu-options.hx | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 862b6c7661..bd014a3244 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -5972,22 +5972,31 @@ SRST stored. The file format is libpcap, so it can be analyzed with tools such as tcpdump or Wireshark. =20 - ``-object colo-compare,id=3Did,primary_in=3Dchardevid,secondary_in=3Dc= hardevid,outdev=3Dchardevid,iothread=3Did[,vnet_hdr_support][,notify_dev=3D= id][,compare_timeout=3D@var{ms}][,expired_scan_cycle=3D@var{ms}][,max_queue= _size=3D@var{size}]`` - Colo-compare gets packet from primary\_in chardevid and - secondary\_in, then compare whether the payload of primary packet - and secondary packet are the same. If same, it will output - primary packet to out\_dev, else it will notify COLO-framework to = do - checkpoint and send primary packet to out\_dev. In order to - improve efficiency, we need to put the task of comparison in - another iothread. If it has the vnet\_hdr\_support flag, - colo compare will send/recv packet with vnet\_hdr\_len. - The compare\_timeout=3D@var{ms} determines the maximum time of the - colo-compare hold the packet. The expired\_scan\_cycle=3D@var{ms} - is to set the period of scanning expired primary node network pack= ets. - The max\_queue\_size=3D@var{size} is to set the max compare queue - size depend on user environment. - If user want to use Xen COLO, need to add the notify\_dev to - notify Xen colo-frame to do checkpoint. + ``-object colo-compare,id=3D,primary_in=3D,secondary_in= =3D,outdev=3D,iothread=3D[,vnet_hdr_support][,not= ify_dev=3D][,compare_timeout=3D][,expired_scan_cycle=3D][,max_queue_size=3D]`` + Colo-compare gets packets from the chardev backends specified by + ``primary_in`` and ``secondary_in``, and compares whether the payl= oads + of the primary packet and the secondary packet are the same. + If they match, it will output the primary packet to the chardev + backend specified by ``outdev``; otherwise it will notify COLO-fra= mework + to do a checkpoint and send the primary packet to ``outdev``. + + In order to improve efficiency, we need to put the task of compari= son in + another iothread; the ``iothread`` option specifies that iothread = object + (which your commandline should create). + + The ``vnet_hdr_support`` flag tells + colo compare to pass the vnet header length when it sends and rece= ives packets. + + The ``compare_timeout`` option sets the maximum time that + colo-compare will hold the packet for, in ms. + + The ``expired_scan_cycle`` option sets the period of scanning expi= red + primary node network packets, in ms. + + The ``max_queue_size`` option sets the max compare queue size. + + If you want to use Xen COLO, you need to specify ``notify_dev`` to + tell colo-compare how to notify Xen colo-frame to do a checkpoint. =20 COLO-compare must be used with the help of filter-mirror, filter-redirector and filter-rewriter. --=20 2.47.3