Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226156/?format=api
{ "id": 2226156, "url": "http://patchwork.ozlabs.org/api/patches/2226156/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422101043.1234229-24-alex.bennee@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": "<20260422101043.1234229-24-alex.bennee@linaro.org>", "list_archive_url": null, "date": "2026-04-22T10:10:34", "name": "[v2,23/31] target/arm: report register in WFIT syndromes", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "710274731b6fd18f298437029808fc655eec0171", "submitter": { "id": 39532, "url": "http://patchwork.ozlabs.org/api/people/39532/?format=api", "name": "Alex Bennée", "email": "alex.bennee@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422101043.1234229-24-alex.bennee@linaro.org/mbox/", "series": [ { "id": 500957, "url": "http://patchwork.ozlabs.org/api/series/500957/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500957", "date": "2026-04-22T10:10:11", "name": "target/arm: fully model WFxT instructions for A-profile", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/500957/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226156/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226156/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=NO6kdczo;\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 4g0wCn4rmkz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 20:18:13 +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 1wFUeY-00073C-KL; Wed, 22 Apr 2026 06:17: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 1wFUeM-0006yu-6m\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 06:17:43 -0400", "from mail-wr1-x443.google.com ([2a00:1450:4864:20::443])\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 1wFUeD-0002NF-O9\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 06:17:38 -0400", "by mail-wr1-x443.google.com with SMTP id\n ffacd0b85a97d-43d74086e5bso5204772f8f.0\n for <qemu-devel@nongnu.org>; Wed, 22 Apr 2026 03:17:30 -0700 (PDT)", "from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43fe4e4d112sm49087054f8f.29.2026.04.22.03.17.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 22 Apr 2026 03:17:28 -0700 (PDT)", "from draig.lan (localhost [IPv6:::1])\n by draig.lan (Postfix) with ESMTP id 45F47614FF;\n Wed, 22 Apr 2026 11:10:45 +0100 (BST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776853049; x=1777457849; 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=reUwRDuVhNbhnF2K13EHapoGcij9kmY6U8ucQNXXySM=;\n b=NO6kdczo0uFwacby8k1t3VqM/gZIGsas+g3t/J4pJHrHs1SdT0Z2Le0Wtbf6VyUUFn\n /J3m5dLjokCu6Boal44tweRb6/SIeUotaWhc2IJkpwJD/m7D5C5HkDdfTFxTFStZu1W5\n NuI6gxoIWc2itVouyWuNQ86XPzo1EQ0nlL6pXp042M+bNkbAW9bcwY7jQCf4cLutFrnz\n P4lqh7OU/XO5EVEl3snRcYe3GlbHxpz3/xqWOz65dSzCoN8MJZnDHGgT9Oh3q5DH9Re9\n kEyDVkso/lcx42hoaHULaHXW/sZYbd7Hh3tL0T7frqK6RJmKn1RPgqKKTOW5NHeT7cen\n LjCg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776853049; x=1777457849;\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=reUwRDuVhNbhnF2K13EHapoGcij9kmY6U8ucQNXXySM=;\n b=GdEJ8KsPGfZ+ei1LpdyT2wLAiYcgDDJDqfhoK65Az5FfyaRDLe/1jl9ooNvV/5o7un\n hKyOUvEUTipXxhNa57bnFygdKj2c3v2Dv6igVPX9dujHXXEpG71ZgnVrBP5Jy8yNc5pg\n 9PCEvZAplTsVAn6y7tJzJiXA0akMp/MPtiK6Md/ufMx295NtBENuPgy+JjG+GwCgdbVM\n FMDuV6RV58JI+GOYSyGKT2gbk6TGtdSxl5QA9hbacHNV1ue4Hx4K6J3RZY2smD49zVRo\n 8c4JTblj9MmM1/5lIwx0tqm1e9KktATjgVR7hhHA9XyIYU+Z6tGPRm3jtoba7ka/d9gp\n 4JBg==", "X-Gm-Message-State": "AOJu0YyLe2iOkuEt9HlN4K8M+MAO8w8J+Vbz9hCDXo2Ujyai3VqtyT61\n tboYCt9uAfllkFOIt5+7UyE7dN6VVCsYrSeffyVY0mnlA3xZCNw2hnwLZNqozgZJoOf4s2H6eiU\n bZ+qvOzrO0Q==", "X-Gm-Gg": "AeBDietzx0+3xYAWdlC4CP6BUMoTo/TvLzBXfWkrStPPAdS79oqxQyUKtUNr7SsQAZN\n CL8UHxx1YyZJHJxqFWFtIXgmTVwRzlskivc0uPdtwQfaI50lRUNgyJLsa/Nj0U+sETrJEuhav4q\n i03ARxMpflUEkYFz1M1FVXaSDYUxPHjjbLFJULbO/WBJ4yhBE+Nu6wvbZ0M8TZSBPA17DkqhtZF\n f7b4wjkHnRCo7FzSIluOodNOA+/REnt84kZ8tXCYB0ReWHijDqbo8faSWkSGmv82uybC3cKnFla\n ajoE197vJOLDC67jq+e9uNZtdya3La1Ap3Hp2rKDDAuybad9grWvd5IvAWB7dyj1QdaO2Zvbr/C\n qxW7AjTuoHw593wDZLau61GMEt6YWg3SxSECxRgBaJt2zndVq2kqdH7L8hYzwWuQpaY4GG/uMc0\n mu0PlND2bizb3xWQDaKdstcITX+01+009777C+Jrl5EBri", "X-Received": "by 2002:a05:6000:2211:b0:43f:e938:1e67 with SMTP id\n ffacd0b85a97d-43fe9381e75mr30962580f8f.38.1776853048906;\n Wed, 22 Apr 2026 03:17:28 -0700 (PDT)", "From": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "Alexander Graf <agraf@csgraf.de>, qemu-arm@nongnu.org,\n Peter Maydell <peter.maydell@linaro.org>,\n Paolo Bonzini <pbonzini@redhat.com>,\n Mohamed Mediouni <mohamed@unpredictable.fr>, kvm@vger.kernel.org,\n Pedro Barbuda <pbarbuda@microsoft.com>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Richard Henderson <richard.henderson@linaro.org>", "Subject": "[PATCH v2 23/31] target/arm: report register in WFIT syndromes", "Date": "Wed, 22 Apr 2026 11:10:34 +0100", "Message-ID": "<20260422101043.1234229-24-alex.bennee@linaro.org>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260422101043.1234229-1-alex.bennee@linaro.org>", "References": "<20260422101043.1234229-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::443;\n envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.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": "Pass the register number (rd) to the wfit helper and report it in the\nsyndrome ISS.\n\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv2\n - drop stale TODO\n - fixup stale commit comment (WFIT fix already merged)\n - make rv a bool\n - make ti a enum type\n---\n target/arm/syndrome.h | 11 ++++++++++-\n target/arm/tcg/helper-defs.h | 2 +-\n target/arm/tcg/op_helper.c | 7 ++++---\n target/arm/tcg/translate-a64.c | 2 +-\n 4 files changed, 16 insertions(+), 6 deletions(-)", "diff": "diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h\nindex 04a71eebcb5..4d1f1c529e2 100644\n--- a/target/arm/syndrome.h\n+++ b/target/arm/syndrome.h\n@@ -670,7 +670,14 @@ FIELD(WFX_ISS, RN, 5, 5)\n FIELD(WFX_ISS, COND, 20, 4)\n FIELD(WFX_ISS, CV, 24, 1)\n \n-static inline uint32_t syn_wfx(int cv, int cond, int ti, bool is_16bit)\n+typedef enum {\n+ WFI = 0b00,\n+ WFE = 0b01,\n+ WFIT = 0b10,\n+ WFET = 0xb11\n+} wfx_ti;\n+\n+static inline uint32_t syn_wfx(int cv, int cond, int rn, bool rv, wfx_ti ti, bool is_16bit)\n {\n uint32_t res = syn_set_ec(0, EC_WFX_TRAP);\n res = FIELD_DP32(res, SYNDROME, IL, !is_16bit);\n@@ -678,6 +685,8 @@ static inline uint32_t syn_wfx(int cv, int cond, int ti, bool is_16bit)\n res = FIELD_DP32(res, WFX_ISS, CV, cv);\n res = FIELD_DP32(res, WFX_ISS, COND, cond);\n res = FIELD_DP32(res, WFX_ISS, TI, ti);\n+ res = FIELD_DP32(res, WFX_ISS, RN, rn);\n+ res = FIELD_DP32(res, WFX_ISS, RV, rv);\n \n return res;\n }\ndiff --git a/target/arm/tcg/helper-defs.h b/target/arm/tcg/helper-defs.h\nindex 5a10a9fba3b..a05f2258f29 100644\n--- a/target/arm/tcg/helper-defs.h\n+++ b/target/arm/tcg/helper-defs.h\n@@ -55,7 +55,7 @@ DEF_HELPER_2(exception_pc_alignment, noreturn, env, vaddr)\n DEF_HELPER_1(setend, void, env)\n DEF_HELPER_2(wfi, void, env, i32)\n DEF_HELPER_1(wfe, void, env)\n-DEF_HELPER_2(wfit, void, env, i64)\n+DEF_HELPER_2(wfit, void, env, i32)\n DEF_HELPER_1(yield, void, env)\n DEF_HELPER_1(pre_hvc, void, env)\n DEF_HELPER_2(pre_smc, void, env, i32)\ndiff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c\nindex aa14f15eb62..652611b4313 100644\n--- a/target/arm/tcg/op_helper.c\n+++ b/target/arm/tcg/op_helper.c\n@@ -399,7 +399,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len)\n env->regs[15] -= insn_len;\n }\n \n- raise_exception(env, excp, syn_wfx(1, 0xe, 0, insn_len == 2),\n+ raise_exception(env, excp, syn_wfx(1, 0xe, 0, false, WFI, insn_len == 2),\n target_el);\n }\n \n@@ -409,7 +409,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len)\n #endif\n }\n \n-void HELPER(wfit)(CPUARMState *env, uint64_t timeout)\n+void HELPER(wfit)(CPUARMState *env, uint32_t rd)\n {\n #ifdef CONFIG_USER_ONLY\n /*\n@@ -428,6 +428,7 @@ void HELPER(wfit)(CPUARMState *env, uint64_t timeout)\n int target_el = check_wfx_trap(env, false, &excp);\n /* The WFIT should time out when CNTVCT_EL0 >= the specified value. */\n uint64_t cntval = gt_get_countervalue(env);\n+ uint64_t timeout = env->xregs[rd];\n /*\n * We want the value that we would get if we read CNTVCT_EL0 from\n * the current exception level, so the direct_access offset, not\n@@ -448,7 +449,7 @@ void HELPER(wfit)(CPUARMState *env, uint64_t timeout)\n \n if (target_el) {\n env->pc -= 4;\n- raise_exception(env, excp, syn_wfx(1, 0xe, 2, false), target_el);\n+ raise_exception(env, excp, syn_wfx(1, 0xe, rd, true, WFIT, false), target_el);\n }\n \n if (uadd64_overflow(timeout, offset, &nexttick)) {\ndiff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c\nindex 5d261a5e32b..073454b9195 100644\n--- a/target/arm/tcg/translate-a64.c\n+++ b/target/arm/tcg/translate-a64.c\n@@ -2064,7 +2064,7 @@ static bool trans_WFIT(DisasContext *s, arg_WFIT *a)\n }\n \n gen_a64_update_pc(s, 4);\n- gen_helper_wfit(tcg_env, cpu_reg(s, a->rd));\n+ gen_helper_wfit(tcg_env, tcg_constant_i32(a->rd));\n /* Go back to the main loop to check for interrupts */\n s->base.is_jmp = DISAS_EXIT;\n return true;\n", "prefixes": [ "v2", "23/31" ] }