get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216126,
    "url": "http://patchwork.ozlabs.org/api/patches/2216126/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260325211728.89204-7-philmd@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": "<20260325211728.89204-7-philmd@linaro.org>",
    "list_archive_url": null,
    "date": "2026-03-25T21:17:24",
    "name": "[PATCH-for-11.1,06/10] target/mips: Inline qemu_get/put_betls()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2048955759321f2b64527af032703a1b3173a04c",
    "submitter": {
        "id": 85046,
        "url": "http://patchwork.ozlabs.org/api/people/85046/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "philmd@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260325211728.89204-7-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 497512,
            "url": "http://patchwork.ozlabs.org/api/series/497512/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=497512",
            "date": "2026-03-25T21:17:19",
            "name": "migration: Reduce uses of target-specific macros",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497512/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216126/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216126/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=gpn/yO3x;\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 4fh0DK6rKhz1yGJ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 08:20:01 +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 1w5VcZ-0001PC-Cx; Wed, 25 Mar 2026 17:18:35 -0400",
            "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 <philmd@linaro.org>) id 1w5VcN-0001JZ-PJ\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:18:26 -0400",
            "from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1w5VcF-0001Zy-J2\n for qemu-devel@nongnu.org; Wed, 25 Mar 2026 17:18:17 -0400",
            "by mail-wm1-x32f.google.com with SMTP id\n 5b1f17b1804b1-486b9675d36so2787425e9.0\n for <qemu-devel@nongnu.org>; Wed, 25 Mar 2026 14:18:15 -0700 (PDT)",
            "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48711709b48sm150514935e9.7.2026.03.25.14.18.12\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Wed, 25 Mar 2026 14:18:13 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774473494; x=1775078294; 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=fAfGwk5iQFxUtFp9tEuDqdstwJOUxCbrpEqefh8vUSI=;\n b=gpn/yO3x0nuCMVjW/94IJ/ZafvhAOpPV19SRnZd11NUzAsaTd0exC8SoGhbdCzyGM/\n IFG+iPWQLAYZvnm1ZOeLQRggalrdUUAtsOJVA7xWuhHVUP6uX8/niBQzhF4Bn779cRAr\n 5ETrs1aFQCsIREDqy2OVRfwTVidVn7dthXTkMqlKCES/Zw9I7pvRg2Oq5DDwfRJy0TI+\n pdELB5AFfS5Tp/72BYkQPVrESKKzQyw/inRCZ5K8mTczO8DrlHsArNMb3pAyjCOIKb8U\n 2tp9nvX511eZxFy0jLnY9oTvX3zvcx9xL3BOsDLTVpq9fqvnkwCV2kBo10NkEl1TwC/k\n jfLA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774473494; x=1775078294;\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=fAfGwk5iQFxUtFp9tEuDqdstwJOUxCbr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u0/0RUMYcczuh6LCxVwW2sm",
        "X-Received": "by 2002:a05:600c:c086:b0:485:2fc5:3a5 with SMTP id\n 5b1f17b1804b1-48716056385mr53086605e9.26.1774473493770;\n Wed, 25 Mar 2026 14:18:13 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Glenn Miles <milesg@linux.ibm.com>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Nicholas Piggin <npiggin@gmail.com>, qemu-ppc@nongnu.org,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Fabiano Rosas <farosas@suse.de>, Alistair Francis <alistair.francis@wdc.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, qemu-riscv@nongnu.org,\n Paolo Bonzini <pbonzini@redhat.com>, Artyom Tarasenko <atar4qemu@gmail.com>,\n Anton Johansson <anjo@rev.ng>, Peter Xu <peterx@redhat.com>, =?utf-8?q?Phil?=\n\t=?utf-8?q?ippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Huacai Chen <chenhuacai@kernel.org>, Aurelien Jarno <aurelien@aurel32.net>,\n Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <arikalo@gmail.com>",
        "Subject": "[PATCH-for-11.1 06/10] target/mips: Inline qemu_get/put_betls()",
        "Date": "Wed, 25 Mar 2026 22:17:24 +0100",
        "Message-ID": "<20260325211728.89204-7-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260325211728.89204-1-philmd@linaro.org>",
        "References": "<20260325211728.89204-1-philmd@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::32f;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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": "Use TargetInfo target_long_bits() helper at runtime to migrate\nthe VPN register as 32 or 64-bits.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\n---\n include/migration/cpu.h      |  6 ------\n target/mips/system/machine.c | 14 ++++++++++++--\n 2 files changed, 12 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/include/migration/cpu.h b/include/migration/cpu.h\nindex 87ca977a3fd..82a81b5d895 100644\n--- a/include/migration/cpu.h\n+++ b/include/migration/cpu.h\n@@ -8,9 +8,6 @@\n #include \"migration/vmstate.h\"\n \n #if TARGET_LONG_BITS == 64\n-#define qemu_put_betls qemu_put_be64s\n-#define qemu_get_betls qemu_get_be64s\n-\n #define VMSTATE_UINTTL_V(_f, _s, _v)                                  \\\n     VMSTATE_UINT64_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \\\n@@ -19,9 +16,6 @@\n     VMSTATE_UINT64_SUB_ARRAY(_f, _s, _start, _num)\n #define vmstate_info_uinttl vmstate_info_uint64\n #else\n-#define qemu_put_betls qemu_put_be32s\n-#define qemu_get_betls qemu_get_be32s\n-\n #define VMSTATE_UINTTL_V(_f, _s, _v)                                  \\\n     VMSTATE_UINT32_V(_f, _s, _v)\n #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \\\ndiff --git a/target/mips/system/machine.c b/target/mips/system/machine.c\nindex 8af11fd896b..20de322385b 100644\n--- a/target/mips/system/machine.c\n+++ b/target/mips/system/machine.c\n@@ -1,7 +1,9 @@\n #include \"qemu/osdep.h\"\n+#include \"qemu/target-info.h\"\n #include \"cpu.h\"\n #include \"internal.h\"\n #include \"migration/cpu.h\"\n+#include \"migration/qemu-file-types.h\"\n #include \"fpu_helper.h\"\n \n static int cpu_post_load(void *opaque, int version_id)\n@@ -139,7 +141,11 @@ static int get_tlb(QEMUFile *f, void *pv, size_t size,\n     r4k_tlb_t *v = pv;\n     uint16_t flags;\n \n-    qemu_get_betls(f, &v->VPN);\n+    if (target_long_bits() == 64) {\n+        v->VPN = qemu_get_be64(f);\n+    } else {\n+        v->VPN = qemu_get_be32(f);\n+    }\n     qemu_get_be32s(f, &v->PageMask);\n     qemu_get_be16s(f, &v->ASID);\n     qemu_get_be32s(f, &v->MMID);\n@@ -182,7 +188,11 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size,\n                       (v->D0 << 1) |\n                       (v->D1 << 0));\n \n-    qemu_put_betls(f, &v->VPN);\n+    if (target_long_bits() == 64) {\n+        qemu_put_be64(f, v->VPN);\n+    } else {\n+        qemu_put_be32(f, v->VPN);\n+    }\n     qemu_put_be32s(f, &v->PageMask);\n     qemu_put_be16s(f, &asid);\n     qemu_put_be32s(f, &mmid);\n",
    "prefixes": [
        "PATCH-for-11.1",
        "06/10"
    ]
}