get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195812,
    "url": "http://patchwork.ozlabs.org/api/patches/2195812/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212033435.3598-8-ltaylorsimpson@gmail.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": "<20260212033435.3598-8-ltaylorsimpson@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-12T03:34:34",
    "name": "[7/8] Hexagon (target/hexagon) Disassembly of invalid packets",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "658e7e0ec7a1bc091c36ed9f0f60849be5e7c3fc",
    "submitter": {
        "id": 86757,
        "url": "http://patchwork.ozlabs.org/api/people/86757/?format=api",
        "name": "Taylor Simpson",
        "email": "ltaylorsimpson@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212033435.3598-8-ltaylorsimpson@gmail.com/mbox/",
    "series": [
        {
            "id": 491930,
            "url": "http://patchwork.ozlabs.org/api/series/491930/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491930",
            "date": "2026-02-12T03:34:34",
            "name": "Hexagon (target/hexagon) Check opcodes versions",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491930/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195812/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195812/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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=bxPc/QP8;\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 4fBLXn07pnz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 14:35:20 +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 1vqNTg-0007mO-4c; Wed, 11 Feb 2026 22:34: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 <ltaylorsimpson@gmail.com>)\n id 1vqNTd-0007l6-HC\n for qemu-devel@nongnu.org; Wed, 11 Feb 2026 22:34:49 -0500",
            "from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <ltaylorsimpson@gmail.com>)\n id 1vqNTb-0008IB-VV\n for qemu-devel@nongnu.org; Wed, 11 Feb 2026 22:34:49 -0500",
            "by mail-oi1-x243.google.com with SMTP id\n 5614622812f47-45f0b597eb4so1694842b6e.2\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 19:34:47 -0800 (PST)",
            "from taylor-ubuntu.. (c-67-172-136-152.hsd1.co.comcast.net.\n [67.172.136.152]) by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7d4a76e1b0csm2682858a34.14.2026.02.11.19.34.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 19:34:46 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770867286; x=1771472086; 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=h8Lq4sOSSRMCWRXjdXH1KuRIq2HriFTB8nlfBVQIPrE=;\n b=bxPc/QP8M0sjJxb0bCwNwm0SImh1bKWcmTZzcDMT4HDT/8blM5Tb6ui5W+Tey8/6+U\n 4EKh9P3xjlKDyB0P56sk+JrGGsHtLsH8xNwcEE3thstVV0mTnv7TDwHvGAZqJXBJrWuV\n sG3hZe6fB3mwqJ5yuhmfSJPfYrTb3wQ7acUvV02gCtRmPWpAuQeHZgvh/qt7uQpFfTGB\n wE0hDDwcOgix4iLIHWeWB7vZU9BAP9xwcZqhvm+QZhmpZsUOe7FCYGAHKkh7w7ffzR9k\n Dx5GhM6iEB9tzPbY3WDQ6d9+aljf44NifnqkCcHJISzgCYZ9Ajvhx65CWVNYZsEUxnxS\n XkQQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770867286; x=1771472086;\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: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IAI1/aQKMq02BKqXWiH66qG7x+FfINcTq+cM50B86dGcq6g\n PWBGUpI5NlmM9XWo1FpMLyG1oQ=",
        "X-Received": "by 2002:a05:6808:1a02:b0:45c:7c9e:854f with SMTP id\n 5614622812f47-4637fc9bae1mr446701b6e.58.1770867286435;\n Wed, 11 Feb 2026 19:34:46 -0800 (PST)",
        "From": "Taylor Simpson <ltaylorsimpson@gmail.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "brian.cain@oss.qualcomm.com, matheus.bernardino@oss.qualcomm.com,\n sid.manning@oss.qualcomm.com, marco.liebel@oss.qualcomm.com,\n richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng,\n ltaylorsimpson@gmail.com",
        "Subject": "[PATCH 7/8] Hexagon (target/hexagon) Disassembly of invalid packets",
        "Date": "Wed, 11 Feb 2026 20:34:34 -0700",
        "Message-ID": "<20260212033435.3598-8-ltaylorsimpson@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260212033435.3598-1-ltaylorsimpson@gmail.com>",
        "References": "<20260212033435.3598-1-ltaylorsimpson@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::243;\n envelope-from=ltaylorsimpson@gmail.com; helo=mail-oi1-x243.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, FREEMAIL_FROM=0.001,\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": "We pass the Hexagon CPU version to disassemble_hexagon.  This allows\ndecode_packet to know if the opcodes are supported.\n\nFix the printing of invalid packets.\n\nCo-authored-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>\nCo-authored-by: Brian Cain <brian.cain@oss.qualcomm.com>\nSigned-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>\n---\n target/hexagon/cpu_bits.h |  4 +++-\n disas/hexagon.c           |  3 ++-\n target/hexagon/cpu.c      |  3 +++\n target/hexagon/decode.c   | 20 +++++++++++++++++---\n 4 files changed, 25 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/target/hexagon/cpu_bits.h b/target/hexagon/cpu_bits.h\nindex ff596e2a94..ba580df3c1 100644\n--- a/target/hexagon/cpu_bits.h\n+++ b/target/hexagon/cpu_bits.h\n@@ -19,6 +19,7 @@\n #define HEXAGON_CPU_BITS_H\n \n #include \"qemu/bitops.h\"\n+#include \"cpu-qom.h\"\n \n #define PCALIGN 4\n #define PCALIGN_MASK (PCALIGN - 1)\n@@ -64,6 +65,7 @@ static inline bool is_packet_end(uint32_t endocing)\n     return ((bits == 0x3) || (bits == 0x0));\n }\n \n-int disassemble_hexagon(uint32_t *words, int nwords, bfd_vma pc, GString *buf);\n+int disassemble_hexagon(uint32_t *words, int nwords, bfd_vma pc, GString *buf,\n+                        HexagonVersion hex_version);\n \n #endif\ndiff --git a/disas/hexagon.c b/disas/hexagon.c\nindex c1a4ffc5f6..9a18f12854 100644\n--- a/disas/hexagon.c\n+++ b/disas/hexagon.c\n@@ -31,6 +31,7 @@\n \n int print_insn_hexagon(bfd_vma memaddr, struct disassemble_info *info)\n {\n+    HexagonVersion hex_version = (HexagonVersion)info->target_info;\n     uint32_t words[PACKET_WORDS_MAX];\n     bool found_end = false;\n     GString *buf;\n@@ -58,7 +59,7 @@ int print_insn_hexagon(bfd_vma memaddr, struct disassemble_info *info)\n     }\n \n     buf = g_string_sized_new(PACKET_BUFFER_LEN);\n-    len = disassemble_hexagon(words, i, memaddr, buf);\n+    len = disassemble_hexagon(words, i, memaddr, buf, hex_version);\n     (*info->fprintf_func)(info->stream, \"%s\", buf->str);\n     g_string_free(buf, true);\n \ndiff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c\nindex 09a0de3c2f..4b16214ace 100644\n--- a/target/hexagon/cpu.c\n+++ b/target/hexagon/cpu.c\n@@ -314,8 +314,11 @@ static void hexagon_cpu_reset_hold(Object *obj, ResetType type)\n static void hexagon_cpu_disas_set_info(const CPUState *cs,\n                                        disassemble_info *info)\n {\n+    CPUState *cs_nonconst = (CPUState *)cs;  /* so we can get hex_cpu */\n+    HexagonCPU *hex_cpu = env_archcpu(cpu_env(cs_nonconst));\n     info->print_insn = print_insn_hexagon;\n     info->endian = BFD_ENDIAN_LITTLE;\n+    info->target_info = (void *)HEXAGON_CPU_GET_CLASS(hex_cpu)->hex_version;\n }\n \n static void hexagon_cpu_realize(DeviceState *dev, Error **errp)\ndiff --git a/target/hexagon/decode.c b/target/hexagon/decode.c\nindex 0cff15e890..bfc769be62 100644\n--- a/target/hexagon/decode.c\n+++ b/target/hexagon/decode.c\n@@ -768,19 +768,33 @@ int decode_packet(DisasContext *ctx, int max_words, const uint32_t *words,\n \n /* Used for \"-d in_asm\" logging */\n int disassemble_hexagon(uint32_t *words, int nwords, bfd_vma pc,\n-                        GString *buf)\n+                        GString *buf, HexagonVersion hex_version)\n {\n     DisasContext ctx;\n     Packet pkt;\n \n     memset(&ctx, 0, sizeof(DisasContext));\n+    ctx.hex_version = hex_version;\n     ctx.pkt = &pkt;\n \n     if (decode_packet(&ctx, nwords, words, &pkt, true) > 0) {\n         snprint_a_pkt_disas(buf, &pkt, words, pc);\n         return pkt.encod_pkt_size_in_bytes;\n     } else {\n-        g_string_assign(buf, \"<invalid>\");\n-        return 0;\n+        for (int i = 0; i < nwords; i++) {\n+            g_string_append_printf(buf, \"0x\" TARGET_FMT_lx \"\\t\", words[i]);\n+            if (i == 0) {\n+                g_string_append(buf, \"{\");\n+            }\n+            g_string_append(buf, \"\\t\");\n+            g_string_append(buf, \"<invalid>\");\n+            if (i < nwords - 1) {\n+                pc += 4;\n+                g_string_append_printf(buf, \"\\n0x\" TARGET_FMT_lx \": \",\n+                                       (target_ulong)pc);\n+            }\n+        }\n+        g_string_append(buf, \" }\");\n+        return nwords * sizeof(uint32_t);\n     }\n }\n",
    "prefixes": [
        "7/8"
    ]
}