Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218013/?format=api
{ "id": 2218013, "url": "http://patchwork.ozlabs.org/api/patches/2218013/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260331092305.2062580-1-peter.maydell@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260331092305.2062580-1-peter.maydell@linaro.org>", "list_archive_url": null, "date": "2026-03-31T09:23:05", "name": "target/arm: do_ats_write(): avoid assertion when ptw failed", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "108211caebe3573de9a7d70954fb5bfd353bd166", "submitter": { "id": 5111, "url": "http://patchwork.ozlabs.org/api/people/5111/?format=api", "name": "Peter Maydell", "email": "peter.maydell@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260331092305.2062580-1-peter.maydell@linaro.org/mbox/", "series": [ { "id": 498157, "url": "http://patchwork.ozlabs.org/api/series/498157/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498157", "date": "2026-03-31T09:23:05", "name": "target/arm: do_ats_write(): avoid assertion when ptw failed", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498157/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218013/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218013/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=uuF5tiyJ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flN3W4Mprz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 20:24:07 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w7VJY-0004fh-BB; Tue, 31 Mar 2026 05:23:12 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1w7VJW-0004er-Hc\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 05:23:10 -0400", "from mail-wr1-x429.google.com ([2a00:1450:4864:20::429])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1w7VJV-0003vO-2Y\n for qemu-devel@nongnu.org; Tue, 31 Mar 2026 05:23:10 -0400", "by mail-wr1-x429.google.com with SMTP id\n ffacd0b85a97d-43d0deb7ad5so252734f8f.2\n for <qemu-devel@nongnu.org>; Tue, 31 Mar 2026 02:23:08 -0700 (PDT)", "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43cf257b72dsm25928298f8f.34.2026.03.31.02.23.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 02:23:05 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774948986; x=1775553786; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=wP+GI1GA2esVBEcdv2LEdQJ+EKOQrpQMHXtB4e3u7TU=;\n b=uuF5tiyJtl6NyKA3FiAhGWMXajshZ9x7EGb1BlnYVoG9/8cJFemM6HC/xdSi7JFmPV\n PAECsZ8rndEoIjT7El1mVj2+Qwy5p7Nmvq+/O9e0wkH0zCDePxzukmY2fJwEs0prTJ+K\n GfHy8sGHw8UOLQhpu0CpsXSC1BWbG0HretAQqxjVdgyuEjmths/sogPTwTFxb1io2cC7\n ThfTgoV/PHT4FWlgd8oXJlsyopOARyJt65orkwKFNCAzeXpuAll3sZVJcK7caeIqEMaV\n hNwbAQGIEfjiaybWRpEO16vujjzZrVVIHbXU5wSSW0ElQBBqncY1hp8aZjNRPslg+qt4\n Rosw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774948986; x=1775553786;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=wP+GI1GA2esVBEcdv2LEdQJ+EKOQrpQMHXtB4e3u7TU=;\n b=Tgaa/uQ4twKeX0k5eLKsqwnPm7DNvrUPOXq/P2KIgH+MG/rtv9KjfsY/pO68bjC8gD\n BnUPN4daY5z+CCzegChjN1Uk40mOLJJudT6TYnejuVCNNDR0A+Glsc4HSfifICDC45Mb\n LpBOg58fvF88cJWPOMMKPqjrkwAVCQvgcIHptkRkSgHATTxftfJT/N/MoXKSC3ztVRIf\n ZSqt6HwND7nF4pSHo/pWtH6wivsW9juBy72GrzK5+4GzUYoXhksj0hkIu8BMf0iNXbA+\n QJkVJpKotz1bYxfGvm+7j4RHlmebb7XSiHrYdHu6VIdlYAHZIvghUHGz69BzGxaPO1oq\n vmuA==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCW985D4iCfVThOxDCGypjZhi8EAq4WICLseov3eO+OmJUIB33Zdhq4OiUKhAMUkwLfU2OxkseoRCSxy@nongnu.org", "X-Gm-Message-State": "AOJu0YwHPCF4oVLJJb4rMhcuYS/JxYTYeJIwL8Wip9gnfLPt4p788EbY\n Q8e6UL4jThgfyfTqxVFSmhQwdUFgWoTObjf0xzXFdxlhbJERbAJQf5YwB2qxhOhTVW0=", "X-Gm-Gg": "ATEYQzxR/g6wh58SOuTxbUnwdORRzeIYuWiR+bnaCnczAvntRN4eiO6hobpGgQZrVrL\n H9DsK2CvSVvQPoEjpIXc8peJiWI81t2eUYczYBT6t/MC27lWtViLcwdIY+V8AwV202EnjVjJyWE\n VugMo/wz8CYURZbqIETKooUiXOwvD0sGreaVTeiXi4C6vK2n0zVhbcBOWNenIuiK99sV9oe8fMa\n fb3t7JbnSI5pIoAz+KgXfcLKfYOdx9Eog6zeg+es3ybD3sJtcjnq1ZocFEWLoKQ4xuRKV7GpduW\n nNTRGoOx9MogcVISlz3OAR+m4JIirZdoBeYU6MG3lCdwApWPgpYNY1OWxOWR/WNcPH34zX89bCa\n t3fprAJiBFliCIDSGRYVC2fvLlcHIxCt3ww5EBYuvIq1Qk7qweEj/IW3ubPb7PdPDcOIKtEhj3p\n PtXAaTb7blNqyO5VKjbQAWyq6bMuHGcy80eHdzjvtxLb6yozzbu6vbWUG7dhcJVzIQDTyI9fIwu\n aioqOe12WjUrhV4DWBaEQvdsoT6xOA=", "X-Received": "by 2002:a5d:64e6:0:b0:439:b858:1d28 with SMTP id\n ffacd0b85a97d-43b9ea9aef9mr25655034f8f.26.1774948986461;\n Tue, 31 Mar 2026 02:23:06 -0700 (PDT)", "From": "Peter Maydell <peter.maydell@linaro.org>", "To": "qemu-arm@nongnu.org,\n\tqemu-devel@nongnu.org", "Cc": "qemu-stable@nongnu.org", "Subject": "[PATCH] target/arm: do_ats_write(): avoid assertion when ptw failed", "Date": "Tue, 31 Mar 2026 10:23:05 +0100", "Message-ID": "<20260331092305.2062580-1-peter.maydell@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::429;\n 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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable 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 <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "In do_ats_write() we try to assert that the cacheattrs from\nget_phys_addr_for_at() are in the form we expect:\n\n /*\n * ATS operations only do S1 or S1+S2 translations, so we never\n * have to deal with the ARMCacheAttrs format for S2 only.\n */\n assert(!res.cacheattrs.is_s2_format);\n\nHowever, the GetPhysAddrResult struct documents that its fields are\nonly valid when the page table walk succeeded. For a two stage page\ntable walk which fails during stage two, we will return early from\nget_phys_addr_twostage() and depending on the fault type the\nres.cacheattrs may have been initialized with the stage 2 cache attr\ninformation in stage 2 format. In this case we will incorrectly\nassert here.\n\nFix the assertion to not look at the res fields if the lookup failed.\n\nNote for stable backports: the do_ats_write() function is in\ntarget/arm/helper.c in older QEMU versions, but the change to the\nassert line is the same.\n\nCc: qemu-stable@nongnu.org\nResolves: https://gitlab.com/qemu-project/qemu/-/work_items/3328\nFixes: 9f225e607f21 (\"target/arm: Postpone interpretation of stage 2 descriptor attribute bits\")\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\nNot a regression, but it's a very safe fix, so this will probably\nget into 11.0.\n\n target/arm/tcg/cpregs-at.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)", "diff": "diff --git a/target/arm/tcg/cpregs-at.c b/target/arm/tcg/cpregs-at.c\nindex 0e8f229aa7..53dd67375d 100644\n--- a/target/arm/tcg/cpregs-at.c\n+++ b/target/arm/tcg/cpregs-at.c\n@@ -37,8 +37,9 @@ static uint64_t do_ats_write(CPUARMState *env, uint64_t value,\n /*\n * ATS operations only do S1 or S1+S2 translations, so we never\n * have to deal with the ARMCacheAttrs format for S2 only.\n+ * (Note that res fields are only valid on ptw success.)\n */\n- assert(!res.cacheattrs.is_s2_format);\n+ assert(ret || !res.cacheattrs.is_s2_format);\n \n if (ret) {\n /*\n", "prefixes": [] }