Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2227676/?format=api
{ "id": 2227676, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227676/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424043014.46305-13-richard.henderson@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260424043014.46305-13-richard.henderson@linaro.org>", "date": "2026-04-24T04:29:46", "name": "[v2,12/40] target/arm: Add FPMR_EL to TBFLAGS", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9336d2ddcc8752f7c21c9f6e2d38502d09828545", "submitter": { "id": 72104, "url": "http://patchwork.ozlabs.org/api/1.1/people/72104/?format=api", "name": "Richard Henderson", "email": "richard.henderson@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424043014.46305-13-richard.henderson@linaro.org/mbox/", "series": [ { "id": 501300, "url": "http://patchwork.ozlabs.org/api/1.1/series/501300/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501300", "date": "2026-04-24T04:29:37", "name": "target/arm: Implement FEAT_FP8", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/501300/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2227676/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2227676/checks/", "tags": {}, "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=BjO+oqXE;\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 4g20Tf4rK5z1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 14:33:58 +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 1wG8Cc-0007T4-MI; Fri, 24 Apr 2026 00:31:42 -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 <richard.henderson@linaro.org>)\n id 1wG8CG-00070U-MP\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 00:31:22 -0400", "from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>)\n id 1wG8CC-0002oL-Mx\n for qemu-devel@nongnu.org; Fri, 24 Apr 2026 00:31:18 -0400", "by mail-oa1-x2a.google.com with SMTP id\n 586e51a60fabf-42fbf95cca8so2177218fac.0\n for <qemu-devel@nongnu.org>; Thu, 23 Apr 2026 21:31:16 -0700 (PDT)", "from stoup.. ([172.58.183.19]) by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-42b9ac54ec5sm18880864fac.13.2026.04.23.21.31.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Apr 2026 21:31:14 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777005075; x=1777609875; 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=V7aV4/ccpJY3oIK25szkraYIxGpm+6Rk3RJv/5vVfmY=;\n b=BjO+oqXERvlhjfW+mcAvOl7lUVqm52O2LuM6pyGUT9PPdzKbKC1+FjdBjeiaxXs7M8\n T1rMEva5XvY2X/VX9hZMt5mezH/HKbI/1pvC/Z6T91l/my9s9PHkbNc7t7Tcr9DJmqlU\n /fxw/es7IVg/ub0HvmNTJrsgF14AzJsnyMuGd7lceSPnU15D5l/5EVjdIUzInJX2EZsr\n Ht3wP9rrLVbVbcN2B3AuNUMj01aBV4e3eXh8dV7bJhIW34gytPo8O/AHDfd/Wyh9NSB7\n Fi6iLWD5+eRmLhG/RP/C5WnQU6SgEGBTBzyvhm55bridIntcLAhmaEoKbLYY1EsoXRAy\n 7OPg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777005075; x=1777609875;\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=V7aV4/ccpJY3oIK25szkraYIxGpm+6Rk3RJv/5vVfmY=;\n b=KvqovjOXsWq6jyJQCrzrf9C9BRnVenqbjsPHwBOgt7DTPFIoUKG978sUqHxi7RmB7a\n 1tEpNKGd+vuyU9ZR61sD64slKS+IAUvUJFo4lCncUa7QFWVUVe2g/XoWHCN1IqdgCJM/\n kLCsPSRydutzf/klMP3gXTOsUAlIBgELNsGhYtMpsq9kN7fdu4rV0VdPRMBhqhxj6voz\n q3cn6pyjFuF7fRdyX8dHaoK80bMSzRhrVK+Zmp7Ep8gTvsUJpmkdWomH2BBwkCneVrwx\n rIgeg1ad9Nf7k4S+K6ig84u40BQGO9SAo2615iIMcbGBgDfs+SEtqSAE4Qy20jlhkuKT\n 4XGQ==", "X-Gm-Message-State": "AOJu0Yzqeb/I8qUd8aQ5oZWYc0pJ1Qvky+TRyGJfXrdKKDKYuvIfklrB\n AwyuV3zLu224AHsXw9qRZMVbxp039SYdIalncDCDeE+c+uO2Tu7vFRqjIAWV66O3TOVemD47dlh\n lN0EUv24=", "X-Gm-Gg": "AeBDieuV5trQFtMMUvD6sqiFARyJEdW5h7c3le4V0W5ahm6C2IHqTRGt3M4qYQqZGVG\n oNB53FkxIjG8QStyfBN+GMf0bAKZ/9l6O0FspA3E7+/P/H1nY+xtt6YLLoBPQzpWUB7YJERgjx8\n tjMiQxKpHSkvzU2u80ZOtdos7sRoKxzvMxccTX7M0c9n2GTbfPVUJ3XlzCrrEdHpJOoskPtn0pQ\n n8xkvrv7a84uMGaTI3HloqnjFoQdI4dNnrzN9FA0qYl4DGFmHswBWVAEbQYuBbbQ44wAmvopjNn\n U7Nd02HtJmHx+G7V+SLpIpgFpvnmVcMHC2A14elaOvryS1zBbDRC4iElD898yB4un03nViHCCq5\n iOuifrWAagOtGNFK/vxnkhHFU1HZbW6ukg3nDBDRxFtl+2/srBbuNlQtbq01SRIHoz+xYI8VvHw\n sBNRMRe73K8CsWmeObj4PM9E+aSGrL4FPX4JIkNqD7Jug8UpiFBR5+YtGbI40Zxg==", "X-Received": "by 2002:a05:6870:9d88:b0:409:76e0:bd84 with SMTP id\n 586e51a60fabf-42aded0b29emr19061002fac.24.1777005074979;\n Thu, 23 Apr 2026 21:31:14 -0700 (PDT)", "From": "Richard Henderson <richard.henderson@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "qemu-arm@nongnu.org", "Subject": "[PATCH v2 12/40] target/arm: Add FPMR_EL to TBFLAGS", "Date": "Fri, 24 Apr 2026 14:29:46 +1000", "Message-ID": "<20260424043014.46305-13-richard.henderson@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260424043014.46305-1-richard.henderson@linaro.org>", "References": "<20260424043014.46305-1-richard.henderson@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2001:4860:4864:20::2a;\n envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2a.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": "Prepare to perform access checks for direct and\nindirect uses of FPMR.\n\nSigned-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n target/arm/cpu.h | 1 +\n target/arm/tcg/translate.h | 2 ++\n target/arm/tcg/hflags.c | 41 ++++++++++++++++++++++++++++++++++\n target/arm/tcg/translate-a64.c | 1 +\n 4 files changed, 45 insertions(+)", "diff": "diff --git a/target/arm/cpu.h b/target/arm/cpu.h\nindex deab811ba4..e78bc1737d 100644\n--- a/target/arm/cpu.h\n+++ b/target/arm/cpu.h\n@@ -2536,6 +2536,7 @@ FIELD(TBFLAG_A64, ZT0EXC_EL, 39, 2)\n FIELD(TBFLAG_A64, GCS_EN, 41, 1)\n FIELD(TBFLAG_A64, GCS_RVCEN, 42, 1)\n FIELD(TBFLAG_A64, GCSSTR_EL, 43, 2)\n+FIELD(TBFLAG_A64, FPMR_EL, 45, 2)\n \n /*\n * Helpers for using the above. Note that only the A64 accessors use\ndiff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h\nindex 3e3094a463..4001f2fc36 100644\n--- a/target/arm/tcg/translate.h\n+++ b/target/arm/tcg/translate.h\n@@ -199,6 +199,8 @@ typedef struct DisasContext {\n uint8_t gm_blocksize;\n /* True if the current insn_start has been updated. */\n bool insn_start_updated;\n+ /* FMPR exception EL or 0 if enabled. */\n+ uint8_t fpmr_el;\n /* Offset from VNCR_EL2 when FEAT_NV2 redirects this reg to memory */\n uint32_t nv2_redirect_offset;\n } DisasContext;\ndiff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c\nindex 7e6f8d3647..6759b36f28 100644\n--- a/target/arm/tcg/hflags.c\n+++ b/target/arm/tcg/hflags.c\n@@ -237,6 +237,43 @@ static int zt0_exception_el(CPUARMState *env, int el)\n return 0;\n }\n \n+/*\n+ * Return the exception level to which exceptions should be taken for FPMR.\n+ * C.f. the ARM pseudocode function CheckFPMREnabled.\n+ */\n+static int fpmr_exception_el(CPUARMState *env, int el)\n+{\n+ switch (el) {\n+ case 0:\n+ if (el_is_in_host(env, el)) {\n+ if (!(env->cp15.sctlr_el[2] & SCTLR_EnFPM)) {\n+ return 2;\n+ }\n+ break;\n+ }\n+ if (!(env->cp15.sctlr_el[1] & SCTLR_EnFPM)) {\n+ return 1;\n+ }\n+ /* fall through */\n+ case 1:\n+ if (!(arm_hcrx_el2_eff(env) & HCRX_ENFPM)) {\n+ return 2;\n+ }\n+ break;\n+ case 2:\n+ break;\n+ case 3:\n+ return 0;\n+ default:\n+ g_assert_not_reached();\n+ }\n+ if (arm_feature(env, ARM_FEATURE_EL3)\n+ && !(env->cp15.scr_el3 & SCR_ENFPM)) {\n+ return 3;\n+ }\n+ return 0;\n+}\n+\n static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el,\n ARMMMUIdx mmu_idx)\n {\n@@ -500,6 +537,10 @@ static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el,\n }\n }\n \n+ if (cpu_isar_feature(aa64_fpmr, env_archcpu(env))) {\n+ DP_TBFLAG_A64(flags, FPMR_EL, fpmr_exception_el(env, el));\n+ }\n+\n return rebuild_hflags_common(env, fp_el, mmu_idx, flags);\n }\n \ndiff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c\nindex 9f375b05ca..ef6038e98b 100644\n--- a/target/arm/tcg/translate-a64.c\n+++ b/target/arm/tcg/translate-a64.c\n@@ -10725,6 +10725,7 @@ static void aarch64_tr_init_disas_context(DisasContextBase *dcbase,\n dc->gcs_en = EX_TBFLAG_A64(tb_flags, GCS_EN);\n dc->gcs_rvcen = EX_TBFLAG_A64(tb_flags, GCS_RVCEN);\n dc->gcsstr_el = EX_TBFLAG_A64(tb_flags, GCSSTR_EL);\n+ dc->fpmr_el = EX_TBFLAG_A64(tb_flags, FPMR_EL);\n dc->vec_len = 0;\n dc->vec_stride = 0;\n dc->cp_regs = arm_cpu->cp_regs;\n", "prefixes": [ "v2", "12/40" ] }