From nobody Sat Jul 25 21:23:11 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=1783956791; cv=none; d=zohomail.com; s=zohoarc; b=DmkAyc5IWOYYvoESKL5OwpCAmzGJdD/c7WFGYbekT3xcCSDJFClEkwyefifuFsPUW+SBACc80yKTxTBHFd0BDJihON+USvWEVWNuh2uD2B2Hi9JgnXKNlsYJeImnxCsMiJCRltBGZmo+ZB9pfR2LeJrcnlsExM2osYGvJjV7duw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956791; 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=j/FNYb+MXYMHJHLPxbhC8lFmm+mlt3LYTkPOncRVq40=; b=NFUAV7gUpsvhJn71ZUtKGyteLX5rlFjZeFN8nUoN4g73Kkfe/M60EexUrPBaU6wSAB88JeQipK0qTFYfR5b1CMyj+YaSGVkIxQll+VnTmBkzzLGiL61dJ2S2kRVcJ3ZQLsqjsdSeN4MrkWN/Tvhye/0lof4lq68bYYKSaebCQ0M= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956791549494.90764444762056; Mon, 13 Jul 2026 08:33:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeG-0008Q9-3q; Mon, 13 Jul 2026 11:32:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIe8-0008Pi-72 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:40 -0400 Received: from mail-wr2-x02.google.com ([2a00:1450:4864:30::2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIe6-00015s-4c for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:39 -0400 Received: by mail-wr2-x02.google.com with SMTP id ffacd0b85a97d-4744516a312so526565f8f.1 for ; Mon, 13 Jul 2026 08:32:37 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956756; x=1784561556; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=j/FNYb+MXYMHJHLPxbhC8lFmm+mlt3LYTkPOncRVq40=; b=AfPfh1Zrik4xEOICCV5RlRKuneD2Uk27ZjUJyUiGA9FpyxGZnIhwBRkf+KEy7Rt4ij wj8JT71sOEF5AZrsKp0tc67Oz14D3ds6JVB0eWJsNmAsJz1YlyL45cUzuYNyC3debhL0 d+LN4OhO/xkRO5B9DGfQI1hH7AYONwglIB+Kio+0Zx8akpT1i3G6WEin7Cr1RGFjifcv I3kAdtzM90ilbAhR9rEYnzGKJup3ZUc0q3ydIK7Q5K/wTIaVmgc78gz9jeFRYabCYXsd 5SViiBxIoxEm0piXcbNlj9Ok2OrMZ1wkNDis+cIjAz7FACVRewNl9QsFr/98/bFod4UI s5Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956756; x=1784561556; h=content-transfer-encoding:content-type: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 :content-type; bh=j/FNYb+MXYMHJHLPxbhC8lFmm+mlt3LYTkPOncRVq40=; b=dfLPXBmTbMJ9MIoNK2dYUOuI9FcV6rdW7OM+g5ORfftc0mSLmmzCUizFaA2LEFN0Ni zZaz0V/+Dlx0GuYgKYjGT1RdbWs0zTB7T6lJrPRHTgDGeB/ns32MeCSOqbquSUlo1odo 8m+XC1XI8r3u2awHd7SwEpl7iwSUWfKCGzTIaeeD50YlAcirVZfPmHcdwxhuGZVMMNw5 smngKXmQm+ljG5/3OuB3TBhKD4nZOBpXAcg4J8M8Yv9BJ4LVmOzGc8rBXg4+dm6TsMP5 gOXoiyrJ3JkVhTgwEmHsahE+P4C5VSZVaEvvpTM5tfIG80Ltes0vat2/8PIiFGE7KOTp WIhQ== X-Gm-Message-State: AOJu0YyILaqKvyD1BzxTim1vQ7x0bwzxtqq+eH/vvUdeStgxiuG0yKgL nT9L6peYrC7kbhV+sH1jLzYC/QOUQbBQluoKIhT+GMBeoBPM7efrxG99Pny9/GCI0SLkluTWr2S bBG4ce45Hy/dU X-Gm-Gg: AfdE7ckBP6ko0r89JaRK1dAf1ndNJHRgFB0I3wbao6NMCPDD8YtdRMvLkOuEzp4E1pu XE/0DNe7Y57t5t7QKRc0d11IogBBE9Jix500XdwkrK+q4pVPljxoWHC3fsLnBvfWhXXKfcbEJiT i9fTHGfx5WG0jkAdUB3poXKEXWe5VXjhgHrMyhK5no2wPAYj48rWdULVmgGCjGRbTmt5PxLSKEh 8dPf/q4sOYH+wo6uRabLkdyT55aERYighsmMNW6Cm7FTGb7t6Whrw6c0F0hEMVbo3MI89KzJML5 8Ef4i/xTjFgCZ1QB1DXU0OEG3X8cuTwECsKNfllGkTGuadyXgzvxbFN+hxVKxUIi6QKJAXHUpgK mC2xNbw7Jf+e4VXlGLSYyuAw2gqQMDl23TLlPZI+WbAyjjzwqUcZ1ADjXBHmD926IHS/Uq1AM1Q hhdArrLO8zliTIlyHg5UVE6wyhj428KFl0QtylVz0ZLe7OxfCnNaT3Q/BDOQrKU/DiVBzWX6bCj b6OPhqE8MnEuc8btGUyxA== X-Received: by 2002:a05:600c:c8f:b0:493:ee34:d875 with SMTP id 5b1f17b1804b1-493f88bd7famr94758655e9.10.1783956756211; Mon, 13 Jul 2026 08:32:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/26] hw/misc/zynq_slcr.c: drop duplicate reset value for DDRIOB_DCI_CTRL Date: Mon, 13 Jul 2026 16:32:08 +0100 Message-ID: <20260713153233.3391818-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:30::2; envelope-from=peter.maydell@linaro.org; helo=mail-wr2-x02.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, 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: 1783956793415158500 From: Corvin K=C3=B6hne When adding a reset value for DDRIOB_DCI_CTRL in c8ba862dbfdc, we haven't noticed that a reset value already exists. DDRIOB is a 32 bit register, so incrementing it by 12 will access the DDRIOB_DCI_CTRL register. According to the manual [1] the correct reset value is 0x00000020. Additionally, c8ba862dbfdc won't work with a reset value of 0x00000021 because it tries to detect a toggle of the reset bit (bit 0). Therefore, we drop the old reset value and keep the new one introduced in c8ba862dbfdc. [1] https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Register-slcr-DDRI= OB_DCI_CTRL Fixes: c8ba862dbfdc ("hw/misc/zynq_slcr: Add logic for DCI configuration") Signed-off-by: Corvin K=C3=B6hne Reviewed-by: Alistair Francis Message-id: 20260707145407.70287-1-corvin.koehne@gmail.com Signed-off-by: Peter Maydell --- hw/misc/zynq_slcr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index 0ae5d607be9..d0f899c3be4 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -427,7 +427,6 @@ static void zynq_slcr_reset_init(Object *obj, ResetType= type) =3D s->regs[R_DDRIOB + 3] =3D 0x00000e00; s->regs[R_DDRIOB + 4] =3D s->regs[R_DDRIOB + 5] =3D s->regs[R_DDRIOB += 6] =3D 0x00000e00; - s->regs[R_DDRIOB + 12] =3D 0x00000021; =20 s->regs[R_DDRIOB_DCI_CTRL] =3D 0x00000020; } --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956800; cv=none; d=zohomail.com; s=zohoarc; b=hN8f8FCCpfIFNJTLH3FvBqYx+nDDRsAJcHmuvNlrIpA+KR9o1JXz7rg4Y7jfGVP8MsnNu/lJsP1qrTCG0y7OVHoyTq2XCoT2nTj0hfLvVtPhl/KBWGC94dV4NvK1S5H8Rqoc55iit3DNOBVeR/n7kT4SkWoo1pBj9i+M+aAOEWg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956800; 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=N4As0Neyy8YrD6FVFm9+Tt3dYT2Qlni3lX7+Dk5wYWk=; b=mbNHj7TJ7teNK5Td3j8QAGOoxHtxuQ1oMuVl3ASZQMcBUd5s8TZIWppipwouk94H+CLbfniMEzFW44INEyWi/20iB985bWAzckEQXLvsuQwED9ZABZmdO5BhjboBzQFfmNqox/70srCGqdT168AD7LPISBGtXua9JACKHcFfg2I= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178395680083377.49556157708832; Mon, 13 Jul 2026 08:33:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008SU-L5; Mon, 13 Jul 2026 11:32:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeA-0008QB-DQ for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:46 -0400 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 1wjIe7-000169-Tz for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:41 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-47df440fcd5so1793346f8f.3 for ; Mon, 13 Jul 2026 08:32:38 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956757; x=1784561557; 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:content-type; bh=N4As0Neyy8YrD6FVFm9+Tt3dYT2Qlni3lX7+Dk5wYWk=; b=pWW9u/Q4kZ5rgdKUZP/ozg5WRBCjv6xu2Xwaqf8MvvxyFR/cOAaEkZKQ2d5A/yQMly q85n63sytobUmOQuG/5VAPv4M9MJo3Os8/qMquz1P/Mf0ixMN8PyDK4eHQnQ+FqtGcZ5 /ecA/F2SMROj+oiECPMAfepIECKWCDGmZloWFzEKeZDGiKeM4Qk8k9sX27xSzlHSouru N3dNL0VeNW085j3gU85EHZN3ffL3k/Q6ckLnWcEkeXaott7uMNzZ++prFFfYCfFkLTLz wLW+E8BLnOqoHFBxLqc8W4onn70Q1rdLHSbJfkAC3Qy4T2r3fme6zLd7MfcZ+K0u3Ts6 Ai9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956757; x=1784561557; 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:content-type; bh=N4As0Neyy8YrD6FVFm9+Tt3dYT2Qlni3lX7+Dk5wYWk=; b=Ge4FbbEXC9Xbri8hJkbDW5FYMrG7KcfW5VvAU4Wu3KWJs8/R68HTAnjaFpoWdP9n7M pSQEoJqw4USkYKViFVwPdUSeaYFg7wHeufFEpTYbj0tE04onPC50zlkSD4iaVFBV9ugg /lc4JxjOHyi/fqS7gTJKZz4WHVngSOIMOogUDTmEJ6jUaOg/YOt4vJR6VoWGWdQafajU JQdq94dG3hV7ckqfKZXTrypB/q6ZWP8MRobAUwCvfy+S4brDw6MLstC2u942y9qT6d44 ZsazIzSyDzd4A4Lb6pUr0ARlVNNOUJnPKjgXYr5cxtL+JDYR3ob8lDIIQ4BdmJNIqcxv c4CQ== X-Gm-Message-State: AOJu0YxfBD82onA7UEujp5HxkP9jB1wW2piUqBUpBIv0VA6wBdRIhh75 RPI+oO+O0hx22xqf5hRG30AUvJ03GRiI23jPIour7G7V8+J1yDcIfX3p6n04k1Sz+VTgU/qJaA+ ZbhT8zHLGfQ== X-Gm-Gg: AfdE7ckahksdLp4qeDZZBRLZAGFzkYhO/Mm8aNKz6eUgw3IEXMkWHJfhtnT4HEOiUiu /etnAXzxNh6IR97ZpbdDE2lRYixc2W61pKLnx98zw9LuJUGVwJC3anLndBZJ/cwdTP7U+byhzZu jS4BK+SwLeWQuKvj657omXz3ErVUAE0dWFZar9+6Zm0oA4J+KVeIkMDji74YLcGlkFn/oXbF0Qq km+PFph1Uuc9NPIqvPUcuWE9qw0JS4QSsrv6/L0evlGyQ4LnQYKHOThLGquyYCeOrr+pEkXo4in +pudOPHd7GKmRKxAmwwde1/Vi9p6NVPg7yb37RHW/W7ciU4Q9VHHdifqipY/T5cfNY4Cz648Jrg Q9Vj9FCRnx153hKoH1oad/ucsIPbG5Tri3BJcA4LvB07UuX9cGXTmZW05xp8239kLQqnOJRPxqr RT4HkscEKwswOimiMrwh0uznn9DDRuUmoWUSPZDHJxbe+81ELz+qmWKkbpndYDub/e1cAbbBCay oGo74aI9v4mO/tXCtMAZg== X-Received: by 2002:a05:600c:348e:b0:492:40a1:1e16 with SMTP id 5b1f17b1804b1-493f87dc629mr96515855e9.8.1783956757215; Mon, 13 Jul 2026 08:32:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/26] hw/arm/tegra241-cmdqv: Do not sync GERRORN on VCMDQ allocation Date: Mon, 13 Jul 2026 16:32:09 +0100 Message-ID: <20260713153233.3391818-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956801441158500 Content-Type: text/plain; charset="utf-8" From: Shameer Kolothum When a guest hits a command error, the hardware sets GERROR and the guest acknowledges it by writing GERRORN to match. These registers use toggle semantics, and since GERROR is read-only, both GERROR and GERRORN may remain set after an error has been handled. As long as they stay equal there is no pending error, so a subsequent VM is unaffected. When a new VM starts, QEMU allocates the hardware VCMDQ and flushes its cached GERRORN of zero, while the hardware may still have both GERROR and GERRORN set from an error the previous guest acknowledged. This makes them differ again, so the hardware sees a pending error and stall the VCMDQ, leading to CMD_SYNC timeouts. Do not sync GERRORN when allocating a hardware VCMDQ. Fixes: 1d0f77535417 ("hw/arm/tegra241-cmdqv: Route allocated VCMDQ Page0 ac= cesses to the mmap'd host VINTF page0") Suggested-by: Nicolin Chen Signed-off-by: Shameer Kolothum Reviewed-by: Nicolin Chen Tested-by: Nicolin Chen Reviewed-by: Eric Auger Message-id: 20260707112450.111178-1-skolothumtho@nvidia.com Signed-off-by: Peter Maydell --- hw/arm/tegra241-cmdqv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm/tegra241-cmdqv.c b/hw/arm/tegra241-cmdqv.c index 7223aa9d1d9..273633e6293 100644 --- a/hw/arm/tegra241-cmdqv.c +++ b/hw/arm/tegra241-cmdqv.c @@ -212,7 +212,9 @@ static inline uint32_t *tegra241_cmdqv_vintf_lvcmdq_ptr= (Tegra241CMDQV *cmdqv, /* * Flush cached register writes into the mmap'd host VINTF page0 after a * successful HW_QUEUE_ALLOC, so the guest's earlier writes survive - * the cache-to-hardware transition. + * the cache-to-hardware transition. GERRORN is intentionally not synced, + * as overwriting it with the cached value could recreate a GERROR !=3D GE= RRORN + * mismatch and stall the VCMDQ. */ static void tegra241_cmdqv_sync_vcmdq(Tegra241CMDQV *cmdqv, int index) { @@ -229,9 +231,6 @@ static void tegra241_cmdqv_sync_vcmdq(Tegra241CMDQV *cm= dqv, int index) =20 ptr =3D tegra241_cmdqv_vintf_lvcmdq_ptr(cmdqv, index, A_VCMDQ0_CONFIG); *ptr =3D cmdqv->vcmdq_config[index]; - - ptr =3D tegra241_cmdqv_vintf_lvcmdq_ptr(cmdqv, index, A_VCMDQ0_GERRORN= ); - *ptr =3D cmdqv->vcmdq_gerrorn[index]; } =20 /* --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956919; cv=none; d=zohomail.com; s=zohoarc; b=SZcwJEXmKKTSMm0wPI7pLXcVun4XIIpJ1NbGnvO2HlO35OdKjtJxuYA1hpj5eiOrKpj4KPirtNgKiUo5tOSqKm8TSr94n27yLGhKPSMx/n96ajr0bU5q7eOUOoiVazhcaT+0pz1tApnYIcbwLQ9BZMB97JTGJlwCMm5lQ+LiB1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956919; 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=RylEd29WcoS/OyUEgnd0qftfI8x/CGruWSkN5SctWWY=; b=YbVOl4Rs16GxQ7EZ2rajTc6EP7aYovuOGt+Y3zr2Fp/DfwOeFgsKhPuRxJsHdDR85IbieptUpmLuoAiGG1wMO3Nealvsa/egtzBP6NfF9Y04i2eqFUIx10LWQ3PDSs7uSuG9XmeG/S3D/kRa8C0jTrXPzgi/07BA5CNBsXrjYw8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956919812689.7507918257138; Mon, 13 Jul 2026 08:35:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIec-0000Fr-4U; Mon, 13 Jul 2026 11:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeC-0008QQ-60 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:46 -0400 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 1wjIe7-00016T-Uc for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:42 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-493e8d4f4dcso26321285e9.0 for ; Mon, 13 Jul 2026 08:32:39 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956758; x=1784561558; 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:content-type; bh=RylEd29WcoS/OyUEgnd0qftfI8x/CGruWSkN5SctWWY=; b=y7G8XLPaM3IbMi7AVcgugCNVXTdum0gpHkByaZhpJ9XzlL1azGPLzbO0AVJz/8Qp6E hu7ZBZZVeK9uaNIa0Z+HsT+8W5fQirqFVrKgOpIpXWBgUZ6xowp7cuTJE3xkBdTPoVbb KwGnBauYiWqNPF08w1v9oK4QhVWOkCxDIeeeCY4zzULQkprItrlm6Fvw5ETX4zw19OnD e6Y2DKOhcbq5p90xeWBaC2lh1KNvHuBKRD0/zZnc+CTtDCRcjDPtZG1n7mv8FvDdPvK7 ksUZFiH4zu0/v4lpc9E43U5jaWolcxD8Bj7oUW8p8uDD/d5ILEU+bvk0MfILTEd/w/8M ubbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956758; x=1784561558; 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:content-type; bh=RylEd29WcoS/OyUEgnd0qftfI8x/CGruWSkN5SctWWY=; b=XhlR/W7cK6PFd93ikOQwQvEXUnKclRmsZm+jajpNd0YcOjNVhPbNdfubUHiKwUTuHs /tJolPlFtW6JPMgY5R20B53Zk/FK0Q9j08XsDCZ1UZdj9nOI+VBNWjtF4TvgvLAQWx87 v07TPfIdzVdh8ycUFumRxr02U4Eu05oR3yu0AKReClGCtrH9vRZdCWp2NS7sdGb31Xh6 GexYxxQxBQF6B1vslafU3z41ASil9xqYOOUZ8U2NEOHdCpWCc8eYsdaUo1XcYjf2KtGr lSKfa99Btnelqh5UwHUosg7WXoPyFrh55MFonxloqhK5d8OFE0EV+mhbG8vU/jTRFduC Kanw== X-Gm-Message-State: AOJu0Yw6a3n/aoQyf5qbt9JhLogv3TaSEWyPoOyPX/EoLxUEFdnjYa0A hV2Zgt51aLgw7NGSQcqE2Sh8gCfhKPT3RKl05HquEhM6yYmbDCMovY00aV8fcSceWEQz0mklJyV ZJXgQivDe4w== X-Gm-Gg: AfdE7ck8bQXlzRb/pk7pZA/PSDfonL/Hnt1ErsPGp/Rp8g1SDJgQAKTcv/y1NtoHLx4 AAw3m2NS6eD+HhoPOd0mvgAZNaeWxZiETN3c5vFrrTHPBC45D+84sWznn0xhlTQZW7vFurNsKS7 MxiAIxnMxy87NftJXoz0J1N7D1mOOswlnvfTEzeW3LW7Gpe9v/27EvahFsrteI8bnurwzkCYeNf a9Z5zQ67r6M1Spig5kjTif+S6MOlxpsmihal2Pw+3Z+fO/QntneVPKFY4STdf/Of1ScjAkagB1v lMr0T4exdp1OQtMnKrW3M6E0ThasmMbBJNYuXYIjLwAmIdosz1MrZOK9JoXtZIYoCYMYpJuSOw+ 1PkE976A3lv5J8gtzndvUyojAxNef8ZFiCHMVwPFSRv3M3435xbSRD8H3gHb5bFBrYG70Je49rV FQWxUFoRUrSYTQDUocz/LIc8NJQMi1BnU3BtRRISBeD4BUUtA3WyDuI16k5r3Oe2uYTWKHUm4Px qYTw/BnepmGs69t1lOI9w== X-Received: by 2002:a05:600c:828d:b0:493:b307:6777 with SMTP id 5b1f17b1804b1-493f8824389mr86992825e9.22.1783956758226; Mon, 13 Jul 2026 08:32:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/26] hw/arm/smmuv3: Fix off-by-one bug in alignment strtab mask Date: Mon, 13 Jul 2026 16:32:10 +0100 Message-ID: <20260713153233.3391818-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956920506158500 Content-Type: text/plain; charset="utf-8" From: Eric Auger The stream table base address needs to be aligned to its size. With FMT =3D=3D 0 (linear stream table), the table size is log2size * STE_SIZE (2^6). So the spec says the base address must have ADDR[LOG2SIZE + 5:0] =3D 0. With FMT =3D=3D 1 (2 level stream table), the table size is (log2size - split) * L1STD_SIZE (2^3) So the spec days the effective base address is aligned by the SMMU to the larger of 64 bytes or the first-level table size: ADDR[MAX(5, (LOG2SIZE - SPLIT - 1 + 3)):0] =3D 0. MAKE_64BIT_MASK() second argument is a size and not a shift, so fix this off-by-one computation. Subsequent patches will fix the risk of overflow in MAKE_64BIT_MASK() Signed-off-by: Eric Auger Reviewed-by: Shameer Kolothum Message-id: 20260707085028.165557-2-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3-internal.h | 3 +++ hw/arm/smmuv3.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h index eb482c7000f..0819a4b2e8d 100644 --- a/hw/arm/smmuv3-internal.h +++ b/hw/arm/smmuv3-internal.h @@ -359,6 +359,9 @@ void smmuv3_record_event(SMMUv3State *s, SMMUEventInfo = *event); void smmuv3_propagate_event(SMMUv3State *s, Evt *evt); int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *ste, SMMUEventInfo *e= vent); =20 +#define STE_SIZE 6 +#define L1STD_SIZE 3 + static inline int oas2bits(int oas_field) { switch (oas_field) { diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 5e5a6a960c9..10c67645a57 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -664,7 +664,7 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) { dma_addr_t addr, strtab_base; uint32_t log2size; - int strtab_size_shift; + int strtab_size; int ret; =20 trace_smmuv3_find_ste(sid, s->features, s->sid_split); @@ -685,9 +685,9 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) * Align strtab base address to table size. For this purpose, assu= me it * is not bounded by SMMU_IDR1_SIDSIZE. */ - strtab_size_shift =3D MAX(5, (int)log2size - s->sid_split - 1 + 3); + strtab_size =3D MAX(6, (int)log2size - s->sid_split + L1STD_SIZE); strtab_base =3D s->strtab_base & SMMU_BASE_ADDR_MASK & - ~MAKE_64BIT_MASK(0, strtab_size_shift); + ~MAKE_64BIT_MASK(0, strtab_size); l1_ste_offset =3D sid >> s->sid_split; l2_ste_offset =3D sid & ((1 << s->sid_split) - 1); l1ptr =3D (dma_addr_t)(strtab_base + l1_ste_offset * sizeof(l1std)= ); @@ -729,9 +729,9 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) } addr =3D l2ptr + l2_ste_offset * sizeof(*ste); } else { - strtab_size_shift =3D log2size + 5; + strtab_size =3D log2size + STE_SIZE; strtab_base =3D s->strtab_base & SMMU_BASE_ADDR_MASK & - ~MAKE_64BIT_MASK(0, strtab_size_shift); + ~MAKE_64BIT_MASK(0, strtab_size); addr =3D strtab_base + sid * sizeof(*ste); } =20 --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956988; cv=none; d=zohomail.com; s=zohoarc; b=NIRJEEdfjHeTuf2VbTF1rKRgtR1rCdcCQS7gXoRdaCqNTW/d9NMBcddxCV484AHqf1lLkNtC9qYDeL+uG2kKeELWLeXF0mciCZ+Cd1YgQgmXqOEwUXg+yEGgCZkt92kKazNdbJJmsKlrQThJZFtzYzte4jFsufg62wd8BNk+6wI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956988; 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=39AA7WPmxRp4YCKAHA7xgB02rdXN+HLANX0oQbIqL8E=; b=mc43QCHwUcWFyDRihN5f3oAV0WTrSUqG3ZUyT9fNtSTzvCkskJG5Ka3uLsn9KmYlkz7tPG90UUu8cYWilPCt+RMyzeYIIeQ/hRIeK4cyt1MsIVgHlj5dLt/IFQEkL8N2fmQd5EvxwIp92xLWM5h5CbXX+QFUH4Y/PGUCCqD6oRU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956988895147.09724323490912; Mon, 13 Jul 2026 08:36:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIec-0000GB-8M; Mon, 13 Jul 2026 11:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeC-0008QP-5m for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:46 -0400 Received: from mail-wm2-x0b.google.com ([2a00:1450:4864:31::b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIe8-00016c-Iw for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:42 -0400 Received: by mail-wm2-x0b.google.com with SMTP id 5b1f17b1804b1-493d43b6c28so178185e9.1 for ; Mon, 13 Jul 2026 08:32:40 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956759; x=1784561559; 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:content-type; bh=39AA7WPmxRp4YCKAHA7xgB02rdXN+HLANX0oQbIqL8E=; b=xId33aINYE/AOeGHHLuj6mGYwhZC5wRWJRFARAoZKibhdLClFnbKS6vukqso5URmYL phhMs5vBH2+eGRfNUBDUqjEEGEyd7rISBNJHMdlLek7AG6Dane1detH6X3s9he+DX2Th 7yD9Tt5DrsQ6oAZ/3iWkrxK2bEvr5V8R2xlZ0lvO+BhLJtGGm1B3iIUlZQ1GpWpQn3aj 5ZJztpOjl/rgHU2R8DzoBNe2QlIgrVdEXBhnOa6jLdpI3wYR74wHAxkQpsDpz0Wa2DyM 0ZDvxfxbiMKtuYvE7PnUQ/jCvzzQg7ESYnZ/7aOV9pQ9cE3icNIYz9xcLCcSxWOK/FZk CXlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956759; x=1784561559; 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:content-type; bh=39AA7WPmxRp4YCKAHA7xgB02rdXN+HLANX0oQbIqL8E=; b=SiDwe3RLeWUcETE0v3BlBHSFXxgXjCeTxjMYH1j0FjWk7Mh/NEwBcXfJZe8hk9PSek TWkCpV6W8awEyFr08N0Mk49FNeL5gvDVRNyaA4PnRXq0Cxt9kC5C9HBAUx77h+bFiiBe VJzZ9tNip6q+2vMmG4qc2vntkYYmNoQtK1beY12bbQBA3blmLi5OlFO/EgnoanffT+0U gA5tqPyEULVtNoiHTVgCZO866I4mzn9XBx1QOEvKQq+nRDFeEaifME+FDlBhPxFbHVPP oevQKagbN2BIt/PGIZxDFPBx2QDhTLuLNnbBECy7nKcM2gmk7JAdbETjbqBDJGuR/Vrp Gy+w== X-Gm-Message-State: AOJu0Yx1emr9XWzWyaKGW5VCiN2CItiV8yLpT+oaNPLch8e4ARoIYp76 3UZfMaEQV9AwdIpvAyBy6as74CWGjxQm3lI0iqTxBW5K21q0I+QjgJgEQ1Q3BPQrHkBVqxgC50Z wAeETQbqyixPE X-Gm-Gg: AfdE7cn5Jv6+JE3idnY5yowNZqvK6Mlw4siIy6l+2lcqTDK9MjGkQLMfp9dpqc80zeY u1Vi9ShTsIP88aWxP9s5cuvKHsw5xhVnDFike7yjW9Q/r1d4bAOEpRydC+dF+k/IqaHp4Rbztpz AkGH1jYOtfgewuo1YL+769rwoa67HBQBrLGocz6imdBu02D8D1G0gXMPZpbF4lnN/ToG1y3cof9 vs7AgW5M0r6LfDaB34u/3EPhj9LP7VCJNAXzk9UBD8LnQPPj74XaUjLrSESawapaJac7RvsZdpP i1uS8ylqANcCfjl7+dfzy1EyYBJ2yj4TQBktuPL9RHz6jJiz05hCQAURNbu5wqegd/PNtz+3pCU bQ9VT3rHYcisuMLOW//8468o0fyEvxbLV5xIYpL0LRVqeEtSHFrFhhYrS94CJfz/HCUjfU+lR2+ aLyxXdPmgBeBspduJQ1a7BtgSFLBRCDd1C2zaXj+uHVIlfOOmzIHhv5rYVczw1lkLTSR8UBi95U KzulpS8e0TCJ/YeE2fmrQ== X-Received: by 2002:a05:600c:5489:b0:493:e97c:216e with SMTP id 5b1f17b1804b1-493f8851d4emr98418335e9.39.1783956759112; Mon, 13 Jul 2026 08:32:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/26] hw/arm/smmuv3: Sanitize SMMU_S_STRTAB_BASE_CFG.SPLIT Date: Mon, 13 Jul 2026 16:32:11 +0100 Message-ID: <20260713153233.3391818-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::b; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x0b.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, 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: 1783956990974158500 Content-Type: text/plain; charset="utf-8" From: Eric Auger Currently the guest value for the SPLIT field is not checked. Also the spec says that values different from 6, 8, 10, respectively meaning 4KB, 16kB and 64kB leaf tables are reserved and behave as 6. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3632 Signed-off-by: Eric Auger Reviewed-by: Shameer Kolothum Message-id: 20260707085028.165557-3-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 10c67645a57..c2946d8d23c 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1688,6 +1688,13 @@ static MemTxResult smmu_writel(SMMUv3State *s, hwadd= r offset, s->strtab_base_cfg =3D data; if (FIELD_EX32(data, STRTAB_BASE_CFG, FMT) =3D=3D 1) { s->sid_split =3D FIELD_EX32(data, STRTAB_BASE_CFG, SPLIT); + if (s->sid_split !=3D 6 && s->sid_split !=3D 8 && s->sid_split= !=3D 10) { + /* Other values are reserved, behave as 6 */ + qemu_log_mask(LOG_GUEST_ERROR, + "Invalid STRTAB_BASE_CFG.SPLIT=3D%u, use 6 i= nstead\n", + s->sid_split); + s->sid_split =3D 6; + } s->features |=3D SMMU_FEATURE_2LVL_STE; } break; --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956846; cv=none; d=zohomail.com; s=zohoarc; b=Y6nbRMnkge4GrUlDE1F8egcfg0uT6xVbpcHxdK+6xG8WBI3IkEJSVs57PfE4PmCFsfjat+yu3sZE4zIKo3T1yap24Pv2sHrBbxL1RzUWUCYhp0mKIP0VILwNbxXZPraUBiobU85EyTnmJReD/wJ7EvkI8HZmOKPWLuY6fRGIZvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956846; 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=jroCL+W1/ba9rRwipBCDoKmJSRF9H3/7GVEVaHjQaOQ=; b=VzwPkTRBn7A9J18pYo4rAyvTA83lCrw10rESWTI9foCCwu/iYuK8nwQRxY2O0L7bxxjEjdJbd36dpk2s+28FdD1rU1TCLUOXtwOHrBujrosQhWHD974zaPL0c5mW0UdO8PaNn9UYcLH+HAX+8NGTHHu4UL5jpEJrmjjsY9eIveE= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956846603135.73730006127175; Mon, 13 Jul 2026 08:34:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIec-0000G6-7C; Mon, 13 Jul 2026 11:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeC-0008QS-6o for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:47 -0400 Received: from mail-wm2-x00.google.com ([2a00:1450:4864:31::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeA-000172-3o for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:43 -0400 Received: by mail-wm2-x00.google.com with SMTP id 5b1f17b1804b1-492367f3094so14100855e9.0 for ; Mon, 13 Jul 2026 08:32:40 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956760; x=1784561560; 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:content-type; bh=jroCL+W1/ba9rRwipBCDoKmJSRF9H3/7GVEVaHjQaOQ=; b=sX2oXg2rMS6hT0692FJDD1rXZ8FIjEr0ZgtCsNPuotJdxdoSkqlBPMLzq/1oDoV501 EjU2LBvT/FHkNkafyi80JDPRHLOaXzPl/1J1Ucdm77+ibzW9v638wgZwG0aH1bJY2TDv JlQwkNBeyOQhjihpb3ZD+K4hcGy6gBZqFPmZzIT6WcMdSMajj9biF4tQOKllj75CFZd1 9eHZq/ks2ldP5MH1dxEvTeZsF80At18dFUjbgBbFJzDy3NqcljA3+k+p+Kkdpmd1IG4P rEBWTU6m5rLL32TFrVKlYA8UCAXBtjlN/ZP7K3f0h6Z93IVsA0JKfQiptQ1MCUF90ujJ TP1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956760; x=1784561560; 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:content-type; bh=jroCL+W1/ba9rRwipBCDoKmJSRF9H3/7GVEVaHjQaOQ=; b=ZEuZZRtW6Z6Gi9nLnOtCbSzkVeIGRJiZtEjp5TnIJENTF8D8GXM/AmC0CxVbX0I1Qv tAJiPsHSFqUZJKG3IuiqR7NPmpjGmF14E+1gkRg9IISS2B1mWB2HIkXSASV1rYwOAevs er4h6SKRzGSOkpHr4gyRfebz8qLJn/MbqgwLTEhasI3n0HQWsdui80WkQ9dbvkWPCh0G hBTQwm6fhfq51iJLJeu4tFN4jqsMd2ldELmzUL/K25op0A7IIdlo2OzoUZ0gqGtfnw7+ etgyNMij0BTMHASfO98mgig6I/AUjF6PUsaj31xqgiZ0UQSJ/SzXU2uwC5+nXgBEbp8f O/zw== X-Gm-Message-State: AOJu0YyabAmVBO9wcNoeLrO34L8moRxyDi9DxYQwun3j2M5jTXu0GRan abtAmEJuswxDYMzMl9ymN0SXxApp1E4Cxohek0nxl4u5Tu0QajVQQ6beex+lopeR8YTlFoqUmq+ RG0Lz3+iBcPFt X-Gm-Gg: AfdE7ckNZBOtL3EES3MEkcpzpC9ZW9Ac2cMyAYhX8h+cvySVeNsqpwad1S8SIT/zqUe hDBSGUWwkwgumoKR8zXkswBJwQbFGnRrWoCHyqNKQbWZTmnHNLLU/EgaXuTrPB4G4S/NIVBZjlE 3SxLPHJDgDkHhLRX29iExXs1eT0btDpZx9SKEYLU263DCn8FKweqBzIyJ7iR6D/F6eELXVs8aK0 v1rkD1+V426aYyHMhx3PLHbOj8+BlFFniiaimARES3dJfckcv5wGPM3h8lnE8f3ZWGHWRcSeV5l GeoXtRbYd2mixH4w9XSc9v3hLsBFSu/QEcLoaIpc+XGuduP1/UTe88fkEkxYWxneMCJRJpdBOLq Mp2C2+BFhHe87YAgVOAoCO7CFRetqKUvA6yGCWV495Dx4O9csih7epNK0co/u4K+NWEVFCjBW4K obBqeaSR6uSOIG3oIPUsC0u6wIkMKGQ4DXYHskKg7NeM0kCGzdW2i5WVlrim31424YrUZ4uG7k1 DmCNS6vhlalKDaDRQgvSCx+nxffaHGU X-Received: by 2002:a05:600c:4e46:b0:493:efcd:b809 with SMTP id 5b1f17b1804b1-49401d2d054mr42809275e9.6.1783956759914; Mon, 13 Jul 2026 08:32:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/26] hw/arm/smmuv3: Fix possible overflow in strtab_base computation Date: Mon, 13 Jul 2026 16:32:12 +0100 Message-ID: <20260713153233.3391818-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x00.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, 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: 1783956847857158501 Content-Type: text/plain; charset="utf-8" From: Eric Auger In the linear stream table mode (FMT =3D 0), if the guest programs SMMU_STRTAB_BASE_CFG.LOG2SIZE (8 bits) to something bigger than 58, MAKE_64BIT_MASK() will overflow. So cap the mask length to 64. We still comply with the spec ADDR alignment computation: ADDR[LOG2SIZE + 5:0] =3D 0. In the 2 level stream table mode (FMT =3D 1), we don't have this risk anymore since SPLIT is sanitized and equals to 6 at minimum. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3632 Signed-off-by: Eric Auger Reviewed-by: Shameer Kolothum Message-id: 20260707085028.165557-4-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index c2946d8d23c..3fd1dd7cf81 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -730,6 +730,7 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) addr =3D l2ptr + l2_ste_offset * sizeof(*ste); } else { strtab_size =3D log2size + STE_SIZE; + strtab_size =3D MIN(64, strtab_size); strtab_base =3D s->strtab_base & SMMU_BASE_ADDR_MASK & ~MAKE_64BIT_MASK(0, strtab_size); addr =3D strtab_base + sid * sizeof(*ste); --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956835; cv=none; d=zohomail.com; s=zohoarc; b=Rjo42Vl0rcXxxaQkQve0lSg/xbfB0EG47RaiAIRsMkKaLGvN3Vsx8rZMxUv8dwEJGRrAY9Zmgs89wGQCRYHG4OcPHCBcfaJj7zRZJ5Btz9G7inRFJYHxRd9SlU8LNfYilswpfk9BFmrseBVVXDkNc861DiDCQc6Z9xnHM0PfKNk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956835; 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=Iw0DAfgObCHFOCOXoM5lfjnjSDz7e/AvrJLIEvX5AMU=; b=lCwie+tC7UrP1nKo1n+WoUvhP73vHpAsBfiD3eHgJ0aIgTYkHZg1eRCt8A42E4XFDwV0onVT3hw/KcoPXFvCXXAAInfoVajT7WYSvHfHuG6MYYOq6OaE1jBDh5Zs0wtJsh32cMjD3nBd+inN6BVnlZCYavFoyjdbZ2Uw15uQYlY= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956835793275.5205796401817; Mon, 13 Jul 2026 08:33:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeR-0008UQ-4o; Mon, 13 Jul 2026 11:33:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeI-0008S6-8O for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:50 -0400 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 1wjIeB-00017D-Tb for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:49 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-493ba701891so383195e9.3 for ; Mon, 13 Jul 2026 08:32:41 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956761; x=1784561561; 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:content-type; bh=Iw0DAfgObCHFOCOXoM5lfjnjSDz7e/AvrJLIEvX5AMU=; b=ddQRUGihm4fnsFioAoT+3eVR5EwFRvIjhKSi172J9VpIQFxevoIuXfrg6QL42lRKr/ 5FLgMsfuFbYPzqbLxESPqsTp4fdnkjvBGkjFqgcZzKTKCxZMmzGPCG8PuZTxpEdHttYe 3jreGdLY2zYZsBXk3p6vgkzSfi82Ehwb5WmVJxDJQ+LgFIxqk2wSgBu72Dj5vtZC3vup wENdCp2Su0KGZdI/++Oa8bvQP9hZOnPQjo3HFHoTWj9nhg82eR7ZpvAbrvNHZkk3vvK2 Wk9094s3ZEnXuv3aYbzd/SE7PyUieC2+6LOIvdKWWZucFpY6uw6xdF5Js4ztK4WHuoDk aYmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956761; x=1784561561; 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:content-type; bh=Iw0DAfgObCHFOCOXoM5lfjnjSDz7e/AvrJLIEvX5AMU=; b=LFFgZs3aIzBsz+hgUaxOVTJY7sKJcGnKQ+BaxxJf03Aze3nDOyuZXGwcJFKDLkpWSi OIq3VA61Q4panvzzvBSRVRXJihfhvDSwLHW8LCk2XkSlPBfWVyfZbwPHIh/Wi9f+s3C2 9tYQ4B5557rXKypVyo6V+xocs69ElPaYxLPUs+QLmg8DMp8euSRRBd73zhfeR6+Rr07f 65ZI7cXz3zgKACzaxG3/hN/21MoB9tCLZu12yuu4+eVXnODO1GT8FfMsd8cQd1YhEN9X n2kVjKNU0Cd0rprmpHZPThackVUKHPNSJ8EUxhaieHxEIxFVAQvpa0gOThZEqt41Uk2X 2k6Q== X-Gm-Message-State: AOJu0YxW9RQrmrMPpHVVQaPfY7fIhvO0t1bNJONKIwnvJFUWN29KniVS /QK6HUtyQX0NIsLZ+KjWsqZvtNh5F08NB+sglLxWSXT1E/XEvt7PzEPVbVHBaljlcGojM4vF2Sm pBl4JCSgA1w== X-Gm-Gg: AfdE7ckPQr6DKb5SzXOOgzdfrHyLN2eAGO2tOAVvCJP8265d9VxyMOn4OWoFOszXfwh 5f4JVUZ/VfmFl+Qrlz5ZyRUmioYVrKKc+Kmqr+ySpErYyS/bH7NNy1Ca9FZYspwWWXb61GjdOIZ 2TaTcCf0p3B0Te73FsVyDaBBfbyTAbWSAB61lPtFFgHz4AAK+L/ILgm9t6swF4dSKEgxqfSWFQm gKmCvt+zyVW0VQ6T6VoiXER1BSrVoF5uErLbvDADCNh7A0SCqvtiD/954+qkoVdLNI7yqEKzUfZ xBLozvyZMBB0HEjGJXA9FpXakSqQYJCgh93+5okh6NsxqFplb0dVTx3AuvRrm+xUoxtqE4fmVYX awbUm/6kmNvbePtxorEGnabEzYeRAZThyzwPocTzY+l2jhwKpBjGjIhY0Mv2wYTB4FMQJEh1dfA mfni9vydl2BIYyZ+w8veAS80UI8XtiUW6gwMNOskEDOjezAbdFzkSekZ2RFRxRiq5EMiW9zxLbx OFPhboxWD02LnYU3xENyw== X-Received: by 2002:a05:600c:6387:b0:492:3e69:a86f with SMTP id 5b1f17b1804b1-493f87d89d2mr91973655e9.1.1783956760820; Mon, 13 Jul 2026 08:32:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/26] hw/arm/smmuv3: Check L1STD.SPAN Date: Mon, 13 Jul 2026 16:32:13 +0100 Message-ID: <20260713153233.3391818-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956837656158500 Content-Type: text/plain; charset="utf-8" From: Eric Auger Span values above 11 are reserved and behave as 0. Also span must be within the range of 0 to (SMMU_STRTAB_BASE_CFG.SPLIT + 1), ie. it must stay within the bounds of the stream table split point. Signed-off-by: Eric Auger Reviewed-by: Shameer Kolothum Message-id: 20260707085028.165557-5-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 3fd1dd7cf81..9008ba7acd9 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -707,7 +707,7 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) =20 span =3D L1STD_SPAN(&l1std); =20 - if (!span) { + if (!span || span > 11) { /* l2ptr is not valid */ if (!event->inval_ste_allowed) { qemu_log_mask(LOG_GUEST_ERROR, @@ -716,6 +716,16 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *s= te, SMMUEventInfo *event) event->type =3D SMMU_EVT_C_BAD_STREAMID; return -EINVAL; } + + if (span > s->sid_split + 1) { + if (!event->inval_ste_allowed) { + qemu_log_mask(LOG_GUEST_ERROR, + "invalid span (0x%x)\n", span); + } + event->type =3D SMMU_EVT_C_BAD_STREAMID; + return -EINVAL; + } + max_l2_ste =3D (1 << span) - 1; l2ptr =3D l1std_l2ptr(&l1std); trace_smmuv3_find_ste_2lvl(s->strtab_base, l1ptr, l1_ste_offset, --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956856; cv=none; d=zohomail.com; s=zohoarc; b=GsV04dvgZP3A8IW2s7M8p902wOoNP7EZ3B0yMsQQikuROGyO/mk5P0Z7YcOcsJeShceads83qXd4yBIfi+yRmiUrJfZbzIxZhmuuX1O8XhF4DtgnTQ7SmNcG9VjZYvsLCjG5pI9Jt44XpYxLvLQkbIG4N9O/bzQm2RMP+JmWQF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956856; 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=LsLbQ+QRPhQlpy01lQawniYUzJdZ1vrNpWmjnr/ayAY=; b=Z2AIWcMXZWBo9Tz0sjkTjgWaG7nN+JCVn2mL2i5grq2itA5MLY4i6xyAJXebz4PdMOyeGg2u+FdSA0RQ3dLpyqj/jPjKbTejGEPvYoSs0ePGX2rTSIa6ppiMD1xvNJrnspzObRfcXfMzdEAXlk7Z6Ts3iL3bqAK1Tn+uuK9i5GQ= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178395685630363.77816182807999; Mon, 13 Jul 2026 08:34:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIed-0000KI-3g; Mon, 13 Jul 2026 11:33:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeI-0008S7-93 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:50 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeB-00017h-Ts for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:49 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-493f4638f4aso394045e9.3 for ; Mon, 13 Jul 2026 08:32:42 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956762; x=1784561562; 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:content-type; bh=LsLbQ+QRPhQlpy01lQawniYUzJdZ1vrNpWmjnr/ayAY=; b=R+C7lEVBSxSvDqH3ERj+4dyyWVGrRB1LkvLyE0su7+9lUksRfiO37EB3iroya43UIT RtoSrAwwxFsm48UMp4tzpRq1e4SYSrjyDLyBynF4YoXMG4DpyUtB8mXLFiEwH+etPmqc xiIiZA4jdg+B67t8tLKeZF/ILK/OfFTrGtsmxzolR+UB2Ir8JqtErrle6UTQ8MXnODw8 9WUYYEKu7zrEVBAsugWZgp801UaODBUynGh16OL+dLN6nBhp+vRUH9O0r0Y2hnM99Bly /gVcWC8fw18/KRS1EBU+9ZcMFNSmfHBsCDOexjO8blGwXeAl3t/vyJZtYrf1fC52+w+5 YEMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956762; x=1784561562; 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:content-type; bh=LsLbQ+QRPhQlpy01lQawniYUzJdZ1vrNpWmjnr/ayAY=; b=l60uCw4iRfUmAWnHPmiMyPo4Jni+5ccp2suee6QQGQ0RY50x8KE8peOpBuqhP3XOGP Uyf4n/yZ1oN6jYva0vegLsZAfOBPa12WXn/a4zSmag6GEHu/GDxmGrn+jQ41sqRGt4aB nzB8tKB0hiBwO5VOQzAIgzpTtqfBQqvh31ORMPXQAXg1BJUkCIBVw4xYsKglWJEinKWu S0ZL5pyViRBg28EwKjxun1lZ0vDU7FMdPbSKkQd2ggn+7wx2Gf9+N5KGqGt6KbZ4wCJU Pr7foufN3vnNMwLpg3R9njnxS8YSNctNy8OKQEynsKhdYuNTgGykjfY39EOx9FpcuOFf 4Mrw== X-Gm-Message-State: AOJu0YyxKmVxbq/YLmiJZNQX8vO1ZKWujGboLNgkYYXVE0nnFNaQXo6G DZuY4PuucMwKZkmorLNA0mlxyvkRfV4F+Verv/l5Knfa1xes01onhQJYuPAnUpKWPtQW5ZWE9PA kF4NVxQzlzA== X-Gm-Gg: AfdE7clLdlkQZ+jfwvy72z7AmPtx3WhY7kxLFQThjQzPATFPsxHB3CZJ3WJBejdslvM kO8pIhMoKKDTpzizoSGtH21hfHaVSjlr6rbFO0kyQascOuWkXWt1oyOYkgMoWg+jRx8vp0VqloA XwXYMWBJ5ej9fta3fCRpw2pQXqjCyUvid+3lMOHxRQeQkGyfgdJjwYlF6/pTKBe1GkmFLvgYrRy HPiw4nVfKFhlMK/0d6rAePdxIkKVIfulMknGy04tevrTrmf/BV0KVxWPWoG2tK/aqtL9k1/v7uw ZVD7crO4ImERYlxMDbGgD5dfxNNvncOLycSXWO0JwsErJaNw0n+hDFEB1iomkOrYHtQsZk3As6B SRpJqjxMNzzFDbqXgF2LvzV+Wq60EM4ZJLdUWM6ju5E/UDxebAhUimSicUwD/g97bhnfp0Kz9gW 6clwLLFShhqxQbV2itl5+k73mBVoH868G/LNqiz2PPfaz+f3N+SD7xAp4mGaWtTHet0CtRi16Uq D/pRVsHMiSOMjOhGgx+nQ== X-Received: by 2002:a05:600c:310f:b0:493:d115:d835 with SMTP id 5b1f17b1804b1-493f87d5800mr98491115e9.8.1783956761803; Mon, 13 Jul 2026 08:32:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/26] hw/arm/smmuv3: Enforce alignment of L2Ptr according to the span Date: Mon, 13 Jul 2026 16:32:14 +0100 Message-ID: <20260713153233.3391818-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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: 1783956858065158500 Content-Type: text/plain; charset="utf-8" From: Eric Auger Spec says: Bits L2Ptr[N:0] are treated as 0 by the SMMU, where N =3D=3D 5 + (Span - 1). Let's enforce this alignment. Signed-off-by: Eric Auger Reviewed-by: Shameer Kolothum Message-id: 20260707085028.165557-6-eric.auger@redhat.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 9008ba7acd9..ed19536a4dc 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -728,6 +728,8 @@ int smmu_find_ste(SMMUv3State *s, uint32_t sid, STE *st= e, SMMUEventInfo *event) =20 max_l2_ste =3D (1 << span) - 1; l2ptr =3D l1std_l2ptr(&l1std); + + l2ptr &=3D ~MAKE_64BIT_MASK(0, 6 + (span - 1)); trace_smmuv3_find_ste_2lvl(s->strtab_base, l1ptr, l1_ste_offset, l2ptr, l2_ste_offset, max_l2_ste); if (l2_ste_offset > max_l2_ste) { --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956989; cv=none; d=zohomail.com; s=zohoarc; b=ismtuU76NkFMm/meBqJs9Vv2scIYrQNdeG+EHnXhmIIndI3Wa31q4CF07kPcSrJn13pmL387/b5GYDxlpEgV+mFCZfbNr/5GaJ1OnlBPvBOVYxTYg/LvSrsUv0qL8lOlAEC4G5UHg3ahvWwopaGOcJQfoohsAuDVUp215DhAM8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956989; 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=VC8sQ+SMCrEOYxrNAc0ev6zmslc6XhHuNvrX81rsigU=; b=OEaz/norXmU1spzmmjuIvmqkazWvnXFzpg6FENBvblVN6AyhrEDU6mYMdbVxNKtaMPVJYNZn/fpPlAqboFXIRIXQseyxv0OV/fymQhuyq2XcY2dZ6AEFxjxkHxkXhmNUav8Lw8hnmUOYgxMMtPlUgZYT6G5yLwo0FPCz/SHhTMI= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956989602844.1831675132096; Mon, 13 Jul 2026 08:36:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIee-0000TC-KM; Mon, 13 Jul 2026 11:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeI-0008S5-7O for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:50 -0400 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 1wjIeE-00017t-AZ for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:49 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-493bf73ec2aso23018175e9.2 for ; Mon, 13 Jul 2026 08:32:43 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956763; x=1784561563; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VC8sQ+SMCrEOYxrNAc0ev6zmslc6XhHuNvrX81rsigU=; b=Cu7Bl50+Iaqbk4ko1wBLntj5No8NLRIPaAJSel38kEmbTJoKw7pxhpqhg+9yDpDOUX B8QrJxT6krbqPgJ9i1MZ/3reOq3PkafQzcOey8PJgFShlW3NimJHK375RsDUycrnjebD AGa0YFwL/xRDHQmJEqj5yRqMFwssKyWok5oZIBN6t2TBjXmKklNxXrksWbNsYRfL0RxB guClMt5iFdf7EJSOghUZ7C8OwTxtalgNbiro1g6G3k+UjScysx5LPD9SWevLgroU1EAT px7P6+aMtQJkGoyNtU5amRdJ+unJYh0pQ70Thn/wls02VDDAr0AvLS16WlaeE58VsHt+ NWAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956763; x=1784561563; h=content-transfer-encoding:content-type: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 :content-type; bh=VC8sQ+SMCrEOYxrNAc0ev6zmslc6XhHuNvrX81rsigU=; b=HEvvv8L28iRADrOmzZrEcdirErWbI6GFnVxJcyVeRrbRwQxgxorK7UdDQG0VsmaoG1 YRCUy1V884fL4qvWEl9jFYJHK0YrG0DGdPsnM6VLocWpuiwESDVTzJlk2O7I0zhDQVdN lPSyGvkhpS7tWbCePHj+/UQyIk1CayvdB0ctTgXkz/lMQLLA/0Hyw8uROIeZx4ISri/D IKk+7jYdH6MMcWXLG3wmub5gFE2J77gdXiMzTIrREalaYtJY/V8ODqx/Nd/m0+H6/M3/ esBZwYSkYofZhqE5HHekKh3k+9eNElqOQi8Hbr2hbxoWxF9cL3ILT3Fu8w+UQzhhb/NN 8pxg== X-Gm-Message-State: AOJu0YxNmRs3T3ziT6fF21bXUwj2KQlPtModAQnCvScZH44jN+Qh2RJk gu4ZW93btdeJr7SVmzKcY6Y7Q1za1x1NftGgl3O/qEmIzT0GDbDoZ+XD0jAn/AwqDwChIyLzrK6 jZgdG2zK3cA== X-Gm-Gg: AfdE7cl29xpvEzKVhwtMfqrxmKngGqDL3k9JlsLRsQ5oCtXKR4/3iL0WOjscxVSlk2q UfCs+FrPnTUmIH9lL29OpMobEjlHnStO3uvmxkIpvzDK7iVW4ZYDFpslSex+6bbWv3xIcRK3WuU rYA+6l+jHzK302EFelrzGBpXzJ0OZ0clPoCkdufEavNrp3p0olHS9NIptgGr9pZEOuiZnd1MmCr HZQckbq1jsp5SnxyEYBKvCYqtsaLiydSvscL0RrWW1xX9AZ53Elr80Klwge3toTkJdnVuFoVN2V uSyvtW4AwAfpzMX9l23al8Z29puOSxcBG607vGSpnhf2uSTEeETn9hoX19K23owOt6mKQiLdpWy 7UO9xO/2hHzeORk714UxeIWxdf8twm8iWmyBFfDh4fqdAQ3WH4zsrjrjjsIbSdm+xf7zvCPiIiw fpRz0ODi0B26GdGQ4+iTn4yHK50sI1lXWvgUsVmDLUwlIJO9xZymExyPTtKRiQOPFOq07xsp9F8 /p+cq+N8ZoIaA95y1EmIQ== X-Received: by 2002:a05:600c:2d56:b0:493:f639:9b2f with SMTP id 5b1f17b1804b1-493f8834f8amr63655375e9.39.1783956762785; Mon, 13 Jul 2026 08:32:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/26] hw/i2c: pmbus: clear output buffer on write Date: Mon, 13 Jul 2026 16:32:15 +0100 Message-ID: <20260713153233.3391818-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956990986158500 From: titusr Generally we expect a PMBus sensor to issue writes after all pending reads have completed. If a data read needs to be resumed, this state can be tracked in the device model and the pending data placed in the output buffer. Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260706230056.1888992-4-titusr@google.com Signed-off-by: Peter Maydell --- hw/i2c/pmbus_device.c | 10 ++++++++++ tests/qtest/adm1266-test.c | 10 ++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index b1f9843f52e..1ca117bd3c1 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -1245,6 +1245,16 @@ static int pmbus_write_data(SMBusDevice *smd, uint8_= t *buf, uint8_t len) pmdev->in_buf_len =3D len; pmdev->in_buf =3D buf; =20 + /* clear the output buffer on any new write transaction */ + if (pmdev->out_buf_len !=3D 0) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: previous read was not completed, %d bytes dropp= ed\n", + __func__, pmdev->out_buf_len); + + pmdev->out_buf_len =3D 0; + memset(pmdev->out_buf, 0, sizeof(pmdev->out_buf)); + } + pmdev->code =3D buf[0]; /* PMBus command code */ =20 if (pmdev->code =3D=3D PMBUS_CLEAR_FAULTS) { diff --git a/tests/qtest/adm1266-test.c b/tests/qtest/adm1266-test.c index 5ae82062342..726e4759380 100644 --- a/tests/qtest/adm1266-test.c +++ b/tests/qtest/adm1266-test.c @@ -48,11 +48,13 @@ static void compare_string(QI2CDevice *i2cdev, uint8_t reg, const char *test_str) { - uint8_t len =3D i2c_get8(i2cdev, reg); - char i2c_str[SMBUS_DATA_MAX_LEN] =3D {0}; + uint8_t expected_len =3D strlen(test_str); + uint8_t resp[SMBUS_DATA_MAX_LEN] =3D {0}; =20 - i2c_read_block(i2cdev, reg, (uint8_t *)i2c_str, len); - g_assert_cmpstr(i2c_str, =3D=3D, test_str); + g_assert(expected_len + 1 < SMBUS_DATA_MAX_LEN); + i2c_read_block(i2cdev, reg, resp, expected_len + 1); + g_assert_cmpint(resp[0], =3D=3D, expected_len); + g_assert_cmpstr((char *)resp + 1, =3D=3D, test_str); } =20 static void write_and_compare_string(QI2CDevice *i2cdev, uint8_t reg, --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956898; cv=none; d=zohomail.com; s=zohoarc; b=G8+y4nRxc7WHtAFlRFmXV4mnoGxTfysbV/tjQywDwpYON1WG5Z0ZfN5SXFvp/bwAleCophoHOYTtu77Jnxn73OTVeigzllQxdUCA/F/fQuLfxlozWZdJGCduI6pwRQ5GwhYX0zYnRAwqJ2LuR55JvsKf39J5mzsKI18JWNU8MzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956898; 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=qsZ/7tauraUAl70i9C1jrCqQWXHx1WoT3zxM8mgFt04=; b=HxJWdMGtKIL0Io5a6BvrIVUaCZRHJo7AVIuzf8Se5HreWg4wDEtCa7kFYBLhu+PaG/YCeEGNgKpj861XKMzd3b1lw7fBH9VgoHtz+/tvvHBOpizPNZ9GYvkJYKPSXmxpJ+Zc3ZlY6EF5EmfKBoLTDb+iS5DnM04ZWHNZVLJPPH4= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956898842466.8218094957422; Mon, 13 Jul 2026 08:34:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeb-0000DY-G6; Mon, 13 Jul 2026 11:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Sr-Uq for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 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 1wjIeF-00018M-UF for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:50 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4921eed3fa2so30154415e9.0 for ; Mon, 13 Jul 2026 08:32:44 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956764; x=1784561564; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qsZ/7tauraUAl70i9C1jrCqQWXHx1WoT3zxM8mgFt04=; b=HN+Q9++Sb4AST0rB0fN91ajU8trHbQl5R4m+awMxqcwaqYH67yQDRIoOKk6LExjSvD H+zVIQtZyMo4LbzhsDGKftt7JFNdJnYO3iK6NCNa2zFCPaW7mX+K5zDl4JGZra/6ralU ttTHdnyZ6sZoh8QrMtfTsjslNn5DsyNuXKpFett09aGSEzlLMaU4mvhsG1HQsdtGJt8w g2fUOt3j/0zPi1jzCamLzEF+9CLs+HQfZZRZdbnbjq0Qaz96wDZ32iOAVUR9q+Q5NJ1/ BMQmmuuW80KFs6V8iTtdveuxkb+zVqKgjeYI6yeSz9dTpMgoKdSSbRKpc+0gt6Cmf8IF RwyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956764; x=1784561564; h=content-transfer-encoding:content-type: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 :content-type; bh=qsZ/7tauraUAl70i9C1jrCqQWXHx1WoT3zxM8mgFt04=; b=C3hCnZMBTSDwQjH0Y3jt4Ur8/ZWLJkbofkjkruOj9TU6UdyBlGO4R8E2VMTCTpBwlH VZor+4Ci1vnMRdVqgoWHWMay5B2JznjZ1T7oGjHjbigkg29p0G0eWNS4DUlMekzai894 N2PQBz/nzx+7JbwpdwonYXTOR8K0Jmix37M6qnvzckkTXWzY13DkqONYOnDRM3m6Wzma WEtp/Ir6DbV1KJoluAo9O6JgIdTC/v+66OHTIP+kXczGuvHjUizFsIQVXA/UarHES8Jl a6AoUOoYiikl2Gr8bCpd+I0xjRoxuPJo05DcSo2EUoNZpRDV0v4flWltV4B9Jzl87n8e H96Q== X-Gm-Message-State: AOJu0Yxxy7qgbDBsuPZdPQCE/5Zq0cFYYm4jT6CdeHEW91fgGjo6JA1M C7Ac1cs98uPkxfIg0G8yHekbbz2UEWccgk11870YA2fBoZrLxHJKjW0dfugojXIfhjaEgMkANWp SEVlT5+f9Sg== X-Gm-Gg: AfdE7ckpv9Ko+4jD9ewM79s02F9P5iPS+QLI/BnOhrOgSbviywY+Dre34l9RQ/QUjG0 1jkNRbiI8DUSYHcEFmhbA4rG3RiTXQGTfZgSxywBN7qm/zlD5EgUKpQ7qCkikBzQiYgIfvaI42q 1EX/oLn3RQUagr7tLBuS2pLTJ29BjWdaV7Xe03Tuqr7qtLJ5xaFIbaqx7EF4Qf0aiiJrc3sK3Rd aHOui0W4SWfBDIT9elcWmR+VTcXVZpYYqNV1i+fCc9t2PiqglTxyVHvmXhZ71VFa0UMdYTkIQ6g HKj1IIx4KFPC8zSK2Ap19nOybFNPfJ0PIzEPs/MUrCB2r3irkgCq4LLtWXfV5TMOMwlmeUkHq9p kvizwr30AH5lhtrxp3EnRS56/va4dqL2nyTigM18YTbbTejF/jTWl1UAxKZSME3d89w+RyWYWD4 yXo8lP5X/6ZXG8f3tuz40BqTY8UPpa7pJvHbnGxaPGu+/4lBMEV8aV1BikRxEBjnO0+cK8pOLKE N2byjSPHNSmwJXfj7E76g== X-Received: by 2002:a05:600c:3b03:b0:493:bcba:46a4 with SMTP id 5b1f17b1804b1-493f8818cedmr94817735e9.20.1783956763641; Mon, 13 Jul 2026 08:32:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/26] docs/system: declare support for FEAT_EVT2 Date: Mon, 13 Jul 2026 16:32:16 +0100 Message-ID: <20260713153233.3391818-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956900132158500 From: Alex Benn=C3=A9e The actual implementation supports the additional trapping registers of HCR_TTLBIS | HCR_TTLBOS. We already set the value to 2 for -cpu max and don't currently model any CPUs that only have FEAT_EVT. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-2-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + target/arm/cpu-max.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 4f413d69efc..fb8d263db49 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -68,6 +68,7 @@ the following architecture extensions: - FEAT_EPAC (Enhanced pointer authentication) - FEAT_ETS2 (Enhanced Translation Synchronization) - FEAT_EVT (Enhanced Virtualization Traps) +- FEAT_EVT2 (Enhanced Virtualization Traps 2) - FEAT_F8F16MM (8-bit floating-point matrix multiply-accumulate to half-pr= ecision) - FEAT_F8F32MM (8-bit floating-point matrix multiply-accumulate to single-= precision) - FEAT_F32MM (Single-precision Matrix Multiplication) diff --git a/target/arm/cpu-max.c b/target/arm/cpu-max.c index d38bdfcf811..88b7c046333 100644 --- a/target/arm/cpu-max.c +++ b/target/arm/cpu-max.c @@ -130,7 +130,7 @@ void aa32_max_features(ARMCPU *cpu) t =3D FIELD_DP32(t, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */ t =3D FIELD_DP32(t, ID_MMFR4, CNP, 1); /* FEAT_TTCNP */ t =3D FIELD_DP32(t, ID_MMFR4, XNX, 1); /* FEAT_XNX */ - t =3D FIELD_DP32(t, ID_MMFR4, EVT, 2); /* FEAT_EVT */ + t =3D FIELD_DP32(t, ID_MMFR4, EVT, 2); /* FEAT_EVT2 */ SET_IDREG(isar, ID_MMFR4, t); =20 FIELD_DP32_IDREG(isar, ID_MMFR5, ETS, 2); /* FEAT_ETS2 */ --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956830; cv=none; d=zohomail.com; s=zohoarc; b=mXuzJlKtmq0JIdq3jpV2qkUblC49YO+Bjd27OwOXp/g9WOB0zx04dEy0BA4xLLxJPQKJ9EUiPWSAuWuyFGaYj7nxNkpm5xBRVCZOrojCYW4lAnoYP5LhEu5pvg+hpXnJwsrA4bsowgUKJfcndxmEH4kqXtk6T/BM5nSE8bJ+FAw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956830; 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=sLAxkDoYmmtjAx4obGT3sDZ/SgJ7OVZp4P5X+krvfFw=; b=HkfXopU6v5eRU9PbuQItgCbL5bhm4QbcQ/bp4hCXsTqfcykRE2NSfJW9fZkL0l7LIux4qM0E7XrZ3+3IoG7seKgPCMR7IozvJJksXJIKfNH+QQTBYCIXbZwM/JTqs8z9Y0xWmyza4hkQfOm06KqjRxb3I58doMjU6TfjMbFp6+E= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956830899208.29269223680706; Mon, 13 Jul 2026 08:33:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIea-0000Ax-I4; Mon, 13 Jul 2026 11:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Sm-Rc for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 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 1wjIeG-00018Q-3J for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:51 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-493f140ca8eso20758975e9.1 for ; Mon, 13 Jul 2026 08:32:45 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956764; x=1784561564; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=sLAxkDoYmmtjAx4obGT3sDZ/SgJ7OVZp4P5X+krvfFw=; b=gBaVa3sQ7Nhf8AaKUaQd2wf5TLzA4NmG9u/exKjLR3gIKiz8vC//BmK2zzrW2JzRgv 5sSAuX31KW0ABtiJ/oFOZXQisw0K+vgKVI07dDMm1aLi1MvrmGr8PhYsJgQyUTrGMTs5 9T2kv4WoMfI471MlZ7T77Z7DcqP8RSS6ypRhlwvcVK3hUbJdDAXNSbwKnYdozqMlTual DSB7hehvcekDoDpAqS4TEQNXunouLc6XWfEMTWbk0TGp5iPkhkeoIqZYgGTWpHAqWLLV zrEb6BwEuDdGxcbkxlAXDwizLX2gV+QGjxdNYutm4S/jsYq1W6lnMVy7M8x4XLc4Z6XW ezYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956764; x=1784561564; h=content-transfer-encoding:content-type: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 :content-type; bh=sLAxkDoYmmtjAx4obGT3sDZ/SgJ7OVZp4P5X+krvfFw=; b=JUtSXw2PNJIiSSJFJfFheXHe0YaW+R3BLTm5cc8NQnC8O5Ml6EZggFCVIhBFCy43+l VH+kKCQ+eiZW1HW76kcUO+OxxWphBqyoEIdtJMP6edzFBObpvqAPhBg0mbQZgoeoQs2o /HvPJwQeHXKeJbg4qEYQcbfsr3Jur+TkbT8gACu0eNFyMND1OwjcEUd3VGZq6/DB1NOk hseeZlznpbYwffhUZ//v1f2ThTrW4oMKzNxjdmIjnvJGti1o+gR8pT6fIxP+f00SX4Qt IWl46pXqMaaKt1I7tuIuUsEESSXygKRAuqC6BVBsU5sGKKwF4Jh1Pz+q23aRsCxbVRIN 8ecg== X-Gm-Message-State: AOJu0Yxhp5BpFBWjOIgyXFazXqiEJ4Gd8Y/Wkw6Z7MMrBsJ6sDpaKiPG B4xLujavNQZQyIaEBOlkz9vzhYy2C2IP5MeyvVHbM25GIdlAMd4G0zV2iM9LpIOPaOYWPPhSpje 8q7JDsuODMA== X-Gm-Gg: AfdE7ckUbzh5EAi4iY0OyN/DePLL7uqJi555sfcfCfFxGF2RS0mKhDG/RKpcqqwnTT9 DwMp8PyzEtaxi2pNrgexPtCekQRXlXlDVKYMoCVy0kz/j/BMJ8RWEu+kSkn0qnqqJXxIZHYhVo4 WxaoowweUo72M447PGjR3oVinbmfdJCzjh1jOgfWCpRt8XjDTqrV/HBt0O7FP6UFg4aPen7t8oc 2+28B83E8n8VZCfa+bretCo1XQdkYTkZJ8EXIUwy1cLfJ2VoPoeRwRXGbxvJzcF+3Jso6byv9De yXY5LM63bXBEdSGfQt91oy2ClrcFBbzTIdbSyzYKIxURmOfMSC9azBEblE0rTxzorpAl7nXPoLC 2VPSx40xuw3ibe47lHRsVShKHYrh+tmIeyKakwIdI8AFytdEfFRKks1TpNwv6x5CW7YWG7lYSPa AMmhJ6jBVyjDrnjibai+Gfr0ZGN4TRfjhmYvV+SXeLr0XEB0Sz4z5kSPfBLlwHeB4znh9+xZxsW 28pfDJ7EYK7lPBEu1C7faSyVQyci9x6 X-Received: by 2002:a05:600c:8718:b0:493:c1a1:68f0 with SMTP id 5b1f17b1804b1-493f881f0f1mr92509095e9.20.1783956764439; Mon, 13 Jul 2026 08:32:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/26] docs/system: add big and little endian features names Date: Mon, 13 Jul 2026 16:32:17 +0100 Message-ID: <20260713153233.3391818-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956831703158500 From: Alex Benn=C3=A9e We've always supported these features but they have official feature names in the Arm ARM now so we should declare them for completeness. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-3-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index fb8d263db49..d19b6c04429 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -31,6 +31,8 @@ the following architecture extensions: - FEAT_BBML1 (Translation table break-before-make level 1) - FEAT_BBML2 (Translation table break-before-make level 2) - FEAT_BF16 (AArch64 BFloat16 instructions) +- FEAT_BigEnd (Support for big-endian at EL1 and above) +- FEAT_BigEndEL0 (Support for big-endian at EL0) - FEAT_BTI (Branch Target Identification) - FEAT_CCIDX (Extended cache index) - FEAT_CHK (Check Feature Status) @@ -103,6 +105,8 @@ the following architecture extensions: - FEAT_IDST (ID space trap handling) - FEAT_IESB (Implicit error synchronization event) - FEAT_JSCVT (JavaScript conversion instructions) +- FEAT_LittleEnd (Support for little-endian at EL1 and above) +- FEAT_LittleEndEL0 (Support for little-endian at EL0) - FEAT_LOR (Limited ordering regions) - FEAT_LPA (Large Physical Address space) - FEAT_LPA2 (Large Physical and virtual Address space v2) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956794; cv=none; d=zohomail.com; s=zohoarc; b=W20aDale+vZ/15ucEjlEQBzAKHwrwbBscfFluI9tqrPllsSSz3rrebSwHfkvElR/4Vjvw76FYp0Y65HfsO17SIcCSlVbfFVq+bFcszsGLm4u8qhw19V0LuWZZVdeQCBoSTzFxPr5PNWjAVapM/p8iAoeYjUD01kksigG7UYtV1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956794; 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=8AsRaUA2T/PCVXg/2t2wX1Kskm449Q9GVMk5QIScFjU=; b=mhSyyoe3YuJGRSOnR7tZa5W2fXjKpdg7hwX/FSmJhcT1KcInwYygrVw60dNlaoULA8Lj6QFwcsINi/r3IJNferK9SFP9uHkOiZbRwFYGHFJ6yMlDXJAZtceC4OhzAkS1rc3fcVaVhnSRL7vdWrUJ+/BKMTuoEnEN63uC4kpKQ5Y= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956794231914.1390766132512; Mon, 13 Jul 2026 08:33:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIed-0000O9-OW; Mon, 13 Jul 2026 11:33:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Sl-Qg for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 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 1wjIeG-00018X-6n for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:51 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-490cf322ed0so24854865e9.1 for ; Mon, 13 Jul 2026 08:32:46 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956765; x=1784561565; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8AsRaUA2T/PCVXg/2t2wX1Kskm449Q9GVMk5QIScFjU=; b=tmzkYgjYQfwmh/0mWbDQ7J1rDZzQEj8N7FtkLh6q2aGKSbr7lnnu6U3bjWux6L9FSe HzwVZbVTnwnbyryRL4Vn9jr20cAWYXbFQYqCXk7rCjTphdVOMO47MQJ2AFE+pmMVmCpo tchJqoUp7Sx+lFFsJ8qHVxSbJOFrLl92XuSH8WxnVXMy/CcVhT/JSpVPVJJGd6Hq/WQV praWAAAkYuP0tlAao+z4sVBk8Lp8s4YtJBZyuH4b4FecBbJLHHRtwQr7kCq4bjMrOmZ6 KD5iDfevgb1Kv1nRr+3YSe2IJn6CUhVthOm6HiYGh83oSxCFcOGRD3ICCCw08eRMGyRO eVIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956765; x=1784561565; h=content-transfer-encoding:content-type: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 :content-type; bh=8AsRaUA2T/PCVXg/2t2wX1Kskm449Q9GVMk5QIScFjU=; b=YTOG6SypEy7qVd1HV5hXAiVdu4XnEQuQjvxP7IKbFaV9y3or2V6aWhYX8Y/z5f2MuH lv8XgIPrUL8KdD/TIn0bLUL18zzxBHJawObnL0phjm0p87+aoxR4FF7/4IZ6i8gZJZ6a +fnFaau8vS5CYw0Vey7LItmn2urufodDES3J7qb94GoeK8T3D4S3/7i+Z7WLC4fuxzz4 qGS3ivepqdvWm3/3axYwX3fIIGDtQ3OZyP/K7H8QIhK4nvxwUV8q3S8uRtARxJNC/kmX 6AL12NbxNSVazXirVytlciwLy8gGwf4z5cq80hmjsZvrw9oGD8fQRKJBDkfAdAF5Y5Jg ZdOg== X-Gm-Message-State: AOJu0Yyu4Ig9YALl/1IiRqNN6SM7pICcQN3KRZwnfpVn7IrQfrjOlOwA xyzFOhNTDWPV6kRy38Loaua8MuA/BaKFYxXXjTuaDgMjs8AIAgAQRsfAd1fLKHL0mPAA4qiewsW dvhCx9eMuhA== X-Gm-Gg: AfdE7cnlA3Gu3ikSUMOK0hSvgWHn/oVylinF1Vxd6wWX5nBuMxdzPaqPhkFGYFk2bDf mdGa308/RI+m7JzdTm74y7Zf6siYj1TNkXqA3NBxjgXYzvVug0sJuOcKGUBCdGWD70XXn5TbCob jqKoisgQ2XA9C5oeQMLYIQ2NcHims6I1+C+ZE5YC3HsaWgewlJ7GTzGxLcgbALrT21t2F4F2ZSl O+7XaLqhlSEx/xVciLMJl3yOOl8LXs2RbkQA6iw0K8rIY3HtFDLqY5N+Y/wRADZQL7s9Y4eWQw1 1Q/yupdccNIo3QFFMkBS77EagIYYvEMrXxcbvy5jUQTo2esq36h/DTUJ9772UcTSLtXY67P3cXo DIuJXH4jIk8tu8AXmTLYPkHi6z2/uLBIRKx43+Hl1MzXq8+6TLJWKagH81C7DMtDcSWm52zx5pT 3+ItD9LnnemtNBnp+zN2JdveH248DXaVQlUQe8+BA8duvm1bmZG4kGFqDW4ROMEzInqVHghJTDT gDsivz8Pf9NNEheL7z+Ow== X-Received: by 2002:a05:600c:3e1b:b0:493:e890:9e0b with SMTP id 5b1f17b1804b1-493f883157bmr102458485e9.26.1783956765279; Mon, 13 Jul 2026 08:32:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/26] docs/system: document FEAT_Secure Date: Mon, 13 Jul 2026 16:32:18 +0100 Message-ID: <20260713153233.3391818-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956795333158501 From: Alex Benn=C3=A9e We have had support for Secure state ever since the initial TrustZone support. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-4-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index d19b6c04429..b751646e10e 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -162,6 +162,7 @@ the following architecture extensions: - FEAT_S2FWB (Stage 2 forced Write-Back) - FEAT_SB (Speculation Barrier) - FEAT_SCTLR2 (Extension to SCTLR_ELx) +- FEAT_Secure (Support for Secure state) - FEAT_SEL2 (Secure EL2) - FEAT_SHA1 (SHA1 instructions) - FEAT_SHA256 (SHA256 instructions) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956844; cv=none; d=zohomail.com; s=zohoarc; b=lQwJGh6M0QGMyumWwsfZTJ6xp0mbBGyxMmDQrE282lcDP3T1AVhWv8iqH8HMVyul9yJvTvS025nhqmcvNDrmviVfwbHMdlQ1sG9WfVNPCezJeoOFjWVvidq/45HNIcCy1XTirHxn9kzqP4St2Ot3N7Z4qFrXZGyKoVHO/2lQ3w4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956844; 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=IIals0TVGejPzx41Sg5e9UWZp3mdy9oKx98sxzoBabA=; b=YDMkQNhzrkKvpr4SOC7ji/W7e0NxSnlKXzjhF/S02/3Qx/mnpGQ/tmzWQE7FW+sDtLDXWRv4ILuwaqlVTDwY4AVo/f6geZBlh7q71ikBWVZ7uyNg+qQ7igz3AT6yUWXz9XvvHDkuQxY9UDUNJbY+d/F8PIBXTjw2Bo7Wx1vH1ms= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17839568446321000.6121793826898; Mon, 13 Jul 2026 08:34:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIea-0000BX-Qu; Mon, 13 Jul 2026 11:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Sq-Tz for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 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 1wjIeG-00018h-61 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:51 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-493f0ae9572so13249935e9.3 for ; Mon, 13 Jul 2026 08:32:47 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956766; x=1784561566; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=IIals0TVGejPzx41Sg5e9UWZp3mdy9oKx98sxzoBabA=; b=AfvFiy173FNRqIKVdYHfUxdLsGQmSsXSE32l8NZmBdipx7e8FGDKKsNEQE+FLy5sq9 D5c/4zLABQbz5Ab8bOo5OARzCsr8qyM81ngZrh6a+ZkrX6E+UBHd1KwtXzd3AdxbX/M2 sB/YZOJXwBGIgh5CfznoEOiY9VroRneR72s0xNEWmrHW5RFAc+lvbIP8iNulzt0t5ZOF u472IAXv9hllzyMuDma2Q0a+JS+ZAqAqPbm5sBxSsbcXAb4sQz7OEk08+7yOUlcuANoo B4YeKHuwPml6leUHmrmYaC+b9AKNZIIeXRUyhw32V87li9FzGskcOivDHabsW3IZMXot W//w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956766; x=1784561566; h=content-transfer-encoding:content-type: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 :content-type; bh=IIals0TVGejPzx41Sg5e9UWZp3mdy9oKx98sxzoBabA=; b=F65qsfAJFg/EeZZX8rC90xX5kS/yM6WA1L7yvwzvwoXGcHyKTxZPVtyHLktMWqlW/C osehC5MVpXJj8G9agIGALG0OsOTmdhpsCN4rXJd7FSOHOg89iyw1kc7Rfo+KAS9hJchg 8ZslDNj1vfreCNc08qShqu9573YTiyL21Y4jGET1WoKTq4jHYlllUKxvuJ/EWsmu3ndo 8aPcgWexlzDc4grQ7ba5OgMOJmIATj9gy6pNeXgeEX/XMB46CPFLV2rj8hLI6Oo4Wv9Y 97L6wDcFqtzhhvUJ62UlO4AHk8bQ5tG7C6p7k0mOjJgCSdeEVlHvX6sB6JxdE/eDFP/B nFUA== X-Gm-Message-State: AOJu0YyCJaqityj0rhuyRH8/aHapI6vwyg5EBgsTL5Y7ZgsnN3xGLSeT 77rwYjub+uCwMONbfMYl08TaHpgnWKNYrbyJbP+vuod1B/UjQp8cbVKfUVJuFJxw1Baplo/mLV+ ciA3qez6AjQ== X-Gm-Gg: AfdE7cl4wRVN/KsLPrqQsfxWWUWwxdqssF+yhNRndmFVVPuf7F4G8pglLDbnk2MyB7E USQ8d99Ge4BqPBCDClQcRf6F7A42mtFzZJfmaV6nwz8A8LuIAmdQtM0ZiHXz6eqDCvXneH+RbPx T7fig7y5KEPoVDwj8Ugp+koIOCn4wi2OQkURhXRlWR4CGBrpKZz6rcJgGs8Ur217Nmcd1Z6ReEw xBeChr3Anu5c09Yj5pa2LRF5UmdDZFKd6CuzGFxolP4rwOTli1ZLHk0h1DRwP+9p0PJWEuZ4kxQ xHmGLTshus539yEZ5CXK69Y9qTmnKWdoOsCxc1G1grI8ZUo2mwhtTRqgk5xTUd2R2SUvBSIa1+0 m8XUV6TDiGYToWARNrA9Ha2rEYvJs3aZcLYgs2trcoaaWbA9zhZeRq5arQpYr0DUVPCYCeD/wnh DqRT/wDhlfg1Mhj4zpSCgfQ3o/C+4+T8E8PyBW9zpQXNiCYk/ARDbw0niTntJkou30VkmkluaRN wTEeN9Oz4/jaM5+OP95JgBoKXqtqFpE X-Received: by 2002:a05:600c:8b74:b0:490:9d1b:f086 with SMTP id 5b1f17b1804b1-493ffd06bdcmr61996875e9.14.1783956766195; Mon, 13 Jul 2026 08:32:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/26] docs/system: document FEAT_MTE4 Date: Mon, 13 Jul 2026 16:32:19 +0100 Message-ID: <20260713153233.3391818-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956845742158500 From: Alex Benn=C3=A9e FEAT_MTE4 includes the sub-features: FEAT_MTE_CANONICAL_TAGS, FEAT_MTE_TAGGED_FAR, FEAT_MTE_STORE_ONLY and FEAT_MTE_NO_ADDRESS_TAGS. We have already implemented those so update the docs to include the rolled up feature. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-5-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index b751646e10e..05e85d7a367 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -126,6 +126,7 @@ the following architecture extensions: - FEAT_MTE (Memory Tagging Extension) - FEAT_MTE2 (Memory Tagging Extension) - FEAT_MTE3 (MTE Asymmetric Fault Handling) +- FEAT_MTE4 (Enhanced Memory Tagging Extension) - FEAT_MTE_ASYM_FAULT (Memory tagging asymmetric faults) - FEAT_MTE_ASYNC (Asynchronous reporting of Tag Check Fault) - FEAT_MTE_CANONICAL_TAGS (Canonical tag checking) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956899; cv=none; d=zohomail.com; s=zohoarc; b=dvquxjo9w2ePXoZcx43rG0kQW3kNIrVtT6KA8SSrZq9W5n7mWAs8Sq+dtIdBtpHzQcAQMQNV9xt+Ww2hT9pX1c3P15N9AR7FN+DgRs5TkqVPuXEveFKScREHyQwRV3/fbuyHMfBqE02BkC4oG1V1nqMBIiJPAAtZquijT6I+gCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956899; 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=H10FEuulm4nuHT4cz8qHX6pRrD8O9NpO5njTcbHZkv0=; b=iQwrmenwdYPalAbpbb3mP+u+dKTy+9KAbq4swmv601p0442hm3czlhTUJY6g1uplL1EpQJte3H0bG4Lem9cC8eZFx4cVPOggHFWFu3vyAdrKINo3LJhyDF/Sif0Y3S2zT5spByLGBjO91O4ZlSGvhP8li5ymXvTT9NbCfc+N5hM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956899085571.0537480701906; Mon, 13 Jul 2026 08:34:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIea-0000BP-Pe; Mon, 13 Jul 2026 11:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Sn-TX for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeH-00019K-VE for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4938d5f86f3so25057025e9.1 for ; Mon, 13 Jul 2026 08:32:49 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956768; x=1784561568; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=H10FEuulm4nuHT4cz8qHX6pRrD8O9NpO5njTcbHZkv0=; b=emq6UEKK5UHLwNXxmFrm8e3J7rZB1/9qcY07x1jOJoKAbZEHn0RbkIlUJFl9BOtoMJ woPKKR9UloNWhoXLiUD8nMA8r0cBw1sfm14dT+FTKucxsY2NNsYYMkwRClKnYQZU7+OF pGjLUR8hqax7hUSlkmXCg0339XHF5DtVNIwtD774JGuGiaNOmg69px2peqPTETFaT6AU tehlcTiKzfMY95pXokk2fUQ741fA1M063E+A3kAuQHbs/LBmeM57pQGVt8DEQ2bshqhW xHwVyVdqwnwSLjhnuoNCsl9PRlLcdYPNVdWI02Y31WubYm4hZgntic0JzC+Xfaihj3N2 Fstg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956768; x=1784561568; h=content-transfer-encoding:content-type: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 :content-type; bh=H10FEuulm4nuHT4cz8qHX6pRrD8O9NpO5njTcbHZkv0=; b=rDjGOtx273L5XLKI6YpVIe3G2MLL0tC696rWFSKrfmPTQa6U3thzEU4vhGi/S1g61d B+7odUsVmuLdle3LJYMeytFUAimhYJQRbpYV3xFSqTJBrTs0OL2Cdn18Yz7Zl2BgHyeW fhXlE52JeMcMkDTfKYw+YeOogrG980BOKCXwgmXQvCuV4GHqKjP3z2NtTn+WL3HhrNPR Hayn05LYTguLtwl9W/e1p0AfYbVwjTkp+8IHVAqNnw5kWMWhm82MB0PkczR180R6Y9G2 1lWoZV/ZjM+b3IyP1rz6fRc5Pey4K5FQLY5YoUpJzmBieVU5YhaOGGUvKruwu+Can+WI KZig== X-Gm-Message-State: AOJu0YzlQnR5lGFFb3S0wZ4JAASWnjAmye6F7fY2st99cMipapoXweio EAV1odUHytKPaGD8FSQDwCATm63HjSLGJGVBVJYhAFh/tc920HmOapY7xNgU2umtKBJ9yi7ZJnC 198bsjQsk4g== X-Gm-Gg: AfdE7cmOCqpqR1PkM9P72ixOdOFG+reIFiNMnOmYcW7IKkodTactxcRvzmeTCUhLUhd hs6zOrHWvwc599Sl4wWA3JjHgax/PRh7rT7ykH7bYyY9oNL7zvplFI20UFinjE2iTKFtVBcVhHB FYpDiNNHJQ+acqZAl4406Q9LD4W64ab+tupxiPfNSxw2b7v3UN4fuNtltItOoEtQzbPgTnULoPv 0+r154ogotFHjrYVr2m7Niptt6lqRnuf7Th05f8Jikc16JSqJqBJ6ce01OvujP4IuTBBIUbzpAf Z2iDsFfoSSbysYYFqqkjjnA5pjdvWe2MKTy+fr+3UiHe54KsAFOHja4L4m/vVyeWtLGPFmSxvzT vpJ/6AiJCAxQ/EpkIEdgCnT/gBNdWtEQzf2/J+IAhCERNL1gPli5tx2qq1RCD2pGvCHrDCnJQPB 6OzRGSsDZ5ICEHDaR29FQj5btQtOCk0ZXroRp/y7VFywSDTeKxzdvxFAJ8HGLimW9vHCaTqRGUn Gqg0KSKJjCq+vRO8UnmSxYLxcpWST5y X-Received: by 2002:a05:600c:6749:b0:493:edde:54c8 with SMTP id 5b1f17b1804b1-493f8885b92mr105539245e9.8.1783956767050; Mon, 13 Jul 2026 08:32:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/26] docs/system: document FEAT_IVIPT Date: Mon, 13 Jul 2026 16:32:20 +0100 Message-ID: <20260713153233.3391818-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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: 1783956900099158500 From: Alex Benn=C3=A9e This is for documentation completeness - a system implements FEAT_IVIPT if it implements any permitted instruction cache implementation. QEMU doesn't model caches which is a permitted (non)implementation. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-6-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 05e85d7a367..7806982e0d6 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -104,6 +104,7 @@ the following architecture extensions: - FEAT_I8MM (AArch64 Int8 matrix multiplication instructions) - FEAT_IDST (ID space trap handling) - FEAT_IESB (Implicit error synchronization event) +- FEAT_IVIPT (The IVIPT Extension) - FEAT_JSCVT (JavaScript conversion instructions) - FEAT_LittleEnd (Support for little-endian at EL1 and above) - FEAT_LittleEndEL0 (Support for little-endian at EL0) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956813; cv=none; d=zohomail.com; s=zohoarc; b=oEcRW8pSBr/9RMFI5cQujU2mXpOQ48E0Jbvesm+XW/KyRKv0I0H2rne9WOwJMX2EX17+6lJg9xhJZ+78d9QqionKWF+4OX/N+Bp6Y9dqdZqceWTOJ+DVA1k6dz29G4rrWpLqH5ZooSnKx9wW5sYTIp9zxNP1Fp+TMQmJjuTCtU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956813; 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=K8ImuL8sE4fwwihfUxdtRBCshDkOb3mVVTN5ujtcTjk=; b=a3ijOWGrB5/8YK8rsvjatwsIVKHAGs+kaLYsQjhyF286G21U0qkLcQQSKj+I9c1RedpMKpxRa8aS2zG+VoLIgzJFNktBR3nqTnzAEnliwnBrYZXSZiZSnAZrT19c1TkMw0406WimnY1SGZQjP9YLQOYip0riRA9dmklLB6zG9Tw= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956813776949.4103615243117; Mon, 13 Jul 2026 08:33:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIek-0000bY-Dz; Mon, 13 Jul 2026 11:33:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeK-0008Ss-Ug for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeI-00019G-0T for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:52 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-493bb510ce4so23509365e9.1 for ; Mon, 13 Jul 2026 08:32:49 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956768; x=1784561568; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=K8ImuL8sE4fwwihfUxdtRBCshDkOb3mVVTN5ujtcTjk=; b=ggXzxRtBYf3eS6X8GkDSVuNrZUgzTjhQ2nBoXA6cFvGUNjx/EiMD3tXCREk/A4OKNE rS8v47fJQw8RV4BrzI5NGj77JmnALrcOPBFEDFa94Hvio38B9E/0crlBcHLk5sSBN0+Q ih+nUIpAm1abIyJ+W1D42s22NofXE87yhY26K9rz9auQww8Gv2a1qWXj47YFqte42BC2 aULxrkLRrpcF7vybyrH6hJWykv9N0QVEBwBAPkzFXTuFV+fqqd2dqJxVw0E01qZH4rEE h2eTILxXVPkedkEKAkgmBcxx1gior1ScsgJnsW8j1MfDN87sI5EYUxlTwkMPIcT8YuKT MfgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956768; x=1784561568; h=content-transfer-encoding:content-type: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 :content-type; bh=K8ImuL8sE4fwwihfUxdtRBCshDkOb3mVVTN5ujtcTjk=; b=fwcxHj5x5cnfPUAiFOdceOpGZJZjiWDFOwD16iPZXo3eMCOz59lxlJf7Fm7ribu9Ew 0db84bxlZFMMApCcyJkGSBc+RZaVm8JISOcFTMsNH6N51fpw745dBERYLv3pPPbIpRac aS/L2geAK1GVSr2GwP1rjVsTyE2qbgj2jnzgulzAo7isus9cnmMXFfd/PjjySkP1wkZT R/3oj6IZAus0nQS5sWikySjvgDQsIj5o3iQWRF1FueZv6JF3hrqEym5LaU4O4ym9jRNW kfujILw11Pk75Qf6752H+4Mz3DB8BCcasY31O0mnR9U8aM4l0dErNJNT2Oghv6Q8/BCI Wkgg== X-Gm-Message-State: AOJu0YzzfMFPyNyL/gjVCKvAYErYSRpf13ENMOFbpwvTWDppKP3fWpIp n2AF84regysSt1dXVrCJ2sv92dfNSqfaNFADrjXZbhEGIgZKpzgQu/rJMuVRnD6XFvsW6sY0IAS xQ8Ow42re8g== X-Gm-Gg: AfdE7cmDwZeUqNK5rj/DILTVUahvbEvscrTa5FyeK098XrVrQIuDNXgy4RYLDpwp8kJ M/FFZvAmKM7PLy5X8wYt0DRmZPMjTqiD83P1BOQWbO+4gcrwSZYndS5VdZjTqBu3qet8F52qt2M SVcZjsLVUYRiRaYAfqGK9zqTNoKE//UF1iKKuIQR+ptQfaG6WRNZBAPcRsjqlhlx6XhgA3uhsf6 5FDqsAIboDPpBedkcYoB7mG4kOdt0ichBLWSVWR26ySLszTGQPwmXbEa0daDKYxc7+FQGdbhzKr 1wsFIVNZIt3Z9Y2f+wTtXkXMISfY3i1q5WVUvYvgSc3bMhejjV+Cl+V7vof7+ypyGXwEj8FUpDv SazMKYtXxcJl1JR6bN1aiqfOqwTbZWzT6I1A6t89hPtqwV+RLmNfWO49fJU1myrvnbbo8uGQcGI owF2KGcmWn/INlbu7peqph1OLZmA3isUxVMWEjAQma2Z3/a5kxCclbelrWO1PcSOSNxypLSIsag XFebtyaipESuk20ctWOcg== X-Received: by 2002:a05:600c:c166:b0:493:f262:cc4c with SMTP id 5b1f17b1804b1-493f881907amr98332225e9.23.1783956768215; Mon, 13 Jul 2026 08:32:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/26] docs/system: fix sorting of FEAT_S2[PIE|FWB] Date: Mon, 13 Jul 2026 16:32:21 +0100 Message-ID: <20260713153233.3391818-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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: 1783956815568158501 From: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-7-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 7806982e0d6..b4b65694ff5 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -160,8 +160,8 @@ the following architecture extensions: - FEAT_RNG_TRAP (Trapping support for RNDR/RNDRRS) - FEAT_RPRES (Increased precision of FRECPE and FRSQRTE) - FEAT_S1PIE (Stage 1 permission indirections) -- FEAT_S2PIE (Stage 2 permission indirections) - FEAT_S2FWB (Stage 2 forced Write-Back) +- FEAT_S2PIE (Stage 2 permission indirections) - FEAT_SB (Speculation Barrier) - FEAT_SCTLR2 (Extension to SCTLR_ELx) - FEAT_Secure (Support for Secure state) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956868; cv=none; d=zohomail.com; s=zohoarc; b=AoDWdz4ThwE+zUC5dEtpDTvHuMmGxvVtlZe8kNGmVRxOJewwwy9zIDc83rCiHxDUHVWNTdUcz1g7M2P4N6+SBIXDjxdRoYLHpA3jsBHSOzYa9l3gqv0Ft2D8iLZ0FoAc4nKEA5DhI5SUgbUBjTE2n4tKL1KdnBcRCG2Q6FkF+Wg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956868; 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=AXZ0eN7Zo0Hlbw2MrFqxIJVvcQpJCtShcmKJD0GREgw=; b=g1v8N/HDlz6fpPR6wlL+zLY/Q45QZ00ojm5t9/s0ffh/s2R1qJql7Twogykfxlcn70Dso7h4mOe7z6jB1zZLb4p52joIHkZRshLF3XFM5SQTsKDiMOyKR9FVDH3bvVO+bdnTwEXA5xz8AGFjv22l+U8Z8p4kDZjzIs0Trq0HMn0= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956868717425.69783361663156; Mon, 13 Jul 2026 08:34:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIek-0000bd-EV; Mon, 13 Jul 2026 11:33:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0008US-Si for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:04 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeK-00019U-7G for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:54 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-493f431e317so602305e9.0 for ; Mon, 13 Jul 2026 08:32:50 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956769; x=1784561569; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=AXZ0eN7Zo0Hlbw2MrFqxIJVvcQpJCtShcmKJD0GREgw=; b=V4Yzs4UfWeaokjlGgRGEd+75VheTGEtcFweXK6GTFSPXx7eWjuPN2+QQ0H33BxVp1M 4r2OB/tpzv/iob5tDIBnR2ZGBofylG9tFs224v2Wx+Gp27WgY6LwzwTkebHfl7cCnTP7 L+u484qCmJzewUiou7YAYuYJvEcMzlEsVKMQMfvxo9lIOrz+eCZ+BSVYV8RsoZNQDwgp oHg2MbZxMoaUyURK+TpZ4aRpY7/Gu/IMiR35JQyFBgw3wDOP8R1DpFPoXqEyQcD93tQP TAtoniSYSC4PC8TmiQ9XLlndKMg9rFFTTBXz/RDRnQJQlWoW7fCQHIVb+gSyWMxta8Lx fuBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956769; x=1784561569; h=content-transfer-encoding:content-type: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 :content-type; bh=AXZ0eN7Zo0Hlbw2MrFqxIJVvcQpJCtShcmKJD0GREgw=; b=qKAJTYbWccBNjkTQIwiPcLG5NsPUrtievwIzRXe6eRwBC/65qi7SBj5BnUdLkMhkz8 wb7msh/pygfIqlXUlJ+mHExiDrBYdmuANjkTfSIxOPCS4aBap2anwLRkWntADoZjzv8s SLrziSz1Jp0aNjl6DlgLMp0M2M/4NtIzrrlSSb6W3cC8iQpJACUMKTc5L/i4fzAqi8+A zAr1b69pkY+cbFKhNO+++IWCz9NgJDVfg8K9SWij5r1qcFlANFBAaLsw7HY/e+wF/vNe j3zniNFO8nVZpIl6rU/BUA/AnRPDCHynylJU0WlI+lU7FlHCav3dJSek0OhcYjTC/Jp0 H/XA== X-Gm-Message-State: AOJu0YzApZfL5vBHB0FN9WAOuJSr9ALIQpjagskHec8MD+pYlo3njO3d 4378NoOaRv0cf+jwe8/yQ3GdPASbsfgExt9Vc68m0kjq9ndrqUAzbh6Zz8sJbOUC1cQCREmb5OG qrJOCqVVfyg== X-Gm-Gg: AfdE7clMOfEIMS2gx7u+cPt1a4RJkjE8W5OLPlyHiQwto1/JQI37OGDaZr4MKn8R+h+ w0Fi64TH+XLB1Q6HvlJVefaaJVBYL/ee60gP0RoBY5rbXPrLd+9fXRSRLRhNKiJpGgaLifSlR66 +LIhLyYoGtZN6qteUO0aJRWj/U36CqkSlpRri32KZ75dydD/3gQB3G0x5afh02dJSiv1Oc+gi35 sVe3daC8sekY2BcS7hpVrc3V2sFYe+GWAwG17KLRD/xpBbmI0EaaNBcfUenDdsB+tB6E2JBu7ob vwAeVjiqP6VVgrJzQYxzwPURCRed9xxB9VvGS3sb6JQW24LtDOBmkSZXo06bXDlpZPCywln+Q3R yNpfB3dT0qm5XAGEoTS7r5whsik9wRoElVEo3OrYn3UStsMNsvPU/nDYrcLr0Rmi/8I3CDuBeL8 KHZoxObCaQwUOV8WRbHhyDO+w3bqPyo+K1SRxwBpqbTKI3H8llftLJJiwQzxDXaSbWMce571dr0 q1LUVw= X-Received: by 2002:a05:600c:16ca:b0:493:c1bc:79bd with SMTP id 5b1f17b1804b1-493f88180f9mr61437695e9.20.1783956769085; Mon, 13 Jul 2026 08:32:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/26] docs/system: add FEAT_S2TGran[4|16|64]K features Date: Mon, 13 Jul 2026 16:32:22 +0100 Message-ID: <20260713153233.3391818-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956869873158500 From: Alex Benn=C3=A9e We already have the logic to handle these granule sizes in our stage 2 page table walk code. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-8-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index b4b65694ff5..903a5f90880 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -162,6 +162,9 @@ the following architecture extensions: - FEAT_S1PIE (Stage 1 permission indirections) - FEAT_S2FWB (Stage 2 forced Write-Back) - FEAT_S2PIE (Stage 2 permission indirections) +- FEAT_S2TGran16K (Support for 16KB memory translation granule size at sta= ge 2) +- FEAT_S2TGran4K (Support for 4KB memory translation granule size at stage= 2) +- FEAT_S2TGran64K (Support for 64KB memory translation granule size at sta= ge 2) - FEAT_SB (Speculation Barrier) - FEAT_SCTLR2 (Extension to SCTLR_ELx) - FEAT_Secure (Support for Secure state) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956895; cv=none; d=zohomail.com; s=zohoarc; b=O2w/gXLtugL3ABraDHcRlXVKtPdRbFQaxlIaKAT6h/0CJD8xRP3xIAWWLS8fjDKNOM5PmtAJAF2VJmt6piz8tAJxFB1GbI2XrB+DZ25gij5032XLJEh58fPvBKewuUYQzcsLIj9ax9SjKB2X+JQz4U6UfRKandiflMYKcB8Qvb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956895; 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=DoDTO26KrouGuDQsepvCm3zXNuI374PRo/EHI06RfAM=; b=WJYq1s9nAd5nGaPv6W9KspV8xT847jw9veWvLwhLZjPojk+NA+kUwmxUYjUk/HLw5p+oN7Zb0/FOKtbQa7rLY8bT3aHKf4oNHOAbnk7miR3LbnGBYQ79Z81YSKCuQS5cc0OqYfzwNhFeWKVgWstdPbv7655OEzeOqcSqB1m45VM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956895514360.7329982447169; Mon, 13 Jul 2026 08:34:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeb-0000D0-F5; Mon, 13 Jul 2026 11:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0008UR-Q9 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:02 -0400 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 1wjIeK-0001A9-Fa for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:54 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-493f45e206dso16252225e9.1 for ; Mon, 13 Jul 2026 08:32:50 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956770; x=1784561570; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=DoDTO26KrouGuDQsepvCm3zXNuI374PRo/EHI06RfAM=; b=GUTRxNf0LSkgm0BNhrbelE3hy0eDcTuzbSpaPLbFyYOu0E9J4Me5QTyxpUeAY155x8 9B4E4rLut2e/pdFSH6/7zNzlp+ADgOjAFljuVv6wFEveepJLTEIUEW0Jq3Qms4wD72bu A6jL5rdl2Nyl7lyiLYX3B2erzdcGLrGrVSVPfZWpCc6aC2ySWTC5Ka+6cnKdgMRUPVhb a8zilW+ZPN9ORi9G9gLqc+CCjfNRbfQDlFQfhfdjWrDdBZnOVXERxg/2MJqof5gartb9 3n7sT32+pKXugmG3Op9H7sK+0KDqyM8G64uz3d2IxBQEgYYx2zIIz54KRy2wL3ofr14O RGjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956770; x=1784561570; h=content-transfer-encoding:content-type: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 :content-type; bh=DoDTO26KrouGuDQsepvCm3zXNuI374PRo/EHI06RfAM=; b=ZReMQLxmAmIGbWHFbd1lJbKRQpwzKiL7GrUGlQufDK0QR7cg+JcPK8E2H81Ff1vHa0 8Z83XhrVIko0bKDiyynTa6pVp5DVdwOCF/7vuZkMXiq+E8cdzifz2YLzu6LXwBL5kDvq FODXq44OXaSaMX2xf886lqD+V77Q0Dh9On9x/MTJHIGhsR2lpdy3xZGHhnwnuMljoU0b 0AoXBm6zNEnoURME8NmrNm/qGrwSpnNmrlQv/psq5yx3Ue7AmQv4/ojxyrn6b5P27s/W XNFAWawLMPYlFqDiKZwLdu/xukR6BzccpSu6iPUADfKg9PShhbi4JV8hWRRcG8fKjPN2 VSSQ== X-Gm-Message-State: AOJu0YxYV8qBkBppywbZ6x5kVS1B6vK2R9HGjwwTHG4EocYJxqANOCbf 04b5d52H+PDL62mXspvrswuDzyZDw1TFbuxSK9HhMJeBxUZ6zmEXc6lhu31hniueWrDqTgu70co Ct0t2be7+5Q== X-Gm-Gg: AfdE7clO7E2IRQZo3wDKabgiyk7ObNvj+vPaw5MLXpZLnJZWuViPIFMwkLUZw7zHTaE 9uYocOq9fRZ4uRBvEZUZgpbokrRRZWfUDQ5D8zVkIMA1cPLf4xYhhTkS/sCyo276y1sfdqa5ZHH GR8M8cESA5/u5U1lu0PD5Bez7A6jRyN2nWF5qJ89zsLjMdZGZwkFswrV3CkvpWIihHutGf4OU6b ntlTV10+cNmytAtHuSj+tVebu5TwMT9O0jmmNj2D5cpKZd1d2224qQS9ZKZeMeHQGNHcfMwkMgT a3s1rBkY+cW8A6thqp5tmTottTZlieuAUrMhjlZzZJaUXiWPbGCqeRUI4W7WQ22UxudUqQTeDCB HKxVxWRAE36ZHn2NZfhmpFp8Jm2noESOho4hkkLK90q0ywv8HIwbkMCS2wykR1BruRtU+y6xHvz nEzTo4jfXSIBK7e+tx3IN08mp5SJfeemChjiyf7ejFibMi2UAwyY3aBnEhyp8n+wQV4OL9vz3R8 bVhbbx4p2m2Gdpx1aXbRg== X-Received: by 2002:a05:600c:8b53:b0:493:f13c:9c03 with SMTP id 5b1f17b1804b1-493f88dc201mr91004205e9.19.1783956769912; Mon, 13 Jul 2026 08:32:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/26] docs/system: add FEAT_HAF Date: Mon, 13 Jul 2026 16:32:23 +0100 Message-ID: <20260713153233.3391818-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956896141158500 From: Alex Benn=C3=A9e This is a subset of FEAT_HAFDBS which we have already implemented. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-id: 20260708145841.3032079-9-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- docs/system/arm/emulation.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 903a5f90880..9930974a501 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -95,6 +95,7 @@ the following architecture extensions: - FEAT_FlagM2 (Enhancements to flag manipulation instructions) - FEAT_GCS (Guarded Control Stack Extension) - FEAT_GTG (Guest translation granule size) +- FEAT_HAF (Hardware management of the Access flag) - FEAT_HAFDBS (Hardware management of the access flag and dirty bit state) - FEAT_HBC (Hinted conditional branches) - FEAT_HCX (Support for the HCRX_EL2 register) --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783957061; cv=none; d=zohomail.com; s=zohoarc; b=Y24ReVRJTwO0hWJ8YsuFOGgi8LKpbQjn8PRc/YBbWLZH2CvRrqmWkKsEkySZxX4GAay464IHvE1iwVSolnuRhfByvgLSJGuK2VSc40V86xsV7uclQLKOCetqStJgN/Hau61wlRhpNsxdeeEJKhlr2Ne4VBr0R4YrnZYn8zzobiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783957061; 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=bkzleIr6QtX2FYwb1SY9PNRHwo9lxQmQ1xA229dq5sE=; b=bQgWhNSuvenbfXQR5FORs+cd8b/fgYgF9+enN4mHCwhe9tkK5L1fRLUxWM9Ax+5WkdjGl9se3iz+gTUH5FkHU00ux8jzkby7dX/24TPJKDPBpqtAxOisneZ5dduS4XePAwwth85rdcJ+GpOl7o6j7+0NPp0WH1BvO40bSocMqCs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783957061644201.84874390142977; Mon, 13 Jul 2026 08:37:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIee-0000Tx-V6; Mon, 13 Jul 2026 11:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0008UT-T1 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:04 -0400 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 1wjIeK-0001AO-H4 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:54 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-493ec555a26so21576715e9.0 for ; Mon, 13 Jul 2026 08:32:51 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956771; x=1784561571; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bkzleIr6QtX2FYwb1SY9PNRHwo9lxQmQ1xA229dq5sE=; b=wAKqczvJrZE1QkUav6meZ4dptMIpFkrdakgq0xHa1wZ2jgq9y55UK7msayhu3yCUo+ 9JBFD9HTvjVfVvznZYfycCtblKE/emNwKculC6XkYgsij3BO+ttdB9daLHxVMywXFmPy zl7rV0ce8z/vRWXMpZHXz6TEglDeCnZrlvk8uAMfqNcOEIvhcOVkmFnOuW1/3Ytcn8wk 4QH1iMOnmxIekGrxOO3Z9+5uw1gMPBUxi4M/TX+991fosemAH+BFJtlCEi/ffUJmQAJ1 VaJgIns0hdjBHnjk3QI0e/lcUfUtyzDbqc7zmnmxi01JV+Ipc0RBGySiRjnrtA309NZj 50aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956771; x=1784561571; h=content-transfer-encoding:content-type: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 :content-type; bh=bkzleIr6QtX2FYwb1SY9PNRHwo9lxQmQ1xA229dq5sE=; b=ZWTMUD+zG87MqWQbRiT6MZbLxTH7Lr11IQ0CDX79MBOht4kAZoiC/kXryXn80+Rq9D X+4wI+cHkxD3ovecWVEjNpOtpXpA8a5g9U75HoJwZQh51ACKjyrEZRNOAucg618iZDku JWbhQmrWexwQgwa5+o5E91JWqz0+3aIFIGmp9SI0AxqpQ6C0gDkbMfawB4/ceojbdMfz JjgZcaSSuZHtlTKPYtc6QR6U2U/pFP8ohmScm6vpPPlL88ohgSk0Ll9l2nl+en/msB3y XembGHprIxcR7YFpNYJCMaYAfma+sFlqpvrdGtvLOThGNvHqK+eP6G7HKwPCf3LwUJ0D 1mWA== X-Gm-Message-State: AOJu0Yzavt+4tns1KtToqQZFVToIqzs9z08kDUAgwj3sNhPcReVLdhZb PSq26tNtOriM0RCmSXMRmy7hPnIjZGy5dfwn4qNT48ITmrGwAI5R00QuFzL6EFgKCR3orlxg6FW l635Byi5XkQ== X-Gm-Gg: AfdE7cn0ZtbuaaoULdRy0igJ2vrfF94JR8ULLfh1iGTMVQyzYtDQbDD2ZEeb3JaffdE w6EKLYeSO8+I/LnZIsDfVPiUG9zg9skH6LJy6oW4FjWD4//cNzE8xudSc41/V7H2ySa6Hm7n9So P55anOog6qorg3hQ01qSY5iH2y//E1Bjps/kmTZuuK1wbaCqEoaYQ4xTnZtu8R20wB8gp0pNElb zi6csvb0ZSNX4nQPPuw365novZVmmMhH6l01pJUhLv23FmvDq+sxzPlQYronYpjTIc9slLzzPsa BZ9oFdmq2RP4DkC71Q5o1/SAyIQClRUM74KnJs3MVKh3qWJ9K2X+aPHfsoXIUezg+dc14DOwNsU rQgTdIYFx+S3gtEkhsxTqd+NmMHmua09Ls/HB6dMCx7a2n5LI6gjYqiC8mpeA+L80xkgDluNRup PjvDUC58yHtYb1My8iyauJWDu4+S2Ki649kgxSiRLevqKbIBAYu8VLllTNPm5kslkTLL+Vx4+rR wdL7II/r+UzwblKKBytTA== X-Received: by 2002:a05:600c:4e46:b0:493:efcd:b809 with SMTP id 5b1f17b1804b1-49401d2d054mr42817155e9.6.1783956770905; Mon, 13 Jul 2026 08:32:50 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/26] arm/virt: fix smmuv3_devices leak Date: Mon, 13 Jul 2026 16:32:24 +0100 Message-ID: <20260713153233.3391818-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783957063465158500 From: Marc-Andr=C3=A9 Lureau Fixes: 92e340997f861 ("hw/arm/virt: Use stored SMMUv3 device list for IORT = build") Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20260709111225.1106856-1-marcandre.lureau@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 6a3c69ba8f9..219597cabd0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -4417,6 +4417,7 @@ static void virt_instance_finalize(Object *obj) } g_free(vms->oem_id); g_free(vms->oem_table_id); + g_ptr_array_free(vms->smmuv3_devices, TRUE); } =20 static const TypeInfo virt_machine_info =3D { --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783957003; cv=none; d=zohomail.com; s=zohoarc; b=AI0gekukrvgeBHg3cJCy3V8+4mAtFcMeF493yC/j/YyEM2WVKO5DmIU1Dwci5JJQOlPViQ3cS9ClIyqa+tWYQS1Ojzu+EwcxA0e3di9439Jr6KuKqQ1W1ora+uj69h9h8p/u6xOsRN6+SuPt66+tPwMNP/x8lDnVtWmXsVKzB0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783957003; 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=ajrBT9nquBJGmemt6AIpUXqNFeuhFS97gkkTM0m0NeU=; b=CtaKpZozkmhRe37jgC6xpVa52WBZAQ5SXRNYQ4gP/dK9+NU1mkLu3E8VfoSvEi5wG21EAwKMhMdfBCGW/F0W/dfE5V6lHwbsY8dZxFYy5GAk0LE6/v4Ss/HX789/t4RwVHb4ZWRhfTtRT7HPwUfFv28L6LokgtXlHHl8HE0zJKc= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783957003202118.77451724761374; Mon, 13 Jul 2026 08:36:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIef-0000Uh-8e; Mon, 13 Jul 2026 11:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0008UU-Tz for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:04 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeM-0001AY-GL for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:56 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-493bc8fda98so454965e9.0 for ; Mon, 13 Jul 2026 08:32:52 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956772; x=1784561572; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ajrBT9nquBJGmemt6AIpUXqNFeuhFS97gkkTM0m0NeU=; b=pgj8ziM1r9MqibaT9NC/WYlJAS4Kj7QB+G+uBqTIrdUdFvTQ4KIuNeEpJTg++fCR91 8CuHD5RI6o78J64RnN+dNKvLxQxJ2G1gpArbv4VNuC9cXyg6wiZD2aqtwS35BG5nrhlb pO2Ygm+iJH9q6dvi7VBRxEHF3aO5XLTsHrV7il5zsPyao5hHuXez+l4S9NfubbQBCDh+ lvFoGXEVejimTnhALGZ4ygfG+Re6rnzYjnPXzkLdy9AOFC2cwxHPTPqWPOljUWeTcbfH SXF0Tj9dtfL+WYDbLcX6NPmXIsOi160E1K2OEIT00tkqjqjk2J+zEOEDaY6q4G2/rNO0 zHxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956772; x=1784561572; h=content-transfer-encoding:content-type: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 :content-type; bh=ajrBT9nquBJGmemt6AIpUXqNFeuhFS97gkkTM0m0NeU=; b=IqxWtYrgcg42m5OLzyGrdVQUYc+jOXy45Xt8KD+clvlkpjAdaIR66W9rwyEHeS2K7o 8OXTdMn3SFbiU1lPmIc8BA7fSx20uoEHpDRNG6ATcSyEZbMgarysXAN6NNGtWtmtkKXt 24ZfFYDGSu0bFte54N+UljAPOoV5QU6BCxglnEFnbSQ/qL5l/wRUDzsFSc1zCrQGGTaB dlf8zE6TsDMrrPIdWltIRXt8Sz+8jaq+fCPmEVjfUPrcp7xRidGdgfHWllFl6iKLL8Rs xlVqE+aFh2vVtX9P3c6yeiAu+t7KadgpuDj0mOWidzoOFi4qpYnhPS/RXlsTm/J8LKCz 03bA== X-Gm-Message-State: AOJu0YxdiIwuy9PBfT7kBe7B6m/Ui+cSzlBmlEt1Z7zFBJAKuo2IrtLR WTClTdbnIPH7jgy4LV/j/nIDqHYB/Bw4qg/LnVysT6wIKM0AYLRrTplsEVBMgBzMQoAoFj7NyS+ /EuMShlT1Wg== X-Gm-Gg: AfdE7cm18VJYBUvcFVGLWtlLzu4/GYNScHbpmFlrEuHthozb8IMhsPb2kCeHkbgIqUB KjpJv6UF41c2BXNts9AkjnlknGJ+hT0C2nrJcwdMGYvQTGWJVDRIWvBeYV3fs8djrZEsIEAnxfw OGhH9CfKc9rCyZ1if5fhOcspZrmyfpNsPMGHvHEAYUtYn3y0D4h8vp5mltN7c9KUGfKiL9YPMJi qGgAYgSFJWi07hJUilPvHAdSGM3qFtrKLdgHGh00NO1S7igD/VKEbRpuNSRREm/OQ4l6TStowYI A8yjxuYYysTRoZ0ztmRcg6pUHaoeiX/krpo7vURv8iMTRLslxhMuUByE/DhpyTgeqPMBtvvWN0s +LckZRlpPiO+iSuNOok62ZUFLF9Kl7dGADpQUpD0RH0UI0jwZ27z2XyzvBQic67wfVjn9Nd9FOU KbOGNDg4v62eNpemMz8g66I0j4Os51yWyaW/XqgdpMs2HlnvWvjXSMIp6V92LNGTTc2qLnJZliT HmCDlT2QBiDBz9GjMcv5Q== X-Received: by 2002:a05:600c:1914:b0:492:7019:caca with SMTP id 5b1f17b1804b1-493f882911fmr100644755e9.26.1783956771731; Mon, 13 Jul 2026 08:32:51 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/26] target/arm: Be more defensive for invalid tlbi_aa64_get_range Date: Mon, 13 Jul 2026 16:32:25 +0100 Message-ID: <20260713153233.3391818-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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: 1783957004926158500 From: Richard Henderson It's possible to program TCR_ELx with an invalid granule size, which could match passing an invalid granule size to TLBI RVA, which would then fall through to assert in arm_granule_bits. Cc: qemu-stable@nongnu.org Fixes: 3c003f7029e ("target/arm: Use ARMGranuleSize in ARMVAParameters") Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260710175818.528974-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/tlb-insns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/tcg/tlb-insns.c b/target/arm/tcg/tlb-insns.c index 1a0a3325836..b24eb57788b 100644 --- a/target/arm/tcg/tlb-insns.c +++ b/target/arm/tcg/tlb-insns.c @@ -854,7 +854,7 @@ static TLBIRange tlbi_aa64_get_range(CPUARMState *env, = ARMMMUIdx mmuidx, gran =3D tlbi_range_tg_to_gran_size(page_size_granule); =20 /* The granule encoded in value must match the granule in use. */ - if (gran !=3D param.gran) { + if (gran !=3D param.gran || gran =3D=3D GranInvalid) { qemu_log_mask(LOG_GUEST_ERROR, "Invalid tlbi page size granule %d\= n", page_size_granule); return ret; --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783957067; cv=none; d=zohomail.com; s=zohoarc; b=M0Tn8u2IuKe31uG4vcsu2FWMB4cqXMvePvQH7cgRFXXJHQKTmqnYUMXKpmgehjVLqwrRYVLF5qjDafcKT0B1b/AigWsRAq6facgM1F1QAmyfatPu+OBeji0UBmmp2cOwe9xoyvto9Q6oBD2wv+7/kQ5zOCBVGWofjzxW4rqet2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783957067; 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=mmr/j5Sdb8E/oADRlX/72Tk23KUJknScj9a13d2/X5s=; b=iT2I+EGIQHVsab8EqB1mbQtZYdQ0niZf4nbz6eZGm1h5gp38OUN1BZGtuI3Zj1ulQg6VfLTN2cVhgf2nig1ypeWE37tPj+FZ1KilscF3J93MobTh75IZ8VubWCghuqQpmIkUuWrJ1kQzd0Uthm7eCJ1C+Nwu6HJFK4z4igNAAiA= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783957067675991.6566446349375; Mon, 13 Jul 2026 08:37:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIen-0000nO-Jc; Mon, 13 Jul 2026 11:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeS-0008Un-OW for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x0b.google.com ([2a00:1450:4864:31::b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0001Bb-IP for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:59 -0400 Received: by mail-wm2-x0b.google.com with SMTP id 5b1f17b1804b1-493d43b6c28so178765e9.1 for ; Mon, 13 Jul 2026 08:32:54 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956772; x=1784561572; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mmr/j5Sdb8E/oADRlX/72Tk23KUJknScj9a13d2/X5s=; b=usOVg4RhDC4EsmJzHPVD/RFVLrW8vstJ+BfSuMU++WB3T/BSbY/wEsdRBLLyHbUovw SIzaKGixAoW0hG+70dGhq7PVn2HZa5jaJuIJSVG3LuMZ/VY08ZKAe7LcwCrGXSsWo0Qa b7PMEk60ye3EZP8B/Y6w1VGi5rHiC4uYJ2gJ6osXLjXOvXbBufrjVBUyxIu4STH3/wuH foX2Gywap8bLkc7MAehhv9asBQS8wyPRFQ1lfSi6EZWAM2w9YdebPnvZMMtuaLPnSzWk JHVtSNYOooOIDHkgkWpGJr/4fpeZJQaMiqu9jPhZsAmweijNSKeVjf2s1P8Ae5+2EH5m 3pVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956772; x=1784561572; h=content-transfer-encoding:content-type: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 :content-type; bh=mmr/j5Sdb8E/oADRlX/72Tk23KUJknScj9a13d2/X5s=; b=sDn1SgUyWZyZ21dpURdIYPC69v975wtP2AANiEAUUSgrUELtBVq3PEmwDds5Mk/xpN M5amX2VjbFVes7XfzDpMXQwnTNhY0rQwP8sNIIrwzNEiMZhCtDNGXGMCzM4lfFVuroU8 Bp+95OQFkc1FMOdXejOjZmICEwZwcFv0yyfGet2NWYoEkFoLeTsYwMLGRRLQFjn3Se0d YRMmytCq/UQw+nGs1m+LBOLRVbEZORCfZ9PMpyc4jn74a/KqyZQjfU8ddZxQP5GzZuXo bceI2/cAwRsZmhBWMh7GK1fyK6ydIoa2t7hQKbKMlGaQoQtI8mTl/bCoht9n1MlXLbqd q1iA== X-Gm-Message-State: AOJu0YxWXz901RlyKxbqGeiw+t1pIds8JXVl+wtsOXnhOVG90DNZc/py boGj/H20R9zLWYnWYJW8Jg6SuKUSyw+99ezjTeh9pLEd/POfMrj8bKBKjusxgQhjGkvW/Txq+ol AR/IdonoGq6OO X-Gm-Gg: AfdE7clbXKmgWLN8n1qb7R/7YPFcOHLrIeuCi8gQDWPCRaiiKBSJC06oHkEtA+tLImD I3HY3yidessGg7wCNW8SGwjD7WufIW9iool3mLvf9ip5t1iSH9YSgqTiU+YRvHwxlG5mR90lGbX jrGMe1/WCn95GUF8CnsD+Gc7Hh8kUeWx0o/zB8GyPpvjSRM3f9C4Lxp3i5RkGj0fulDKp8H5O26 vuZJ/CkOf+NYDSzTReb1CoD/WqjJmGYQ2OFVoJHO+n3vy7A18e6DQf5DTzog9Y0Gm6RHCwjHPcT C4TSNCMVZLH9sUFeDH2WwF9uqekNh76PCvCjFkGZQyeoJxupSSB0jz3Wtxkx/apDmwKIJ88fGVJ b1ZKJGoe1/ICLpeWtftAoWEzcjWv+WXwOvdRdsBJcQKEynR6oUyt61ZMBesXzynvun3PsjEaUkQ yfVzWRsE2P6XvC4UvLwqEC5vd2ge9XYYE2n2PRJpRgdkGlFrm6j9WGFWLwKVrWc0QHTAr47Vwux bk6c/kr60pK9mqDW0cSZw== X-Received: by 2002:a05:600c:4e0b:b0:493:bc4a:c6b4 with SMTP id 5b1f17b1804b1-493f8851d13mr94451805e9.38.1783956772573; Mon, 13 Jul 2026 08:32:52 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/26] hw/dma: don't allow weird transfer lengths for bcm2835 Date: Mon, 13 Jul 2026 16:32:26 +0100 Message-ID: <20260713153233.3391818-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::b; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x0b.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, 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: 1783957069546158500 From: Alex Benn=C3=A9e The datasheet doesn't explicitly say that TXFR_LEN has to be word aligned but the fact there is a DMA_D_WIDTH flag to select between 32 bit and 128 bit strongly implies that is how it works. The downstream rpi kernel also goes to efforts to not write sub-4 byte lengths so lets: - fail when mis-programmed and report GUEST_ERROR - catch setting D_WIDTH for 128 bit and report UNIMP Yodel did some digging into the specs (see discussion link): {A} AMBA AXI Protocol Version: 2.0 Specification https://documentation-service.arm.com/static/64256e84314e245d086bc88f {B} BCM2835 ARM Peripherals https://datasheets.raspberrypi.com/bcm2835/bcm2835-peripherals.pdf [1] {A} (p. 10-2) [2] {B} (p. 51) [3] {A} (p. 14-5) [4] {A} (p. 4-3) [5] {A} (p. 9-4) [6] {B} (p. 53) However was unable to come up with an unambiguous conclusion without testing on the real hardware. So in the absence of certainty and for the sake of addressing the DoS I suggest we merge as is for now. Link: https://lore.kernel.org/all/20251111105429.3993300-1-alex.bennee@lina= ro.org/ Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3201 Signed-off-by: Alex Benn=C3=A9e Message-id: 20260710131500.2323848-1-alex.bennee@linaro.org Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell --- hw/dma/bcm2835_dma.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c index d07459de2d0..b842aef4b74 100644 --- a/hw/dma/bcm2835_dma.c +++ b/hw/dma/bcm2835_dma.c @@ -86,6 +86,23 @@ static void bcm2835_dma_update(BCM2835DMAState *s, unsig= ned c) } xlen_td =3D xlen; =20 + if (ch->ti & BCM2708_DMA_D_WIDTH) { + qemu_log_mask(LOG_UNIMP, "%s: 128bit transfers not yet support= ed", __func__); + ch->cs |=3D BCM2708_DMA_ERR; + break; + } + + /* + * Datasheet implies 32bit or 128bit transfers only + * + * TODO: test on real HW and report back. + */ + if (xlen & 0x3) { + qemu_log_mask(LOG_GUEST_ERROR, "%s: bad transfer size\n", __fu= nc__); + ch->cs |=3D BCM2708_DMA_ERR; + break; + } + while (ylen !=3D 0) { /* Normal transfer mode */ while (xlen !=3D 0) { --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956881; cv=none; d=zohomail.com; s=zohoarc; b=e1U8ZR2jHIpERF9VWTzBim7zz7VQuEp+MULm1Jm1az3/0sHoX7bkPOAFomSg9gQBldYEAQdbrC2SHi2RgO2R1cx7BCMD4Qoz1t/ZIDHt/KvwieDfdmgJJ1R7wFy8zMOQbHEKZUsXtZT2pTGzU4O8PXLzoaEBCZQLSEA0f+0JD3s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956881; 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=lKAMocpTV8X4I38gyaYAm08wo6o7waa7S4QxCfCs1Ls=; b=CadLTnygbKvSQeTb9e+SRia69goT9WSmP5TsNhqFa84C9U3lZOn2qbXgfHpNTDS0Z5dYbb0QbsUbimYu8H7s9NeN5XXZlAR78mSRO7TxK01QoEYXoe5P+6zh+4PqLyxWMm7O+FkZi5PhJHSL/xptVN1SCCSAzKOznMykJ6Ofi9M= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956881156300.68904145380304; Mon, 13 Jul 2026 08:34:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIeb-0000Dg-HH; Mon, 13 Jul 2026 11:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeS-0008Uk-Nf for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x01.google.com ([2a00:1450:4864:31::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0001BZ-Ho for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:58 -0400 Received: by mail-wm2-x01.google.com with SMTP id 5b1f17b1804b1-493b4af7976so26011555e9.1 for ; Mon, 13 Jul 2026 08:32:54 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956773; x=1784561573; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lKAMocpTV8X4I38gyaYAm08wo6o7waa7S4QxCfCs1Ls=; b=vVPc62G1YA80WIxZOGvNH/yUMOE/6EyELQgtQnYUMJZMeTs1DgMyy6hZ7CdQ1uSo9a vd9dToSjX2qFA8u95cuH7YGmgRkQ5zJ5V5cMRwInQaxK/Y0oxd2+8eImSCrD0AVvcrzs 3rbvbjT6JZ019RDsAnH3V/Gu5Nb1L3hfYIa21ZimQBd8iq7tA6V8kBdbQxly0+9frRCP bkt8YtVN1OA8QV3Cmxf5K1JpSC+zl/wyblHJ/S7b08QLBLCodfXMUSyXmkZAkDbqZM3w hO1U0/c5grcpAM3V+yFrNUxPTt8rywgswoM0/6yvV3GJUWNMafQhLsRZRpOSQ06ExBd6 vF4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956773; x=1784561573; h=content-transfer-encoding:content-type: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 :content-type; bh=lKAMocpTV8X4I38gyaYAm08wo6o7waa7S4QxCfCs1Ls=; b=IegaYu5bd3RIoZcb8jUkbDBMuX5vsygTwXet1bjVyqN25V3tkE1ofF6VvWQOPvWCPa mJ1z6b2TnDLTHM3fF6l1NWnhzV2dh6go3GWGGpOaxkwJfP6jPE3yMB43VSFFGan3LWVI F/TcqWHSNBbWMUiETHhi0NFiJh756E3/GiXTO9Y45tC+uWX6XiZOJBi4OPmZs4Vcoc8v JR/dj2YT4sKnsDEpCJ8yxIbn9hjbKzFeN0L0t406xJg0myCr6AMyAVLEKuHSjHu82UQj b7qa+eawlGAAbkzoTtkXlanPWErOrPOdMZXjQksOL7HiL4z2ehAqqHm5jN+oiL9gZ0NX A4sQ== X-Gm-Message-State: AOJu0YzCHHsbyOkXk74VUv/okldOLmESTMJF+SMJPc5U0uOZ2UYw/RHL s3jIysBwIKaHA3a6hh0iw2s2wV07FNyxFJ6Iu52n1qGu8jgkDhvkHCut0DYEl/9suQlPGDxYXCe QiapOY3oLXyue X-Gm-Gg: AfdE7ckAWIPL9Y0QwLZgNBRmm2RNEOVQKo3oy29gd8+xe9QcyCqjvvMyadBgsdqqblm /ufVS1f2SruPWSSRj8IbdY83EQs44cHhJqteKhv/6F0d7hfzLvDeYwraV/Daw3NKX6xW/QphEbp XCJVdL0V+77N3CgKKQA9Ud811c2dk+GyzNqKvtmSL1qXlRxUnpGrGVDxnbxOSjGW5evCrVkxVgD 16BY0/fEB/mx48UtYrs4I4VpUVdtQu0nQcjpSb1kZgr8ICXdiRgd1+G/qY+S9rPIyHA6hb31YTF mCpQw94w3RImUC5aq+GF8GN7E5Gc8LFfm8p9jEB+VY4gbnOfKeofh6SiMXzoYYPAVpo+bPWPwsk zwaZHmEGYquV60UAfW6J0GaqC2QPVMEaDPDWO+Izg7yjFKoMb+Xf5zqfYcHfWGc2T4p4qCyJocS RA8CsVlj5OcxRcpTqTxbE34dK/vnQ9Cc69pLbpdj9BvWvRGpYGxZ7pVEiTuYxmKf4xtwYeh+YOZ 9LTTJIbd+WSKULGUesIpw== X-Received: by 2002:a05:600c:4ca4:b0:493:e974:41ac with SMTP id 5b1f17b1804b1-493f87ebbf4mr60655775e9.16.1783956773374; Mon, 13 Jul 2026 08:32:53 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/26] hw/net/vmxnet3: Correct bounds check on tx queue index Date: Mon, 13 Jul 2026 16:32:27 +0100 Message-ID: <20260713153233.3391818-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::1; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x01.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: 1783956881936158500 In vmxnet3_io_bar0_write(), we try to bounds-check the TX queue index provided by the guest against the total number of queues. However, we have an off-by-one error: the valid indexes are from 0 to txq_num-1, so we need a "<" comparison, not "<=3D". Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3780 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260706175408.905362-1-peter.maydell@linaro.org --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 97156dd33b9..8569484b2f2 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1079,7 +1079,7 @@ vmxnet3_io_bar0_write(void *opaque, hwaddr addr, int tx_queue_idx =3D VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_TXPROD, VMXNET3_REG_ALIGN); - if (tx_queue_idx <=3D s->txq_num) { + if (tx_queue_idx < s->txq_num) { vmxnet3_process_tx_queue(s, tx_queue_idx); } else { qemu_log_mask(LOG_GUEST_ERROR, "vmxnet3: Illegal TX queue %d/%= d\n", --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956904; cv=none; d=zohomail.com; s=zohoarc; b=W8rpa7q2qrz4uBU9SoQxQKWZF3hZzHjXjblv0w+ETnNFlGT9PmqdtbQQpxHPw9qy0fd7RLHANFiOD2GWVDv75rGroJpH9F6sx7ot3xa+vPhZlUtPWQQOMA7GdxCCecaWynZdptV/fCD3bv3iO9y+q7wNu89e/AErVIq2zFjIL8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956904; 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=mWc7rsld2U2uyI88Tyd1TA6QGlFezkeW+Ay+JQzr2Ig=; b=j6zcOGg5CoiPNf+k8kkF1UHlO83I8mOQHiypEt8X9GDWkQU4Z+7ZTdFP4YcSd6SCO39uSsqOe6pG0oUX/OKHmZhuBjt3VlJgHmslQZpCEnAZPckAkyUWNoE+NpbAWH3rH+j/6pu83xgZ7Pdba8jkSRAz/WFNmNi0a6MWjl8U6RY= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178395690405348.78879675591861; Mon, 13 Jul 2026 08:35:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIee-0000Sm-G0; Mon, 13 Jul 2026 11:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeQ-0008Ui-QJ for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x08.google.com ([2a00:1450:4864:31::8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0001C2-Fx for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:58 -0400 Received: by mail-wm2-x08.google.com with SMTP id 5b1f17b1804b1-493e63f4ef6so11485715e9.0 for ; Mon, 13 Jul 2026 08:32:55 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956774; x=1784561574; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mWc7rsld2U2uyI88Tyd1TA6QGlFezkeW+Ay+JQzr2Ig=; b=xsilXu9Zuv0rkTCAa1zOEDdZispio5OGDEZMOtBv0XDC1WHb335qaSfLtAckGoOebT NAAP2fLCgLNvXpSCxcJ91T6i6ymNYwnM12Bm/p3g3s3sXtuJql3s1pPfvU/KMGLJ0APa mQb4pu1u15NPYbQnrRYHMxl/tsT3rKDDGfRKuNguyIRLk+SlGZ0h4W1xnXXZDZKdAGfP VbnTojstoRPuVlAyKCav+Zi4bvuSvvWCgmldzq5My+H2/PzjiRG1WY5e7+QeOu+udjo0 eApysIsLkyGuRlE9lMK0uzo70vYa9pk6koasdi/wpuB21jgDEJJmzPJoNtKVH4DKFRCD 55nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956774; x=1784561574; h=content-transfer-encoding:content-type: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 :content-type; bh=mWc7rsld2U2uyI88Tyd1TA6QGlFezkeW+Ay+JQzr2Ig=; b=YKYkT56nYuhYzBuI4DA/nfsTKEjDQkt5A9ZNmQCsy/88SFu/ofqHnf1Kvww1xg5fez rQuHdyYNsbzsaE3OMC++J2SDo0VWgQsPP5LyuOd5UseWVCdVXagiMpcGWcBl7zMKwTkc IR2eJCMMP8mibEVNuNcjVhixQ02S98uPLqY3ZYE+N9yE8jv839Ag0X5uMKBvWFpegUfp 6UED2vMwckU7hzyoxNc11hu56G5HrBMmDvPE4A04vES5eE3DbJwmL4bHMBeYksZjA79s xdCM7Dga2xtKh6ipwZQxgOiJQEszcZv/+PHuq+RJBHynnAqr2BDkmVkO/uq9d+1U26RX LDFQ== X-Gm-Message-State: AOJu0Yy+NAZUviac6pOq0TKTICWhdpDXCd9p60q96m9KO8DxlFf+BZel GCbYV14j8TpSblM70L2GFFzwFpmihUhSzRy+xunFuf33VHYcgJbNIlhqiW+3ryn0hE6huAGpUNb 78FhtEb/6QTkt X-Gm-Gg: AfdE7cmdcP5R4JQbqohjuYATX1sLB3BwYw4WZgOR/TFDOyuh6pxRcj4PKiyFdsgddL4 afISQlwK9aBT7vuzAoS9KdGkbqBHNe9ZCGs+9UatNqGm1jta9yPC8M8Pzxowy5RizP6c3CfB18v jqXRVjPbl0nwfXuO1CwJ2xH5r7QNVf2s+MiU6itiQ6lMiClqSqdZ+EqUr99c0d5h8cZsfC+Ig8t bExw3xZK6Bdll4loWRtGttZ5HX8u1OpkFJGSfeY6X64noop3xdnrZby6Ip934c3L2CKBxjIcpZz tV57EI9ACCTFZmiyOLbneicGCu9H0Gwdw9YsiCMUu3MB7Uk3GnGiChEwp3haVyzFeApFvsStVQb 8ZVf7rhE6X3FtF/r04rQo64iL/QXegrn7YuJMZGaTzx+WxtjX5v8ykvSuCLfx60HFgXihOmRFGa 45XuYExN59w+8X6c0gei/92CypzGbbNuKNqupWnadOJe58Q26QUVBqvl32Pt2dvw9M4NveXuWT6 uwhSty2O/H6WVKDX87GykomgfdoZD/d X-Received: by 2002:a7b:ce97:0:b0:493:c2cc:aecb with SMTP id 5b1f17b1804b1-493f8839b4bmr76651895e9.38.1783956774444; Mon, 13 Jul 2026 08:32:54 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/26] hw/usb/dev-wacom: Don't write off end of buffer Date: Mon, 13 Jul 2026 16:32:28 +0100 Message-ID: <20260713153233.3391818-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::8; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x08.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, 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: 1783956906183158500 In usb_wacom_handle_data() we allocate a buffer with a size determined by the transfer size requested by the guest. We then fill it in by calling either usb_mouse_poll() or usb_wacom_poll(), both of which functions take a length and return an actual length, which we pass to usb_packet_copy(). However, usb_mouse_poll() doesn't check the buffer size as it fills in the buffer, so if the guest passes an overly short transfer size then it will write off the end of the allocated buffer. Check the length is at least big enough for the minimum 3 byte packet and return nothing if it is not, as usb_wacom_poll() does. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3672 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260706182034.1003176-1-peter.maydell@linaro.org --- hw/usb/dev-wacom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index c69e247f7b7..895edcc17e7 100644 --- a/hw/usb/dev-wacom.c +++ b/hw/usb/dev-wacom.c @@ -285,6 +285,10 @@ static int usb_mouse_poll(USBWacomState *s, uint8_t *b= uf, int len) b |=3D 0x04; } =20 + if (len < 3) { + return 0; + } + buf[0] =3D b; buf[1] =3D dx; buf[2] =3D dy; --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956836; cv=none; d=zohomail.com; s=zohoarc; b=fBkTStem9nAdApEpjKk/Z3pHAC5q/1Y/KAgR7wuSaJMeUrFxP1bHJXbzRkZsanfAgzr63uiiCxo3V/nHW73m1fYelCcQiUr7DaE01OM/sUGXZBHhkBbxdIho0klEC5SoflA8XnjcWEqfwUpBn+RZWAlzHAqwkiJnckH7lQ/8xH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956836; 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=QgPJk4BUyDewH+3y3PFKAK0sU7NiiLGvTpgnWeYce3Y=; b=mb+mqYDq3BQrduLJYRBnbRdx2mJikhcgsJwnv62EZzbDd9LNrT3edeZhLThrsjM1bNbnYn2/qxA4+ITwjlFJwld3p/CYYXrGBRU4dxjqKigmxcC7VafVEd/PIZCpDZQ+42GJieWTgdfg7z6DLm4LbozuCBZo/569k5hVYKwL5p8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956836505789.186881573186; Mon, 13 Jul 2026 08:33:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIef-0000Wr-Mb; Mon, 13 Jul 2026 11:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeS-0008Ul-O3 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x01.google.com ([2a00:1450:4864:31::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeO-0001CC-RR for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:59 -0400 Received: by mail-wm2-x01.google.com with SMTP id 5b1f17b1804b1-493b567a019so29914175e9.1 for ; Mon, 13 Jul 2026 08:32:56 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956775; x=1784561575; 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:content-type; bh=QgPJk4BUyDewH+3y3PFKAK0sU7NiiLGvTpgnWeYce3Y=; b=Sc1sPpf4volGJXJGzHIlgF8/E8HV/5PrFPItqfBQe0umQlb8ZbYnanhs0ltNCTT8BF 22ScZGSW2krxJpHilUllkcy/qZav2ZOW7q5zsnxvgMWXmYVXcFUuGv9EcS9R8hWsKXo8 pvR4R3yYOOizSaiP3F5pgjtcX24S/ZSMXi8WKgAueQzcDf6KRm/x93NzJcvgSIEbYWlW 4RS1qp6mIMBTjP9WfIwqS6jm/Yra5Ob15ypM50fOjA5p5CnnRiLkrL3xaCRL5PztRtkL dCRDKicgxIw38v6/lIISYXR9eH4IwtPvjcj6hMDTakPgjArjiyIqFNzT4A3ViEYVbU3K exNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956775; x=1784561575; 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:content-type; bh=QgPJk4BUyDewH+3y3PFKAK0sU7NiiLGvTpgnWeYce3Y=; b=GVs608kXnNcFFuwfr0TmeSEm6yDTh0Ul3FGFVu6aWg9wm8pyFbYYXwFUV255e3dEHL JrEjk4HTdcYqFD+9wC1pPdrSwCAk66dHZLmHySRoQtIwtMl5zAuAtGl6kLaROnIRzxc+ ZCXjNMbdWD0qOPIRoP6UA17gQbS6jH9E7SltgKmrSTqBUe+o9+MEOY6/HA6/XtHaF8gb nnkGhm4iLlK24Xd9y7BMzhpl4sdhQ2GLyjoRR0eKM/xuOwOOEKgzxga6CVE+zdFjVhRW umK9RLZ5G2Aj4Ey+CYuwix8oyb0pFs7Clrf6Cq0mJJHvddki5pW0Ta1Xg+kbVxK5HWxT AXOg== X-Gm-Message-State: AOJu0YwdPdMShOGcIDWDAMrZqMTn3kzOTf/SZKd9Fkvaa15VrnbpF8Hu h983VubWT1o8VFj3MuhAngY0Z8uy7ou49t3STV8QWKo/6Jof0bxQe+GyHx4sAnj7ityay8XYvHO yyZ8edYl3i3yt X-Gm-Gg: AfdE7cl4blViZixwnqQI8vcrx87wOsAwAk1i5OHotz847WPSVRYY/5Mw22qSegJzlHd Z3/7iY/HNVtmsL7eajyCwW2PiE4IJHKSBFeXg29dUCuPl/JGFIsDPVMgEcAlqmWyyH6tbWGDfoi V4+79hANwQIe0ZYoqJxHgyt5WPSPJbUC2FstNfLPeyi7LkJfTROb8EGTe2y9sjAq9XZ+4GS8uYG MXWXGCd0igC7RX6T00FYumnyYtzcYjz27NHVXOaOrftQuL1RioV6+ZQPbd45HA7UhMeNVzrPfTa n9zsqfcgGE2Djf1alNf3/Hs92ZhUdX2U731avnxSazsMTWs4FeIjZpX2sFf8iDoGMQwW6fAjVcV BbTN91eEvQDhGI/8Lm3GM98r+mwW7YL6CbGj3HchogwUs5V0FnqYtJJLKR7Ptxciu3c3EFXq7rU Za/1PhxRYrzmp0Z4ZAxjSfLu8aYxPFFwLEiEYFb32k2cXpnbF22i90XB6re6HsHyGBG4n2CbyyE p5X3Yf8o1bni8NDsZKE6w== X-Received: by 2002:a05:600c:6048:b0:493:e97d:97e3 with SMTP id 5b1f17b1804b1-493f883e9aamr74956195e9.39.1783956775362; Mon, 13 Jul 2026 08:32:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/26] hw/display/sm501: Catch bad coordinates for RTL operations Date: Mon, 13 Jul 2026 16:32:29 +0100 Message-ID: <20260713153233.3391818-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::1; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x01.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: 1783956837624158500 Content-Type: text/plain; charset="utf-8" The sm501 code doesn't check whether a right-to-left operation has specified a width greater than the x-coordinate (which would make it extend off the left edge of the screen), or similarly a height greater than the y-coordinate. This means the guest can misprogram the device so that we underflow when calculating the address of the top left pixel, which might result in accessing out of bounds memory. Catch this as a guest error and ignore the operation. Reported-by: Yannick Wang Tested-by: BALATON Zoltan Reviewed-by: BALATON Zoltan Signed-off-by: Peter Maydell Message-id: 20260707150933.1410507-2-peter.maydell@linaro.org Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3920 Signed-off-by: Peter Maydell --- hw/display/sm501.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index af870048372..0da25477bcc 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -723,6 +723,10 @@ static void sm501_2d_operation(SM501State *s) } =20 if (rtl) { + if (dst_x < (width - 1) || dst_y < (height - 1)) { + qemu_log_mask(LOG_GUEST_ERROR, "sm501: RTL op out of bounds\n"= ); + return; + } dst_x -=3D width - 1; dst_y -=3D height - 1; } @@ -748,6 +752,10 @@ static void sm501_2d_operation(SM501State *s) } =20 if (rtl) { + if (src_x < (width - 1) || src_y < (height - 1)) { + qemu_log_mask(LOG_GUEST_ERROR, "sm501: RTL op out of bound= s\n"); + return; + } src_x -=3D width - 1; src_y -=3D height - 1; } --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956998; cv=none; d=zohomail.com; s=zohoarc; b=RDS9pO8gnO43MaA1TniCGGW3hbkivk8KuMhiDyyfbjsKe4R7plEqLsvkDJsOAW1RdquXanYwbRD2//DKlwINKvYXdIa2k6LSS7J8wov6Em5zIfYdSQBO9xYELocvwkd6OxCjljM7m4wdcOyXkxBOtF9HkQox/w05ypuGz1so3iE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956998; 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=ieQsAJoqFn50qrRvzEKESxTia16D/RzkytXdep5v5mI=; b=ObQdHitPiwJeyyrvjXEVsR3KSdvKzkqI1GlEBs32NSk2KH+6dgaxsD2ye7c7uyoTbbkNHQXouXlUZFULbB+OaVM5ohjV2naYWA7ytwqBi20tt+WUjJfS+3H31K1XkWaahcutGT+W6QFDIGtnn/l5aD1zLt1YMakUqA8f6Nm991k= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783956998838298.9155882071467; Mon, 13 Jul 2026 08:36:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIef-0000Ww-Mj; Mon, 13 Jul 2026 11:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeS-0008Um-O9 for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x0b.google.com ([2a00:1450:4864:31::b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeP-0001Cp-Ig for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:32:59 -0400 Received: by mail-wm2-x0b.google.com with SMTP id 5b1f17b1804b1-493f17dc838so11291005e9.1 for ; Mon, 13 Jul 2026 08:32:57 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956776; x=1784561576; 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:content-type; bh=ieQsAJoqFn50qrRvzEKESxTia16D/RzkytXdep5v5mI=; b=ZIeQXp/jpMZ8smUDN8KHZsZ9H0soYcVoDj4E5I3LDrrg7P2QMFzNG8Zb+nyLn6SxPA yXG///AbA8u6e2PCdoGkZGLlZOegqZterQoPnZvZTE8HfsR2xg0PwG3PkqlRBgPA8gwx ksN7G0h51p67D80OLrs1neYDggrN5GMlV8tGreSVpC16CtcIPeVE+VPlf9BXyJGAFngT j1Oq1C0KSwDjBrbVF/FDLdpgeMHkuQQVoKPpFOnx4lV3deP421lwLhgZRnUluXVmoJSx JiZ10c6Te0Jt7daDBuIJPfjYWZAn9h14CkrT4gu22fuaHOA5aiUeDDNLJtg0aQhFM45L uzQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956776; x=1784561576; 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:content-type; bh=ieQsAJoqFn50qrRvzEKESxTia16D/RzkytXdep5v5mI=; b=L0y984mGzOqlPLhMj8wTLwSMR0jT75pTTlcRb6CyF7+pfS9hsLEqrCp8Try+GNIJFV YBEIzLnUVb85CJx0FuogEvFHw8Ul2zvQSHoHYh77ptHwiAfeiPIKdMOcWaeFOtfODbOC N0p5VdN1taHVzWXycUJsQ+JtmkcmGxlJXfRSrWxLfSdEJIi0Hk//Bho8qjSHr2i4fMGS hihsO7HJFuvWMoy/AzFMAXT+jAKzZelqwzgS8nrRxWgevhFYgLHkFft7Qn0dbVNKTIvr qm8ku/7yYn6P6cFsCrwBdMYnJdA0wY6BdYWcujWArn9C4MWvOGVST4Qbt0ZBYPvAbz06 zJ2A== X-Gm-Message-State: AOJu0Yw5nQVTSt9edbZNzlLJeggg6rRvww6dziCMdgd90EK6nOChqg6B F+0qjhpjaEMy5T6jcYkaxzlWVZ9VRinZTEZwwsX6KECeHNfs9eHckGG+USEGAxmN63O+hOTWdEd RdxifhU7KfSpS X-Gm-Gg: AfdE7clz7yP18+hXPIp/ZG1X5KP/j/kW3XuYjiJVjZBFo16RRoNmrVM4KWQpoOiDKWV ybFJUJ8wfcfDK1d+n9r7vonohdlXiVgxMElI1LC/n0lt5qpQKdpHHBvw2oo+D1CaIiEPlb4FKGr ePRNbJeYEIwoO1MNKS1tNaULAgao03dm64cTeEkQQSnXRH3j9ijylMTR/pVE/jsx0Wd+rAbohaW z3Ha8X2E9fG0irk0yTSg1boQKj3DD+C1L8O7QOrh4edR4TeQzPBKsO+umGeT2zJNE8fJ/T930c3 n8L/kXf17Hgw/yXslATVA/o5iRaTs6fDLdDfGGdlxKosNnQ1LbB5Dg+5AGT+tvyQ9NYWVa1lqFN RzN/gVzBOZZxECxtqOpcXNTifWS/6a2lUIRh5WJ1Js7NgiSPQRwpwqNT975PL/iM9C5u5wdZuTt jGmpQolsR0lqzURVCWDcx/DuusAlOX0j8S9FOMiQe3tk1b5q3ioytvkiR1ALGExVci5Nq8O5jxg dl/CKFcOimQZGUizT5sbw== X-Received: by 2002:a05:600c:4fca:b0:492:437a:a653 with SMTP id 5b1f17b1804b1-493f8826c59mr97760855e9.26.1783956776189; Mon, 13 Jul 2026 08:32:56 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/26] hw/display/sm501: Avoid overflow problems in bounds check calculations Date: Mon, 13 Jul 2026 16:32:30 +0100 Message-ID: <20260713153233.3391818-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::b; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x0b.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, 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: 1783957000923158500 Content-Type: text/plain; charset="utf-8" When we check that a 2D rectangle operation isn't going to run off the end of video RAM, we do the calculations as 32 bit arithmetic. This means that carefully chosen guest register values can cause an overflow so we don't detect that the operation is going to go outside video memory. Abstract the check out into a function, do the calculations as 64-bit arithmetic, and add assertions about the ranges of the inputs. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3584 Signed-off-by: Peter Maydell Tested-by: BALATON Zoltan Reviewed-by: BALATON Zoltan Message-id: 20260707150933.1410507-3-peter.maydell@linaro.org --- hw/display/sm501.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 0da25477bcc..d5e165daefc 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -682,6 +682,28 @@ static inline void hwc_invalidate(SM501State *s, int c= rt) get_fb_addr(s, crt) + start, end - start); } =20 +static bool sm501_rect_outside_vram(SM501State *s, uint32_t base, + uint32_t x, uint32_t y, + uint32_t width, uint32_t height, + uint32_t pitch, uint32_t bypp) +{ + /* + * Return true if the 2D area specified by the arguments is + * partially or completely outside the VRAM (a guest error) + * + * Limits on the input sizes mean we can't overflow as long as + * we do all the arithmetic at 64 bits. + */ + uint64_t rect_size, last_addr; + + assert(x <=3D UINT16_MAX && y <=3D UINT16_MAX && height <=3D UINT16_MA= X && + pitch <=3D UINT16_MAX && bypp <=3D 8); + rect_size =3D (((uint64_t)y + height) * pitch + x + width) * bypp; + last_addr =3D base + rect_size; + + return last_addr >=3D get_local_mem_size(s); +} + static void sm501_2d_operation(SM501State *s) { int cmd =3D (s->twoD_control >> 16) & 0x1F; @@ -731,9 +753,8 @@ static void sm501_2d_operation(SM501State *s) dst_y -=3D height - 1; } =20 - if (dst_base >=3D get_local_mem_size(s) || - dst_base + (dst_x + width + (dst_y + height) * dst_pitch) * bypp >= =3D - get_local_mem_size(s)) { + if (sm501_rect_outside_vram(s, dst_base, dst_x, dst_y, width, height, + dst_pitch, bypp)) { qemu_log_mask(LOG_GUEST_ERROR, "sm501: 2D op dest is outside vram.= \n"); return; } @@ -760,9 +781,8 @@ static void sm501_2d_operation(SM501State *s) src_y -=3D height - 1; } =20 - if (src_base >=3D get_local_mem_size(s) || - src_base + (src_x + width + (src_y + height) * src_pitch) * by= pp >=3D - get_local_mem_size(s)) { + if (sm501_rect_outside_vram(s, src_base, src_x, src_y, width, heig= ht, + src_pitch, bypp)) { qemu_log_mask(LOG_GUEST_ERROR, "sm501: 2D op src is outside vram.\n"); return; --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783957070; cv=none; d=zohomail.com; s=zohoarc; b=R8mgGK7pjPPFqK48V4sfU4Xo28w3deWNW2ZVeQoxOXoDDObQsBaAwXJrZPlyoJqpO/MklUOlG/hp+6wNBl1Bk/EN5zxlfkLzOTETgMRqTVFSRzfSBUxv7TCtUnMBsjfdT8NNft8Tyiz1uha65RCVkYR/GGJ2gRQ+mtQvNozIvUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783957070; 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=/609RMZa89NYqvuF+HwOL5OypxMf2knqG/PNO6QODEI=; b=jD5UNyRIu4uZHxO/aZUyj1zNc/4rZpL7brIYQ17wBqWEG0KmUIFdOGrWlZOm2vK1D41yb6UBOOLyFnWxRGQ5yMTazi1gEwiuDRfxrnoalRCrBigxmQyLW3xjv+0FSfNQZPAtTBrC/2rZv5thqW9huhloCHw2Fwumbcfe5ZyKsEI= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783957070870237.85652503461483; Mon, 13 Jul 2026 08:37:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIel-0000fP-HA; Mon, 13 Jul 2026 11:33:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeU-0008Uq-1G for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 Received: from mail-wm2-x01.google.com ([2a00:1450:4864:31::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wjIeQ-0001DB-Gq for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:01 -0400 Received: by mail-wm2-x01.google.com with SMTP id 5b1f17b1804b1-493c234fba7so7599495e9.1 for ; Mon, 13 Jul 2026 08:32:58 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956777; x=1784561577; 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:content-type; bh=/609RMZa89NYqvuF+HwOL5OypxMf2knqG/PNO6QODEI=; b=q5cjrmgpCdPUdtxL11kDfZvufQ/OpuHcpzMFNRXaSFvd/0tsUxXBNLzLQYdEDYNn6U PiF8KRtPJTJE60SgQq5lWomZmxuIThxV2aqIDT72zMt6r5AVdFP77+610c4BwXxiiAPV lnVY1xgnt3n+A7RKnXwOs2VhTtB3KeWUneVBG1L0cQiumFyrGAba93Ada1AEGDJbppy8 +L8y5HDFv5HvzDwxzqhNz9U7XsR0FkHvu+oTe5bK1oQcYatAeOdbxKQ93n9+BOXMFjeU Q9YlfSfechRlB3uGrvp+hQ0gfdBKASP07Boqy9Wamp+bpf7ekw1zzHNvqHloC1oQ0bfo bDNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956777; x=1784561577; 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:content-type; bh=/609RMZa89NYqvuF+HwOL5OypxMf2knqG/PNO6QODEI=; b=orOlQ3c5gL0sbBDKlKKt5uBRwjgjo3q168wnlyDLKn1z8+wx9BoVHZC7q1YR2D9VlW udXAlR+gBD3rYfd7eAndZw1LsnddG877vmDw6VW/I9DOanHbjP+WgiOi8Qdc1Dhxca2l eF1PKv6GgVc6NvDRGK+kI/CKZQ5HNZKqVOFHw/F1tqMxXvv2J+QWUOhclDjs95jip/pZ Y1OQBAkL5pH/Z40hd4wm0w34ddsaa7V32HqCvkj8dCB6xdsHCTYmuQp1/+8EChxpVBcF rIYWqXNO0JeKKckIH6kA4qBznE9/uYvtvJhDboVur8pBc5YEVoLUzjjX1Va4jHp/ts0Y Ip0Q== X-Gm-Message-State: AOJu0YyEtyYuyUBJsWX+d3Vtc+DDLR1MD9KXMnyTYgrlm6vkt0VfOUO4 CpzOhKMxY10Vb+QyUKJBisHRGlapF4W/KJ5lp9xON0p5f7vZptAl4uYHookvNecfLbn44rpKl3E gLM4WX2jNpZtI X-Gm-Gg: AfdE7cmgX6Pl35wr4keCH9BEfEGj/zFvIsfA/RS49qQ4N9ui2SkGD5J0NT8lMSyqnzJ l8DUAXYT4CKf0uMu9dpvEmAyP8/EIEjLIYoXRYPWTz1HwVwT3a8EiTffjRquyZrtTXp4k3o4hze JvQt45UHLFvSrrTYRalYlzn8S7CqhmQma0TsTbxWooGtGItuMqMGNfkkwUg+ER62OW6vN7AalOW /sAxgzdDbPWgq65sSuQ6ujMUNtkh0GhfJRrQEsOGpoSVoGBFPuKQCBbXBWfHDnEhBV7ce8rG2br MNGiOQcj/dzf68Y8VUT77gGmnZm6yfNu36YJrJCRR9h9XZVGcvoYiZxM5I35h3Uhnm+QbfSlH3k BX3gdTn7ko5GwDUHJMQNcHxV8JjiqaXBQElf6H5jpkfawORHbnk1byNEadewwjKmvoVHrihY9VJ gtxz9JDvYnnfmM2REyXhelvUa29m5vygoBwtXTmiKh8sW7iplEPPgiSbcrv70Gg2R2Nyd/h0HmB FLwUlLcDIurkXcMY6Bhx4ojBUZ10DuN X-Received: by 2002:a05:600c:1f91:b0:493:aa0a:45b0 with SMTP id 5b1f17b1804b1-493f8824b9amr96447615e9.23.1783956777024; Mon, 13 Jul 2026 08:32:57 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/26] hw/display/sm501: Don't allow guest to set ram size larger than it is Date: Mon, 13 Jul 2026 16:32:31 +0100 Message-ID: <20260713153233.3391818-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:31::1; envelope-from=peter.maydell@linaro.org; helo=mail-wm2-x01.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: 1783957071489158500 Content-Type: text/plain; charset="utf-8" The SM501 DRAM_CONTROL register has a 7 bit Size field which allows the guest to change the local memory size. We use the local memory size in bounds checks calculations for 2D operations. Currently we have no check on the validity of the value the guest programs to this field, which means that the guest can: - set it to a reserved value (6 or 7) which will cause get_local_mem_size() to read outside sm501_mem_local_size[] - set it to a value corresponding to more RAM than the card was created with, so that the 2D bounds check will let 2D operations access off the end of the memory region Fix this by decoupling the value the guest reads and writes to this field from the internal size we consider the local memory to have. We validate changes and ignore them except for readback if they would be reserved values or values for more memory than the card has. Cc: qemu-stable@nongnu.org Reported-by: Heechan Kang Tested-by: BALATON Zoltan Reviewed-by: BALATON Zoltan Signed-off-by: Peter Maydell Message-id: 20260707150933.1410507-4-peter.maydell@linaro.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3811 Signed-off-by: Peter Maydell --- hw/display/sm501.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index d5e165daefc..cacb6c87ec9 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -571,6 +571,25 @@ static uint32_t get_local_mem_size_index(uint32_t size) return index; } =20 +static void set_new_local_mem_size_index(SM501State *s, uint32_t idx) +{ + /* + * Update local_mem_size_index on guest write. We don't allow this + * to be set to larger than the actual RAM size. (The guest will + * still read back the SYSTEM_CONTROL.Size bits that it wrote.) + */ + if (idx < ARRAY_SIZE(sm501_mem_local_size) && + sm501_mem_local_size[idx] <=3D memory_region_size(&s->local_mem_re= gion)) { + s->local_mem_size_index =3D idx; + return; + } + qemu_log_mask(LOG_GUEST_ERROR, + "sm501: Guest set DRAM_CONTROL.Size to 0x%x but " + "local memory is not that large\n", + idx); + /* Don't change the effective size, leave it as whatever it was */ +} + static ram_addr_t get_fb_addr(SM501State *s, int crt) { return (crt ? s->dc_crt_fb_addr : s->dc_panel_fb_addr) & 0x3FFFFF0; @@ -990,7 +1009,7 @@ static uint64_t sm501_system_config_read(void *opaque,= hwaddr addr, ret =3D 0x050100A0; break; case SM501_DRAM_CONTROL: - ret =3D (s->dram_control & 0x07F107C0) | s->local_mem_size_index <= < 13; + ret =3D (s->dram_control & 0x07F1E7C0); break; case SM501_ARBTRTN_CONTROL: ret =3D s->arbitration_control; @@ -1049,8 +1068,7 @@ static void sm501_system_config_write(void *opaque, h= waddr addr, s->gpio_63_32_control =3D value & 0xFF80FFFF; break; case SM501_DRAM_CONTROL: - s->local_mem_size_index =3D (value >> 13) & 0x7; - /* TODO : check validity of size change */ + set_new_local_mem_size_index(s, (value >> 13) & 0x7); s->dram_control &=3D 0x80000000; s->dram_control |=3D value & 0x7FFFFFC3; break; --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783956988; cv=none; d=zohomail.com; s=zohoarc; b=YH7r3FRncgNVFQYtJCB1eHGYIg3Vt7BHIrJe4H3rDeAPqgU6iP0HxFuTTyOQYc20g/3ZlaxwD4Uo+aX2QuoBvJczh2Y5nVL1ZC21CI2M7iRRz1lZRvrNcS2Uf9phYwKlM3IhAxn2VsSrXnm7FWFYiS9GPUmmYUw/V8jDMKboATU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783956988; 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=M5b3q1vcJG+pOrSEqjL5McdQp6iUtRNJbg1c5s1UP7s=; b=A5CvjXLAex46joCCyl4XJJCirxmVweR5/3/miobHgw6/0iSTRqO46/DDp+iNup0YCAij3Th2L/lBkpbVTc1+2hSRM8a4r4+QuCH3r9foOeqWw+e6wOfhgwhYWlcA03a9tYAi6r5m0slcTAotmfR5vCyU/0u52VQ1Lc9nK7Y1lnE= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17839569889071010.2992058766406; Mon, 13 Jul 2026 08:36:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIef-0000UA-30; Mon, 13 Jul 2026 11:33:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeV-0008Uy-FP for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 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 1wjIeS-0001DP-HC for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:03 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-493b966dd74so12536985e9.3 for ; Mon, 13 Jul 2026 08:32:58 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956778; x=1784561578; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M5b3q1vcJG+pOrSEqjL5McdQp6iUtRNJbg1c5s1UP7s=; b=uPuLUqUZkttdK52lt3oOlGi7Id0hxvzKLzb5cV5TD94Doha+kmCprs9BwZKU00VRWC uq7kvZxfSL8y6lDZYMwXzF0+SdKa+RIMvs9NJk1SJUeTLkOvxnkikZDIfTTTE9aAIv3x zYScriAKM9wl52Mtz76ZUUDVOAWr7uH0FnKQgOPKfvRCDSlR6PEQycbmgOsQP/2pnwcw jcHlfpWigakC/1mKwwal9K7sjDOcD0dGZSgX0rTRIiBT0a1QfjSKjl9Lcofki97kQFLY Es/2jS0275Xd7VFAgmF+i00DmGiPvgRN6BNQ/OMrcEixdkjMfBX9x7iRuaQW5wd2Ad4x Jj6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956778; x=1784561578; h=content-transfer-encoding:content-type: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 :content-type; bh=M5b3q1vcJG+pOrSEqjL5McdQp6iUtRNJbg1c5s1UP7s=; b=bbLFgFgJX7wpo7T+Kk0JSIJNj6AKUX8wZaPMjQ255AMB1fuUln8Mmc8d8wvtBqBeMS jLEmUvm1rNHIyGKChC8xBl9yFfbQg5CQvEuifa+5d8b8mRgQTIvtPRz2lT9NS0RVb0vj J1nfppkwZAdo/Pn80o1AWXB8mWTfrqFZFsI8D4/Pbggd3grQqshaF/Fs+zeBcgGv+WLl UFwOue+6O7Eo8ojHYCQ/c5FWwCqqu4lMtltBNMPtfx7yXZNd82uin26ATPaKSiPn64p/ OC08UDRUvc/mwJhbmG5ztRdKwNC/nBMr5DflXWz9b/A9uCFny12H35MTrOhvvBL4AaI1 KbeQ== X-Gm-Message-State: AOJu0YyJcl2KCDNgBCFABUjA3RdF/6o1Qc1+Vji4fk3NujXyutZYyHUb A0qpEtc42J/EEdEMUlmUQiUQJyLYdY83aGhghZYZ41FDkv5m6QYXsrJr0aLcHDnUlmR25o2pCi+ eVgzXYoAAXA== X-Gm-Gg: AfdE7clWcJjUUlI8VXC+YEn4gcqN95zsbiJTUqEApIgRaiMq0EtRUQrxaY5Zlhziw2W DhTh/m55uTnauAn8UY1yf39wFOw/quzKPTUmx/orBOjIcMDQJq+YHmqEV5I/UZMIGJkvOIPay0V 8Uj8YFmdIcMiAtxRzi0/3jItRbUL7OTOospt7Wob+ZUHmMtymxkvE67O4A4k5g7f+r+czzIb/Bx l+ZZeqlYWfFqKMTUiEnUTbJ0b4Inps2Xu+pFKgGQ8QIKYo8GfznkNwcv8boa3BjpmHacD68BiDK eyvX2m8Fduzry43JldAX6YZexr+0Sw5WNe9qeO2/wUXNucfu39ftr+2D4I4pAn7lgWgUCmlOn6z EVkelk3jIbsSXRmY9FYcD0x7+El4QZM6d5CEFswj9Dz2pXj5bk3W9ACnWvj0o/vL9fvoswpl1aq ouURZhmujrMIrONxhd8Purdt5hOA4X/ZIBoyktiuSGGzQO+koUMj9ZB0hBTuHY5J2A9dGXjxcFp j3l48ymC1IuwBapk8PUkUr8anMu0y0WSVbk5ZblHl0= X-Received: by 2002:a05:600c:6216:b0:493:f6f0:d66b with SMTP id 5b1f17b1804b1-4940033a949mr68591925e9.1.1783956777839; Mon, 13 Jul 2026 08:32:57 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 25/26] hw/misc/allwinner-r40-ccu.c: Correct handling of out of range accesses Date: Mon, 13 Jul 2026 16:32:32 +0100 Message-ID: <20260713153233.3391818-26-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783956991001158500 In allwinner_r40_ccu_write() we handle writes to a MemoryRegion of size AW_R40_CCU_IOSIZE, and the register array is sized accordingly at (AW_R40_CCU_IOSIZE / sizeof(uint32_t)). However, one of the cases in the switch is a range up to AW_R40_CCU_IOSIZE, which makes Coverity think we might index off the end of the array. We also have a similar case in the read function, but since that returns early it doesn't have the same issue. Adjust the handling of out of range accesses: - use AW_R40_CCU_IOSIZE - 4 as the upper bound, as this is the largest value we will actually see - return early in the write case, as we do in the read case Coverity CID: 1663687 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Strahinja Jankovic Message-id: 20260709104802.1989086-1-peter.maydell@linaro.org --- hw/misc/allwinner-r40-ccu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/allwinner-r40-ccu.c b/hw/misc/allwinner-r40-ccu.c index 8ba4e7aa429..00840e98507 100644 --- a/hw/misc/allwinner-r40-ccu.c +++ b/hw/misc/allwinner-r40-ccu.c @@ -71,7 +71,7 @@ static uint64_t allwinner_r40_ccu_read(void *opaque, hwad= dr offset, const uint32_t idx =3D REG_INDEX(offset); =20 switch (offset) { - case 0x324 ... AW_R40_CCU_IOSIZE: + case 0x324 ... AW_R40_CCU_IOSIZE - 4: qemu_log_mask(LOG_GUEST_ERROR, "%s: out-of-bounds offset 0x%04x\n", __func__, (uint32_t)offset); return 0; @@ -113,10 +113,10 @@ static void allwinner_r40_ccu_write(void *opaque, hwa= ddr offset, val |=3D REG_PLL_LOCK; } break; - case 0x324 ... AW_R40_CCU_IOSIZE: + case 0x324 ... AW_R40_CCU_IOSIZE - 4: qemu_log_mask(LOG_GUEST_ERROR, "%s: out-of-bounds offset 0x%04x\n", __func__, (uint32_t)offset); - break; + return; default: qemu_log_mask(LOG_UNIMP, "%s: unimplemented write offset 0x%04x\n", __func__, (uint32_t)offset); --=20 2.43.0 From nobody Sat Jul 25 21:23:11 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=1783957068; cv=none; d=zohomail.com; s=zohoarc; b=ZS+vaLk1B4m5VIb1M6rmSUVfBScSoMGewfRwEfCtnAm+A9N8GEa2kpyzeWMnMxdeOTsw6SMqw7BiqKJwWS1rLG2xWTh1xHP+P0GDKYsFwUOO8P7mrSGPhKhlbURbHOcX30wh0spsuNgC9h42/G5qDUwM4SfC2tT0CynAyBR07ws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783957068; 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=B0sy5Lm7b0VDs6vzO5OthwvktTgTbrm6ExUOslb6lTo=; b=MUNamXb6AoD6aJQG0o0NjTWFSvlrkcA+svr6vusiOYVULkSwbNawyCXdPbrHsvgq8OfR/8qzDW/4Gz0KG1Wg82C7B3XQfy4F2bH2W9m2qRAfrgLMLRyzo2FMEgKq+HB6wxODN8s7vsPOP918XvdMxnNvaZ60yqEIAIEfqJ1jcxg= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1783957068575153.30755620998173; Mon, 13 Jul 2026 08:37:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wjIen-0000mE-99; Mon, 13 Jul 2026 11:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wjIeV-0008Uz-Gh for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:06 -0400 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 1wjIeS-0001Dr-Gm for qemu-devel@nongnu.org; Mon, 13 Jul 2026 11:33:03 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-493c7902f47so30532345e9.1 for ; Mon, 13 Jul 2026 08:32:59 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49508727f7dsm3825985e9.4.2026.07.13.08.32.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 08:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1783956779; x=1784561579; 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:content-type; bh=B0sy5Lm7b0VDs6vzO5OthwvktTgTbrm6ExUOslb6lTo=; b=rBl3hHgh9yG/Rf0Ncekjxqi4oiukgLpUza7j3dWBVpx1B0zU0Lk2r5y+wthsPtGemZ oFM3uTjZ2KzSVA7HBYYFBqwzqj0p6iDqbKLZ0hCT0ppyCXu0HHI2fuB5cNX54O4zwzhH wm5XMZqwksTlfwEpYCaGRDKBJ6FaPIeK28isLPLokStASlT+CoOQnQUMwAWDQLb8NUYB UFyfxB8RJADrsoAUkTsWH3UmxTABlLqd61C6eRg4V2TbXlTQcFXGN/n6x5AS+1FoKy45 0youzVWvdxS2K8CZ3TwBAvttXRKg1PAmf/DVhGXukfaCJdXK4o7/ldTILeeg1/C69vp8 u2tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956779; x=1784561579; 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:content-type; bh=B0sy5Lm7b0VDs6vzO5OthwvktTgTbrm6ExUOslb6lTo=; b=Fh1UkJVfBwwNThZ3bvK6/djo4XDM5cRbTxOm4kMt5mkgHbCe/mmhLdMNxd3yRt2BKh Sf2U3hYwYsX7TTVy8JYMY6Nz9Rn9WiUmK1QcEscwsYfLMWbPrnvgZ9ySNACPsfpcYcZ8 8WKVKmOgCzuuwDfZGdAHdp9p4CqxupPT9Ino/XD/0AR1PHD1qStxVxOENj67g56GAMbq ETVemjgSOkVpI8lV93VCHr2E7UilrrGs5D4KSM/CyK3mou0ZgJCM9tqODH4VWOv3B4q4 GEKPjrl/7dReP833WA0mbQat/M+XCfTHeKJj7B4XMPOGsT5dW8h1lUj7esenXSohmRmW 2dhQ== X-Gm-Message-State: AOJu0YyvF1oszXYuytmQ1aJLdoDpPay8qTf0aXgj9sHLpT+zdZvt1KY0 qwjNZ4RALiP3cqTdtl/MqL1p9gW2+crbdS1OMuaLYnAF6E9Y1yzj0UMLerRR5S6FrzKKjDRXqoR 6ib3F5czahQ== X-Gm-Gg: AfdE7clb6CoyQUYmhSJGKP1CqvG623UIC1Y4hOImajpwZHQuCfur2b3tF2HnMfhDLqp 4k6ExgLG8NuQDaq4c4QE75sM2YbgDr4A15Qs0BbVHv0+inV64wRFdAnfCoHV65xf5n+xjLJl7Ln Bs/B89ptHD8rX5+8h0Q6q/Y8DX+JSEmhGjPKhbsxRxXf6LR9q+i5kFgC23FX0gG5x70mfVWKFdV sPqttE7xfSaJJI9hbCnwtqSZVoqPCYc8xcprEFhqLg094xozPSeU6rMP2wBvkD+YOwABILjggwt qUxyvUuZBEdtWl6koepL4uY3TtAXq0okNsNUYyWb8oZ5Go3iNgueMwAiOyiyx+CXkhSmTDUbHFj JtDHuxc8vtZcuyqDAR57wI5P3YJ2x9/OtEbESZ93IOrx6eEbq9ZzkMlfCX0FynlztOybxaXEagS sLtsu7QTy3ttv8OzGZbva/HYpDdPtFTKaUdRpjOPPzIwLf9cjKzMlHHEQLR2HQgCsm3wIv6/JMq p4Qi47sCXe8cGV/6LTmDg== X-Received: by 2002:a05:600c:4f94:b0:493:b730:8d78 with SMTP id 5b1f17b1804b1-493f882e0e2mr92295515e9.31.1783956778683; Mon, 13 Jul 2026 08:32:58 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/26] hw/misc/stm32_rcc: Correct offset-to-irq calculation Date: Mon, 13 Jul 2026 16:32:33 +0100 Message-ID: <20260713153233.3391818-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260713153233.3391818-1-peter.maydell@linaro.org> References: <20260713153233.3391818-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=lists1p.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: 1783957069662158501 Content-Type: text/plain; charset="utf-8" In the STM32 RCC, there is a block of 5 "enable" registers, each of which has 32 bits; each bit determines the level of one of the 5 * 32 =3D 160 enable_irq output lines. The code calculates the irq to be worked on using irq_offset =3D ((addr - STM32_RCC_AHB1_ENR) / 4) * 32; This assumes that the registers are all consecutive; however, there is a gap between the AHB1/2/3 registers and the APB1/2 registers, so for the APB1/2 registers we calculate a number that is 32 too high and can index off the end of the enable_irq[] array. The handling of the reset registers has an identical bug. Adjust the calculation of irq_offset to cope with the gap, and fix the case labels so accesses to the gap fall into the default LOG_UNIMP rather than being treated as if they were an actual register. Coverity CID: 1663683, 1663686 Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Alistair Francis Message-id: 20260709104832.1989240-1-peter.maydell@linaro.org --- hw/misc/stm32_rcc.c | 31 +++++++++++++++++++++++++++---- include/hw/misc/stm32_rcc.h | 6 +++++- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/hw/misc/stm32_rcc.c b/hw/misc/stm32_rcc.c index 74ea29b1560..5cfb39e5607 100644 --- a/hw/misc/stm32_rcc.c +++ b/hw/misc/stm32_rcc.c @@ -53,6 +53,27 @@ static uint64_t stm32_rcc_read(void *opaque, hwaddr addr= , unsigned int size) return value; } =20 +static int reg_offset_to_irq_offset(hwaddr addr) +{ + /* + * The reset and enable registers aren't all consecutive. In getting t= he + * irq index from the register offset, we need to account for the gap + * between the AHB regs and the APB regs. + */ + switch (addr) { + case STM32_RCC_AHB1_RSTR ... STM32_RCC_AHB3_RSTR: + return ((addr - STM32_RCC_AHB1_RSTR) / 4) * 32; + case STM32_RCC_APB1_RSTR ... STM32_RCC_APB2_RSTR: + return ((addr - STM32_RCC_APB1_RSTR) / 4) * 32 + STM32_RCC_N_AHB_I= RQS; + case STM32_RCC_AHB1_ENR ... STM32_RCC_AHB3_ENR: + return ((addr - STM32_RCC_AHB1_ENR) / 4) * 32; + case STM32_RCC_APB1_ENR ... STM32_RCC_APB2_ENR: + return ((addr - STM32_RCC_APB1_ENR) / 4) * 32 + STM32_RCC_N_AHB_IR= QS; + default: + g_assert_not_reached(); + } +} + static void stm32_rcc_write(void *opaque, hwaddr addr, uint64_t val64, unsigned int size) { @@ -69,11 +90,12 @@ static void stm32_rcc_write(void *opaque, hwaddr addr, } =20 switch (addr) { - case STM32_RCC_AHB1_RSTR...STM32_RCC_APB2_RSTR: + case STM32_RCC_AHB1_RSTR ... STM32_RCC_AHB3_RSTR: + case STM32_RCC_APB1_RSTR ... STM32_RCC_APB2_RSTR: prev_value =3D s->regs[addr / 4]; s->regs[addr / 4] =3D value; =20 - irq_offset =3D ((addr - STM32_RCC_AHB1_RSTR) / 4) * 32; + irq_offset =3D reg_offset_to_irq_offset(addr); for (int i =3D 0; i < 32; i++) { new_value =3D extract32(value, i, 1); if (extract32(prev_value, i, 1) && !new_value) { @@ -82,11 +104,12 @@ static void stm32_rcc_write(void *opaque, hwaddr addr, } } return; - case STM32_RCC_AHB1_ENR...STM32_RCC_APB2_ENR: + case STM32_RCC_AHB1_ENR ... STM32_RCC_AHB3_ENR: + case STM32_RCC_APB1_ENR ... STM32_RCC_APB2_ENR: prev_value =3D s->regs[addr / 4]; s->regs[addr / 4] =3D value; =20 - irq_offset =3D ((addr - STM32_RCC_AHB1_ENR) / 4) * 32; + irq_offset =3D reg_offset_to_irq_offset(addr); for (int i =3D 0; i < 32; i++) { new_value =3D extract32(value, i, 1); if (!extract32(prev_value, i, 1) && new_value) { diff --git a/include/hw/misc/stm32_rcc.h b/include/hw/misc/stm32_rcc.h index 4dccacc2db5..a94781bf347 100644 --- a/include/hw/misc/stm32_rcc.h +++ b/include/hw/misc/stm32_rcc.h @@ -65,7 +65,11 @@ =20 #define STM32_RCC_NREGS ((STM32_RCC_DCKCFGR2 >> 2) + 1) #define STM32_RCC_PERIPHERAL_SIZE 0x400 -#define STM32_RCC_NIRQS (32 * 5) /* 32 bits per reg, 5 en/rst regs */ + +/* 32 bits per reg, 3 AHB regs and 2 APB regs */ +#define STM32_RCC_N_AHB_IRQS (32 * 3) +#define STM32_RCC_N_APB_IRQS (32 * 2) +#define STM32_RCC_NIRQS (STM32_RCC_N_AHB_IRQS + STM32_RCC_N_APB_IRQS) =20 #define STM32_RCC_GPIO_IRQ_OFFSET 0 =20 --=20 2.43.0