get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2202562/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2202562,
    "url": "http://patchwork.ozlabs.org/api/patches/2202562/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260227203627.932864-10-brian.cain@oss.qualcomm.com/",
    "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": "<20260227203627.932864-10-brian.cain@oss.qualcomm.com>",
    "list_archive_url": null,
    "date": "2026-02-27T20:35:59",
    "name": "[v3,09/37] target/hexagon: Add privilege check, use tag_ignore()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "37d82fa16e5dfd62b5ee3280f387cccc001bcf01",
    "submitter": {
        "id": 89839,
        "url": "http://patchwork.ozlabs.org/api/people/89839/?format=api",
        "name": "Brian Cain",
        "email": "brian.cain@oss.qualcomm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260227203627.932864-10-brian.cain@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 493813,
            "url": "http://patchwork.ozlabs.org/api/series/493813/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=493813",
            "date": "2026-02-27T20:35:57",
            "name": "Hexagon system emulation - Part 1/3",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/493813/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2202562/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2202562/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=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=fkMYxOjy;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=kFqH3OX9;\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 4fN0Yh3HxQz1xph\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Feb 2026 07:39:36 +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 1vw4Zw-0006p4-3H; Fri, 27 Feb 2026 15:36:52 -0500",
            "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 <brian.cain@oss.qualcomm.com>)\n id 1vw4Zv-0006oX-45\n for qemu-devel@nongnu.org; Fri, 27 Feb 2026 15:36:51 -0500",
            "from mx0a-0031df01.pphosted.com ([205.220.168.131])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <brian.cain@oss.qualcomm.com>)\n id 1vw4Zt-0006pG-6M\n for qemu-devel@nongnu.org; Fri, 27 Feb 2026 15:36:50 -0500",
            "from pps.filterd (m0279867.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 61RH0H4r131540\n for <qemu-devel@nongnu.org>; Fri, 27 Feb 2026 20:36:48 GMT",
            "from mail-oi1-f197.google.com (mail-oi1-f197.google.com\n [209.85.167.197])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ck43rb2nq-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <qemu-devel@nongnu.org>; Fri, 27 Feb 2026 20:36:47 +0000 (GMT)",
            "by mail-oi1-f197.google.com with SMTP id\n 5614622812f47-463c4133ccaso35007139b6e.2\n for <qemu-devel@nongnu.org>; Fri, 27 Feb 2026 12:36:47 -0800 (PST)",
            "from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com.\n [129.46.96.20]) by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-4160cbd405fsm5762935fac.0.2026.02.27.12.36.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Feb 2026 12:36:46 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n aYnAQp5+e16XfFimqdWu5tDNoQnvxHUBT30sT8aTEfE=; b=fkMYxOjyPD7KigYz\n hxqE2mRLkECts3JVtO9YOoGVm6s9p9e+jZ1R49G4cWbHmlhFES0jntBtCLUNT+LP\n HZRBrYMbxyC6fMS7UWt0H9+F4oLACav6IOl/CSkarvVVSysL6GrTRrMn9yNYQCDm\n EiI9CB8olP7yeEYEfM82iEVM9v7ZU5kw1xtulNqnetPFtd8uFZXhPpTsBileeqFs\n Q4YLb7cjZQQDpYDQc8OFe4iKhG37i4MyR2FhFc+FtiC7blyxImQ3F4khjvSTLpzx\n kLbwNxxdBiiQssHa0zaM1iBligxcf/kzenqO7hxPYr/PG5VJzeSDWXO4yo2O94Np\n fsnjug==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1772224607; x=1772829407; 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=aYnAQp5+e16XfFimqdWu5tDNoQnvxHUBT30sT8aTEfE=;\n b=kFqH3OX9c9iTBRpehuC/iAu2Aszv0dyBZc4gQsD6iKapXLuHwHPaes4lP0frH4Sp/b\n NcwdBU8uHd5vAOe57eXkPj2s1f94frBzfazj6LqJzNJ1b8Caz6dPthEJEZrEoDlMNthk\n mV835Vy0FIBZFr0XIKegTrlczhjB39XxcI2ha8PxD/sMuut2evVrKZw1CpL9001bgGnH\n VtMEMicGLcvzhxuD3vCB+5295twJ4PMCWNRTFcvqj2BYfsAigcK1qm3WJI4Z+0SfV2tt\n TNADGrLYtA37GTyBn9WNJ4pQZQIyqVDvl/chetVlVmLOrfjeDLhtEzb/70Ubkb2pAJ/K\n HClg=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1772224607; x=1772829407;\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=aYnAQp5+e16XfFimqdWu5tDNoQnvxHUBT30sT8aTEfE=;\n b=IE00hX+tNQCOY1ZOFORknfbRIHkuEYLyHW6GQ6J9C3U1Hc+YRyFVLWPufxMP9yM/oE\n Q3b7TCAty9eLym1ANYRhMe2E6SN3qQM0exgZGRML13iQmUwvkt2ZcnkuZnIKExZC8w/p\n xewQTAXuHImA79RuVXKia5qqB3a0UVYthp3aSH0iHwINwwsbZTHZUzbDdWR5wOjXOl2l\n sqQeK9HrmaZFZJZs+bpPaEVFmZr04q8dyTndb5mvxw/IF77BGcZY2vTdQ0dBkoJOxufT\n 6wd0595Ss6Z0rrEfmg33U0S6iB33iCgaaPgKrqFMWytUVkLzl1md0XXgRQa4P44iVrrm\n WfOQ==",
        "X-Gm-Message-State": "AOJu0YxKxv4pbbMaeZKGz1pbX2aDnbFPVgr2aYP4LkYArPbJtYrITOwl\n JeY9zjjtzkSK+qi59faWvvJ6bxIAJXCRM/RogF9Tk6NCrQ4GVsJHtsNam3MT1NfKd6BDew2It7q\n SxGNf6wJgpfVmkiugoaP7Ety5ghf/b4N/FBJ6x6/NMhZbyyQFPDTPoJCQXKEYjIPD4w==",
        "X-Gm-Gg": "ATEYQzwMsjfWGZk5+Es2E920H2FqyuZg2Wxg4q9YTNR2Byn8ttqiPx4+lxA9lZ05jnr\n zJf7OuK5ZE4hGGtt1GBUZsF75rralxENwHtG25fDMH1TVDFTIVxPBdOgc496cVVwRmbrAS2x9Ce\n zXaGZyNBdA2/ywJ09B7M22cCJYbnXAUV0PxtBEEuVx/coz/6Vw8TsnbPhdgo6WCad9NPMOBpMqy\n CBWcgYuLpXIjfIzzM+f9PFP18vKDcpZ3tR5Y2/IeUf9oCgw894fryil0UA/vEs88eG4GFbGZy0Y\n Ph/pDrSPFw2Xrr61lGkgW/BWySkbG5nWQE17bP/ibLrglx+qikfH1YikjF+Si/Z4VrouoQKPI8x\n S5Bd8h6Lx9YE7JaVI5EFSVfj0WFSOVxnVqYBFnNvh2Y3mFQKZq/VCONLZhTLyI83nzuj4rg==",
        "X-Received": [
            "by 2002:a05:6808:2292:b0:463:b5dc:11ea with SMTP id\n 5614622812f47-464be93c96fmr2334175b6e.5.1772224606875;\n Fri, 27 Feb 2026 12:36:46 -0800 (PST)",
            "by 2002:a05:6808:2292:b0:463:b5dc:11ea with SMTP id\n 5614622812f47-464be93c96fmr2334155b6e.5.1772224606436;\n Fri, 27 Feb 2026 12:36:46 -0800 (PST)"
        ],
        "From": "Brian Cain <brian.cain@oss.qualcomm.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "brian.cain@oss.qualcomm.com, ltaylorsimpson@gmail.com,\n matheus.bernardino@oss.qualcomm.com, marco.liebel@oss.qualcomm.com,\n quic_mburton@quicinc.com, sid.manning@oss.qualcomm.com, ale@rev.ng,\n anjo@rev.ng, Brian Cain <bcain@quicinc.com>,\n Laurent Vivier <laurent@vivier.eu>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>",
        "Subject": "[PATCH v3 09/37] target/hexagon: Add privilege check,\n use tag_ignore()",
        "Date": "Fri, 27 Feb 2026 12:35:59 -0800",
        "Message-Id": "<20260227203627.932864-10-brian.cain@oss.qualcomm.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260227203627.932864-1-brian.cain@oss.qualcomm.com>",
        "References": "<20260227203627.932864-1-brian.cain@oss.qualcomm.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "X-Proofpoint-ORIG-GUID": "f_vBEV0_nl5QTezkZjGpEgTNtQkGj30W",
        "X-Proofpoint-GUID": "f_vBEV0_nl5QTezkZjGpEgTNtQkGj30W",
        "X-Authority-Analysis": "v=2.4 cv=DOqCIiNb c=1 sm=1 tr=0 ts=69a2005f cx=c_pps\n a=WJcna6AvsNCxL/DJwPP1KA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17\n a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22\n a=COk6AnOGAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=VlJJRYDoeMviBMv8l8cA:9\n a=QEXdDO2ut3YA:10 a=_Y9Zt4tPzoBS9L09Snn2:22 a=TjNXssC_j7lpFel5tvFf:22",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjI3MDE4MSBTYWx0ZWRfX5D8bYgfCXNFS\n Yck4+I6jhGgf78vgnVJQo+6XLWPI3x4im33PO74tYFlFjxa6AmCQMB22KZXLcbHxOl5Kttnvdb6\n /I4LlZruu5vYRn7oYGF0Eo65qOB3l9Jd2HmOBbAldC012GxM91IonT5tQa2q2MXvnDSYnxWL1Vy\n tcbgG9lpVTbOzWuhhiD2c+VZT/6Ln+gJDUpFuznnmbeGAy7oMBbGTRqyNSGSP/gw1Vo2Hqogqoi\n 2EDCNirSqnydMZlVO2D9aetGX1Ux3FicPudvAF54mLm7hnC0MHaFUNnKzgNnSa2iBKxYvoS+1MP\n oJj5nwyHPlHpn8pPZPqi76hOLtEWTLtP6F/FF2jEdlfXyPHQNiNPifRacVs8d0o9XhT6msRfbUj\n R1ZOGmRd+cxUif1YtGpAOgd6DRyUg5U54FBpapRiwcKdsk0yDcVZkRwRW5jm4CQ9yN6ScRsQ38G\n d5aSdr1Htol/Zrb+XSQ==",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-27_04,2026-02-27_03,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n spamscore=0 phishscore=0 malwarescore=0 adultscore=0 priorityscore=1501\n clxscore=1015 suspectscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2602270181",
        "Received-SPF": "pass client-ip=205.220.168.131;\n envelope-from=brian.cain@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com",
        "X-Spam_score_int": "-16",
        "X-Spam_score": "-1.7",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.7 / 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_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.706,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.401, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=no 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": "From: Brian Cain <bcain@quicinc.com>\n\nReviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>\nSigned-off-by: Brian Cain <brian.cain@oss.qualcomm.com>\n---\n target/hexagon/cpu.h            |  1 +\n linux-user/hexagon/cpu_loop.c   | 16 +++++++++++++++\n target/hexagon/cpu.c            |  1 +\n target/hexagon/translate.c      |  8 ++++++++\n target/hexagon/gen_tcg_funcs.py | 35 +++++++++++++++++++++------------\n 5 files changed, 48 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h\nindex 049856e7cba..9fd69c7453f 100644\n--- a/target/hexagon/cpu.h\n+++ b/target/hexagon/cpu.h\n@@ -85,6 +85,7 @@ typedef struct {\n typedef struct CPUArchState {\n     target_ulong gpr[TOTAL_PER_THREAD_REGS];\n     target_ulong pred[NUM_PREGS];\n+    target_ulong cause_code;\n \n     /* For comparing with LLDB on target - see adjust_stack_ptrs function */\n     target_ulong last_pc_dumped;\ndiff --git a/linux-user/hexagon/cpu_loop.c b/linux-user/hexagon/cpu_loop.c\nindex 5711055aff2..b63990663ab 100644\n--- a/linux-user/hexagon/cpu_loop.c\n+++ b/linux-user/hexagon/cpu_loop.c\n@@ -22,6 +22,7 @@\n #include \"qemu.h\"\n #include \"user-internals.h\"\n #include \"user/cpu_loop.h\"\n+#include \"target/hexagon/internal.h\"\n #include \"signal-common.h\"\n #include \"internal.h\"\n \n@@ -60,6 +61,21 @@ void cpu_loop(CPUHexagonState *env)\n                 env->gpr[0] = ret;\n             }\n             break;\n+        case HEX_EVENT_PRECISE:\n+            switch (env->cause_code) {\n+            case HEX_CAUSE_PRIV_USER_NO_GINSN:\n+            case HEX_CAUSE_PRIV_USER_NO_SINSN:\n+            case HEX_CAUSE_INVALID_PACKET:\n+            force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC,\n+                    env->gpr[HEX_REG_PC]);\n+            break;\n+            default:\n+                EXCP_DUMP(env, \"\\nqemu: unhandled CPU precise exception \"\n+                    \"cause code 0x%x - aborting\\n\",\n+                    env->cause_code);\n+                exit(EXIT_FAILURE);\n+            }\n+            break;\n         case HEX_CAUSE_PC_NOT_ALIGNED:\n             force_sig_fault(TARGET_SIGBUS, TARGET_BUS_ADRALN,\n                             env->gpr[HEX_REG_R31]);\ndiff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c\nindex 82c726139f7..a38568a2857 100644\n--- a/target/hexagon/cpu.c\n+++ b/target/hexagon/cpu.c\n@@ -306,6 +306,7 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetType type)\n     set_float_detect_tininess(float_tininess_before_rounding, &env->fp_status);\n     /* Default NaN value: sign bit set, all frac bits set */\n     set_float_default_nan_pattern(0b11111111, &env->fp_status);\n+    env->cause_code = HEX_EVENT_NONE;\n }\n \n static void hexagon_cpu_disas_set_info(const CPUState *cs,\ndiff --git a/target/hexagon/translate.c b/target/hexagon/translate.c\nindex 877cb38ae77..f44080608b5 100644\n--- a/target/hexagon/translate.c\n+++ b/target/hexagon/translate.c\n@@ -65,6 +65,10 @@ TCGv hex_vstore_addr[VSTORES_MAX];\n TCGv hex_vstore_size[VSTORES_MAX];\n TCGv hex_vstore_pending[VSTORES_MAX];\n \n+#ifndef CONFIG_USER_ONLY\n+TCGv hex_cause_code;\n+#endif\n+\n static const char * const hexagon_prednames[] = {\n   \"p0\", \"p1\", \"p2\", \"p3\"\n };\n@@ -1153,4 +1157,8 @@ void hexagon_translate_init(void)\n             offsetof(CPUHexagonState, vstore_pending[i]),\n             vstore_pending_names[i]);\n     }\n+#ifndef CONFIG_USER_ONLY\n+    hex_cause_code = tcg_global_mem_new(tcg_env,\n+        offsetof(CPUHexagonState, cause_code), \"cause_code\");\n+#endif\n }\ndiff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py\nindex 87b7f10d7fd..d91bbcf1dc8 100755\n--- a/target/hexagon/gen_tcg_funcs.py\n+++ b/target/hexagon/gen_tcg_funcs.py\n@@ -21,7 +21,7 @@\n import re\n import string\n import hex_common\n-\n+from textwrap import dedent\n \n ##\n ## Generate the TCG code to call the helper\n@@ -49,6 +49,18 @@ def gen_tcg_func(f, tag, regs, imms):\n \n     f.write(\"    Insn *insn G_GNUC_UNUSED = ctx->insn;\\n\")\n \n+    if \"A_PRIV\" in hex_common.attribdict[tag]:\n+        f.write(dedent(\"\"\"\\\n+#ifdef CONFIG_USER_ONLY\n+    hex_gen_exception_end_tb(ctx, HEX_CAUSE_PRIV_USER_NO_SINSN);\n+#else\n+\"\"\"))\n+    if \"A_GUEST\" in hex_common.attribdict[tag]:\n+        f.write(dedent(\"\"\"\\\n+#ifdef CONFIG_USER_ONLY\n+    hex_gen_exception_end_tb(ctx, HEX_CAUSE_PRIV_USER_NO_GINSN);\n+#else\n+\"\"\"))\n     if hex_common.need_ea(tag):\n         f.write(\"    TCGv EA G_GNUC_UNUSED = tcg_temp_new();\\n\")\n \n@@ -100,6 +112,11 @@ def gen_tcg_func(f, tag, regs, imms):\n         if reg.is_written():\n             reg.gen_write(f, tag)\n \n+    if (\n+        \"A_PRIV\" in hex_common.attribdict[tag]\n+        or \"A_GUEST\" in hex_common.attribdict[tag]\n+    ):\n+        f.write(\"#endif   /* CONFIG_USER_ONLY */\\n\")\n     f.write(\"}\\n\\n\")\n \n \n@@ -124,18 +141,10 @@ def main():\n             f.write('#include \"idef-generated-emitter.h.inc\"\\n\\n')\n \n         for tag in hex_common.tags:\n-            ## Skip the priv instructions\n-            if \"A_PRIV\" in hex_common.attribdict[tag]:\n-                continue\n-            ## Skip the guest instructions\n-            if \"A_GUEST\" in hex_common.attribdict[tag]:\n-                continue\n-            ## Skip the diag instructions\n-            if tag == \"Y6_diag\":\n-                continue\n-            if tag == \"Y6_diag0\":\n-                continue\n-            if tag == \"Y6_diag1\":\n+            if hex_common.tag_ignore(tag):\n+                f.write(f\"static void generate_{tag}\"\n+                        f\"(DisasContext *ctx)\\n\")\n+                f.write(\"{\\n}\\n\\n\")\n                 continue\n \n             gen_def_tcg_func(f, tag, tagregs, tagimms)\n",
    "prefixes": [
        "v3",
        "09/37"
    ]
}