Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2224599/?format=api
{ "id": 2224599, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2224599/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417164328.1009132-4-alex.bennee@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260417164328.1009132-4-alex.bennee@linaro.org>", "list_archive_url": null, "date": "2026-04-17T16:43:23", "name": "[3/7] tests/tcg: convert aarch64 asid2 test to use sysreg helpers", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "eb04a15d2b962edca893d6a33a5b792631ba5fde", "submitter": { "id": 39532, "url": "http://patchwork.ozlabs.org/api/1.2/people/39532/?format=api", "name": "Alex Bennée", "email": "alex.bennee@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417164328.1009132-4-alex.bennee@linaro.org/mbox/", "series": [ { "id": 500373, "url": "http://patchwork.ozlabs.org/api/1.2/series/500373/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500373", "date": "2026-04-17T16:43:20", "name": "tests/tcg: more capabilities for aarch64-softmmu tests", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500373/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224599/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224599/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=L1DEPqMM;\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=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.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 4fy13J25n9z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 02:45:48 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wDmIN-0003S3-JV; Fri, 17 Apr 2026 12:43:55 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wDmI4-0003OE-QK\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 12:43:38 -0400", "from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wDmI1-0004rz-JI\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 12:43:35 -0400", "by mail-wm1-x32d.google.com with SMTP id\n 5b1f17b1804b1-488af96f6b2so11791265e9.0\n for <qemu-devel@nongnu.org>; Fri, 17 Apr 2026 09:43:33 -0700 (PDT)", "from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fb794e26sm29177745e9.6.2026.04.17.09.43.29\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 09:43:30 -0700 (PDT)", "from draig.lan (localhost [IPv6:::1])\n by draig.lan (Postfix) with ESMTP id B459A5F9CE;\n Fri, 17 Apr 2026 17:43:28 +0100 (BST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776444212; x=1777049012; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=CoM5YIgDCI4LaK2PcP9hwlCuHqwwsV6FnJoskoTZop4=;\n b=L1DEPqMMO8PA+XCP4exq6cwa66CjOcBcHoV8dcaJpW6IheqPNqQoOgNRyI/QJQ97Rb\n EyGbhCu6uinFuw3uFxUwLaRriO/Iaby0d1LWz3l8F4/LyJuElG9t1SNroSJ4MTc4YcPU\n npM1ywheVtOZF92ZDwY6BHxGZBNx0GpOicPqxDs6ZYdL0KKXEgAyatP1+mnaHVreRG3A\n Qkvr4RsU47lB55jmJAWplSRapSs+pAcLzAeABn01zg4YvPqQBDSD+PoyBKuktZb6I86V\n 5r13ohkPY3G3IJs12oH8Oac1PA/6tuJ+W38KhgtedXuWIW1sKqKvDrLS9ocF1aVTHFry\n KvNw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776444212; x=1777049012;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=CoM5YIgDCI4LaK2PcP9hwlCuHqwwsV6FnJoskoTZop4=;\n b=iaItdXMzkk3msfkLpu7uAJRWNuqzxDNwUV/wua/txugnjA8eD89qAvyVxKZQIA0Imy\n 5dotCWS9qGThEnZ1MnVrMfcwwUxc/yJ/9CYR66OsgjyVeYdlbKMeq2veuxJy0sJbKoLj\n bx60L05BEPUk90nNnHOMdWd/A+hEzMa5a0sCaOH2uIX9ZvU06Tl3loIvnSCoj0KB4hBD\n 7kwK4/8ZFFSKGIvYTgARmQWniHCs76NNMYgZpKYPDnVByXw7wD58fhwMuHaPBDPI72BK\n lvVUMDdYreDxEIr7n00P8jUMpXySo2aVXRROLEI5tZOcfUzYH4XcYvzE8OqK1SAn0IXw\n SYuA==", "X-Gm-Message-State": "AOJu0YzHHe562AywgszPPqcJ8yz1pvTAqzdYAcPRhd6FtuDwrQRfMN4Y\n maanXhuiBImPG2B8b4P+yyp44iT29dlCCI4+IDeDfH9z1cQHGFhEjHDp3Uc4QswPTNV411udsPC\n ZMcHVWQo=", "X-Gm-Gg": "AeBDieuN9nEv9Qvt9p39h/rPaLEXkJrOsLYYj/K1IHxVNkBZslu9fea7fx7W54vOxGp\n s08qFBDYq6kyzWRy2N4luczLoV6Dkkf8QnQhOzcginp5WbsIRUQxvlmlvLpHH3NOa4mxPXq4vIx\n 2AE7JG6YmRlYctl/tDU6HuaUvD/xY072fwAMF7K15PqK6crB2nvFX/Ph4TpBjG00tscFi5yTIk8\n qwqujSWrHwFU2n1oW+s4qqzfE3SoLgFaBQz4quJ8DMghtgSfD6vriq2VocV9yIK0SpglC1/Frb7\n FCSeOiT+/ldyvyRV5l3dj6yqAYNtmIUSvkPjgnHZ44S44shC92I22cIe5+CJXr5ep3FbDdTgz3m\n lBO7kRO0nAg/u8e878tp2tmBXYGIfGER4OWkTRZ89TuRwlhJnIB5Sr45nNL/KMN4gozdneqJoKU\n JzEcRMa7KmYhUdiUPGbZlIqUo1CMnE8fYPfg==", "X-Received": "by 2002:a05:600c:c089:b0:487:1fc:14f9 with SMTP id\n 5b1f17b1804b1-488fb771576mr37520525e9.15.1776444211998;\n Fri, 17 Apr 2026 09:43:31 -0700 (PDT)", "From": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,\n\t=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "Subject": "[PATCH 3/7] tests/tcg: convert aarch64 asid2 test to use sysreg\n helpers", "Date": "Fri, 17 Apr 2026 17:43:23 +0100", "Message-ID": "<20260417164328.1009132-4-alex.bennee@linaro.org>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260417164328.1009132-1-alex.bennee@linaro.org>", "References": "<20260417164328.1009132-1-alex.bennee@linaro.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::32d;\n envelope-from=alex.bennee@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,\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=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 <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": "While we are at it we can reduce the number of temporary variables\nneeded and fix a format string error.\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n---\n tests/tcg/aarch64/system/asid2.c | 35 ++++++++++++++------------------\n 1 file changed, 15 insertions(+), 20 deletions(-)", "diff": "diff --git a/tests/tcg/aarch64/system/asid2.c b/tests/tcg/aarch64/system/asid2.c\nindex 7d5466af34a..8c93024b858 100644\n--- a/tests/tcg/aarch64/system/asid2.c\n+++ b/tests/tcg/aarch64/system/asid2.c\n@@ -9,10 +9,11 @@\n \n #include <stdint.h>\n #include <minilib.h>\n+#include \"sysregs.h\"\n \n-#define ID_AA64MMFR3_EL1 \"S3_0_C0_C7_3\"\n-#define ID_AA64MMFR4_EL1 \"S3_0_C0_C7_4\"\n-#define TCR2_EL1 \"S3_0_C2_C0_3\"\n+#define ID_AA64MMFR3_EL1 S3_0_C0_C7_3\n+#define ID_AA64MMFR4_EL1 S3_0_C0_C7_4\n+#define TCR2_EL1 S3_0_C2_C0_3\n \n int main()\n {\n@@ -23,7 +24,7 @@ int main()\n * not enabled and read as the written value if A2 is enabled.\n */\n \n- uint64_t out;\n+ uint64_t read_tcr2;\n uint64_t idreg3;\n uint64_t idreg4;\n int tcr2_present;\n@@ -31,11 +32,8 @@ int main()\n \n /* Mask is FNG1, FNG0, and A2 */\n const uint64_t feature_mask = (1ULL << 18 | 1ULL << 17 | 1ULL << 16);\n- const uint64_t in = feature_mask;\n-\n- asm(\"mrs %[idreg3], \" ID_AA64MMFR3_EL1 \"\\n\\t\"\n- : [idreg3] \"=r\" (idreg3));\n \n+ idreg3 = read_sysreg(ID_AA64MMFR3_EL1);\n tcr2_present = ((idreg3 & 0xF) != 0);\n \n if (!tcr2_present) {\n@@ -43,33 +41,30 @@ int main()\n return 0;\n }\n \n- asm(\"mrs %[idreg4], \" ID_AA64MMFR4_EL1 \"\\n\\t\"\n- : [idreg4] \"=r\" (idreg4));\n-\n+ idreg4 = read_sysreg(ID_AA64MMFR4_EL1);\n asid2_present = ((idreg4 & 0xF00) != 0);\n \n- asm(\"msr \" TCR2_EL1 \", %[x0]\\n\\t\"\n- \"mrs %[x1], \" TCR2_EL1 \"\\n\\t\"\n- : [x1] \"=r\" (out)\n- : [x0] \"r\" (in));\n+ /* write the feature mask and read back */\n+ write_sysreg(feature_mask, TCR2_EL1);\n+ read_tcr2 = read_sysreg(TCR2_EL1);\n \n if (asid2_present) {\n- if ((out & feature_mask) == in) {\n+ if ((read_tcr2 & feature_mask) == feature_mask) {\n ml_printf(\"OK\\n\");\n return 0;\n } else {\n ml_printf(\"FAIL: ASID2 present, but read value %lx != \"\n \"written value %lx\\n\",\n- out & feature_mask, in);\n+ read_tcr2 & feature_mask, feature_mask);\n return 1;\n }\n } else {\n- if (out == 0) {\n+ if (read_tcr2 == 0) {\n ml_printf(\"TCR2_EL1 reads as RES0 as expected\\n\");\n return 0;\n } else {\n- ml_printf(\"FAIL: ASID2, missing but read value %lx != 0\\n\",\n- out & feature_mask, in);\n+ ml_printf(\"FAIL: ASID2, missing but read value %lx != %lx\\n\",\n+ read_tcr2 & feature_mask, feature_mask);\n return 1;\n }\n }\n", "prefixes": [ "3/7" ] }