get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1825231,
    "url": "http://patchwork.ozlabs.org/api/patches/1825231/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20230824092409.1492470-29-gaosong@loongson.cn/",
    "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": "<20230824092409.1492470-29-gaosong@loongson.cn>",
    "list_archive_url": null,
    "date": "2023-08-24T09:24:06",
    "name": "[PULL,28/31] target/loongarch: cpu: Implement get_arch_id callback",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2e0e2fef40cc671afea0411ccc2e977733f5a936",
    "submitter": {
        "id": 82024,
        "url": "http://patchwork.ozlabs.org/api/people/82024/?format=api",
        "name": "gaosong",
        "email": "gaosong@loongson.cn"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20230824092409.1492470-29-gaosong@loongson.cn/mbox/",
    "series": [
        {
            "id": 370173,
            "url": "http://patchwork.ozlabs.org/api/series/370173/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=370173",
            "date": "2023-08-24T09:23:41",
            "name": "[PULL,01/31] target/loongarch: Log I/O write accesses to CSR registers",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/370173/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1825231/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1825231/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 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 4RWd7j0g8Mz1yfF\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 24 Aug 2023 19:29:05 +1000 (AEST)",
            "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 1qZ6bi-0003c5-CG; Thu, 24 Aug 2023 05:26:27 -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 <gaosong@loongson.cn>)\n id 1qZ6bT-0003Ex-Ak\n for qemu-devel@nongnu.org; Thu, 24 Aug 2023 05:26:11 -0400",
            "from mail.loongson.cn ([114.242.206.163])\n by eggs.gnu.org with esmtp (Exim 4.90_1)\n (envelope-from <gaosong@loongson.cn>) id 1qZ6bO-0004D8-HB\n for qemu-devel@nongnu.org; Thu, 24 Aug 2023 05:26:10 -0400",
            "from loongson.cn (unknown [10.2.5.185])\n by gateway (Coremail) with SMTP id _____8AxqOjIIedknHkbAA--.20140S3;\n Thu, 24 Aug 2023 17:24:24 +0800 (CST)",
            "from localhost.localdomain (unknown [10.2.5.185])\n by localhost.localdomain (Coremail) with SMTP id\n AQAAf8DxJ826IedkJjhiAA--.40637S30;\n Thu, 24 Aug 2023 17:24:24 +0800 (CST)"
        ],
        "From": "Song Gao <gaosong@loongson.cn>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "stefanha@redhat.com, richard.henderson@linaro.org,\n Bibo Mao <maobibo@loongson.cn>",
        "Subject": "[PULL 28/31] target/loongarch: cpu: Implement get_arch_id callback",
        "Date": "Thu, 24 Aug 2023 17:24:06 +0800",
        "Message-Id": "<20230824092409.1492470-29-gaosong@loongson.cn>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230824092409.1492470-1-gaosong@loongson.cn>",
        "References": "<20230824092409.1492470-1-gaosong@loongson.cn>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "AQAAf8DxJ826IedkJjhiAA--.40637S30",
        "X-CM-SenderInfo": "5jdr20tqj6z05rqj20fqof0/",
        "X-Coremail-Antispam": "1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7\n ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx\n nUUI43ZEXa7xR_UUUUUUUUU==",
        "Received-SPF": "pass client-ip=114.242.206.163;\n envelope-from=gaosong@loongson.cn;\n helo=mail.loongson.cn",
        "X-Spam_score_int": "-18",
        "X-Spam_score": "-1.9",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.9 / 5.0 requ) BAYES_00=-1.9, 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-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: Bibo Mao <maobibo@loongson.cn>\n\nImplement the callback for getting the architecture-dependent CPU\nID, the cpu ID is physical id described in ACPI MADT table, this\nwill be used for cpu hotplug.\n\nSigned-off-by: Bibo Mao <maobibo@loongson.cn>\nReviewed-by: Song Gao <gaosong@loongson.cn>\nMessage-Id: <20230824005007.2000525-1-maobibo@loongson.cn>\nSigned-off-by: Song Gao <gaosong@loongson.cn>\n---\n hw/loongarch/virt.c    | 2 ++\n target/loongarch/cpu.c | 8 ++++++++\n target/loongarch/cpu.h | 1 +\n 3 files changed, 11 insertions(+)",
    "diff": "diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c\nindex af15bf5aaa..2629128aed 100644\n--- a/hw/loongarch/virt.c\n+++ b/hw/loongarch/virt.c\n@@ -810,6 +810,8 @@ static void loongarch_init(MachineState *machine)\n         cpu = cpu_create(machine->cpu_type);\n         cpu->cpu_index = i;\n         machine->possible_cpus->cpus[i].cpu = OBJECT(cpu);\n+        lacpu = LOONGARCH_CPU(cpu);\n+        lacpu->phy_id = machine->possible_cpus->cpus[i].arch_id;\n     }\n     fdt_add_cpu_nodes(lams);\n \ndiff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c\nindex d3c3e0d8a1..27fc6e1f33 100644\n--- a/target/loongarch/cpu.c\n+++ b/target/loongarch/cpu.c\n@@ -722,6 +722,13 @@ static struct TCGCPUOps loongarch_tcg_ops = {\n static const struct SysemuCPUOps loongarch_sysemu_ops = {\n     .get_phys_page_debug = loongarch_cpu_get_phys_page_debug,\n };\n+\n+static int64_t loongarch_cpu_get_arch_id(CPUState *cs)\n+{\n+    LoongArchCPU *cpu = LOONGARCH_CPU(cs);\n+\n+    return cpu->phy_id;\n+}\n #endif\n \n static void loongarch_cpu_class_init(ObjectClass *c, void *data)\n@@ -742,6 +749,7 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data)\n     cc->set_pc = loongarch_cpu_set_pc;\n     cc->get_pc = loongarch_cpu_get_pc;\n #ifndef CONFIG_USER_ONLY\n+    cc->get_arch_id = loongarch_cpu_get_arch_id;\n     dc->vmsd = &vmstate_loongarch_cpu;\n     cc->sysemu_ops = &loongarch_sysemu_ops;\n #endif\ndiff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h\nindex 25a0ef7e41..4d7201995a 100644\n--- a/target/loongarch/cpu.h\n+++ b/target/loongarch/cpu.h\n@@ -376,6 +376,7 @@ struct ArchCPU {\n     CPUNegativeOffsetState neg;\n     CPULoongArchState env;\n     QEMUTimer timer;\n+    uint32_t  phy_id;\n \n     /* 'compatible' string for this CPU for Linux device trees */\n     const char *dtb_compatible;\n",
    "prefixes": [
        "PULL",
        "28/31"
    ]
}