get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224660,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2224660/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417173105.1648172-11-peter.maydell@linaro.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260417173105.1648172-11-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2026-04-17T17:30:58",
    "name": "[10/17] hw/core: Update docs for get_phys_addr_{attrs_,}debug",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8d0826d1a6c7fff8679a278254550cefd5ab912d",
    "submitter": {
        "id": 5111,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/5111/?format=api",
        "name": "Peter Maydell",
        "email": "peter.maydell@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260417173105.1648172-11-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 500380,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500380/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500380",
            "date": "2026-04-17T17:30:51",
            "name": "Handle sub-page granularity in cpu_memory_rw_debug()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/500380/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224660/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224660/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=EkhlXqQx;\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 4fy29c0m99z1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 03:36:20 +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 1wDn35-0007Mc-9j; Fri, 17 Apr 2026 13:32:11 -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 <peter.maydell@linaro.org>)\n id 1wDn2X-0006pY-Ff\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 13:31:42 -0400",
            "from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1wDn2R-00028A-C6\n for qemu-devel@nongnu.org; Fri, 17 Apr 2026 13:31:36 -0400",
            "by mail-wr1-x42d.google.com with SMTP id\n ffacd0b85a97d-43d7e23defbso624540f8f.0\n for <qemu-devel@nongnu.org>; Fri, 17 Apr 2026 10:31:30 -0700 (PDT)",
            "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43fe4e4ffa8sm5819650f8f.35.2026.04.17.10.31.27\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 10:31:28 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776447089; x=1777051889; 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=oFWrqlCi1brlfW31yiVLg0YS3L4+kwC499WIseYpmfU=;\n b=EkhlXqQxl91BNjaPFUB/EqPS9Z+Mxu12h/ijCLv8uf545cW6KH4FpNgfNaR+3e6BS8\n n2VO5PaSdwAHTN8J8FU5TonrFUH/yp3gPRPplxcL7wM1LMUAYse3zlKK77jrSoMBhv6w\n Zp3vSifIWerB7Lw/MGLudoAc8KKmDsfHlzs6lprFO/O+y5hTrDkXMTScxXzh4EQ4/v2l\n cUbqAsfxYYj3eALiGi9HdCcV+VIis10Uz4f38uXxpfviVx8VraqsIp598KlMSiAZ1uiM\n v89DDhmUBPqBOSORuHdNf7iWf3Dbu4tbXCbb2upzPj0IOeNOqBFxWigyFNZ9poOBtsDu\n ahVw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776447089; x=1777051889;\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=oFWrqlCi1brlfW31yiVLg0YS3L4+kwC499WIseYpmfU=;\n b=G0/Dt9wn3tAMA+YzkwWaeL/Dh6wD88cQ280eCk5VZBgPoKRunvfbEMcd7okVwdiSZY\n fZd4n8ZMOXVejjrOvY2XMFX4K59oAHIIbXlXBQQMcD32sBQ6MstEAGmTdOn5aFb3j6BU\n m9R3OZsXIWJ6JJ6+JI6fHyWN33XY9E4etmO6i4qsTb2GLJ7jo1AHR6Z9sTq6Fr1W05af\n yZazs8IAN1w9AhOcMTEs0toya+TOgnYIc3xdEc4wQXHliINz0Sx9ltawI7W2FQMa0rIR\n guDAcwwzKQhVMjjZJD4qbUJmEwhegQUiN3nax8ZcCoWeFWsgXgAPqpKYufln9hKE5cXq\n TT8A==",
        "X-Forwarded-Encrypted": "i=1;\n AFNElJ9g/i5G+51xEef06aNXYzNNF4XmaT/K1JteMBc0SlDDtn+ErKE5PfXJJra71UvE7WmZmXIjMcDEoeas@nongnu.org",
        "X-Gm-Message-State": "AOJu0YwaM7E4xY/DtqAXC/HkhBoQbBbp4McjBVO1hdKrXDuL20+1ffEL\n QrsHdlKHNkZNt8ryckDHMpiaiFpzUEGBP8WNVOEmjAPjK55dLZngG+kO0cV6QaBomRlPhBxqktY\n GPxx+ZRo=",
        "X-Gm-Gg": "AeBDievjmlb1FMvw7efKYbnuSARvMcra8gPDm95fUCKMBqxf41Bzc1qlTdhbSxJWe7S\n +MmAK19xSCJsRLvXR2lNEdjAMyBbEL9EZ3G7hvM2pql2oih84RbctgbXO/319tlb7XV+zP+0iWM\n j8FNTsTqVGNGoF69I7iQncNxEcChgxpBVUpAR9/eojJE5I+vLFIiENYAkflKC5MSex68EDZpw7r\n LDGRvvEbh9JJwSNv+zSSLvoZJGOm5sT3S3E8EX4TM0/G9oaJi+ZpRHJX1m9lIOmpOjD7oj1USil\n tdedRf0sGt3ot1p/Y16GXJLYb21jKeqFHMT9T9awytiSpkOOrfhJVwFz5KD7yxKRzxg5hg1xJw6\n 0vGZvPoy3IPAh6/8RvNUFC4ctaFygHx8hVN6/fR0n4WiVbQJ5+o+T1HN1vT8wksExiQjsw71Suc\n Seupsa4LspJQlYvsNSKMQ5wVOZ7FiMMLLa0jdgxqHdlKt95HXwSKf8ARYlsxsF3tG+ejzARPtZz\n 0VKtN2c+9KNM7BcSunBqtCMArLk/2Cwmn9sTpsNJg==",
        "X-Received": "by 2002:a05:6000:250f:b0:43d:68ad:3b7f with SMTP id\n ffacd0b85a97d-43fe3dd397dmr6094046f8f.21.1776447088991;\n Fri, 17 Apr 2026 10:31:28 -0700 (PDT)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-arm@nongnu.org,\n\tqemu-devel@nongnu.org",
        "Cc": "qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>,\n Paolo Bonzini <pbonzini@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>,\n Peter Xu <peterx@redhat.com>, \"Edgar E. Iglesias\" <edgar.iglesias@gmail.com>,\n Jiaxun Yang <jiaxun.yang@flygoat.com>, Nicholas Piggin <npiggin@gmail.com>,\n Chinmay Rath <rathc@linux.ibm.com>, Glenn Miles <milesg@linux.ibm.com>,\n Palmer Dabbelt <palmer@dabbelt.com>,\n Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>,\n Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,\n Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,\n Chao Liu <chao.liu.zevorn@gmail.com>, Ilya Leoshkevich <iii@linux.ibm.com>,\n David Hildenbrand <david@kernel.org>,\n Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n Artyom Tarasenko <atar4qemu@gmail.com>",
        "Subject": "[PATCH 10/17] hw/core: Update docs for get_phys_addr_{attrs_,}debug",
        "Date": "Fri, 17 Apr 2026 18:30:58 +0100",
        "Message-ID": "<20260417173105.1648172-11-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260417173105.1648172-1-peter.maydell@linaro.org>",
        "References": "<20260417173105.1648172-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::42d;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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": "Update the documentation for the get_phys_addr_{attrs_,}debug methods\nand wrapper functions to state that they can handle non-page aligned\naddresses and will return the corresponding exact physaddr for them.\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\n include/hw/core/cpu.h            | 16 +++++++++++-----\n include/hw/core/sysemu-cpu-ops.h |  4 ++++\n 2 files changed, 15 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h\nindex 6dedad535c..0941757c55 100644\n--- a/include/hw/core/cpu.h\n+++ b/include/hw/core/cpu.h\n@@ -746,15 +746,18 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags);\n \n /**\n  * cpu_get_phys_addr_attrs_debug:\n- * @cpu: The CPU to obtain the physical page address for.\n+ * @cpu: The CPU to use for the virtual-to-physical translation\n  * @addr: The virtual address.\n  * @attrs: Updated on return with the memory transaction attributes to use\n  *         for this access.\n  *\n- * Obtains the physical page corresponding to a virtual one, together\n+ * Obtains the physical address corresponding to a virtual one, together\n  * with the corresponding memory transaction attributes to use for the access.\n  * Use it only for debugging because no protection checks are done.\n  *\n+ * The address need not be page-aligned; the returned address will\n+ * be the physical address corresponding to that virtual address.\n+ *\n  * Returns: Corresponding physical page address or -1 if no page found.\n  */\n hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,\n@@ -762,13 +765,16 @@ hwaddr cpu_get_phys_addr_attrs_debug(CPUState *cpu, vaddr addr,\n \n /**\n  * cpu_get_phys_addr_debug:\n- * @cpu: The CPU to obtain the physical page address for.\n+ * @cpu: The CPU to use for the virtual-to-physical translation\n  * @addr: The virtual address.\n  *\n- * Obtains the physical page corresponding to a virtual one.\n+ * Obtains the physical address corresponding to a virtual one.\n  * Use it only for debugging because no protection checks are done.\n  *\n- * Returns: Corresponding physical page address or -1 if no page found.\n+ * The address need not be page-aligned; the returned address will\n+ * be the physical address corresponding to that virtual address.\n+ *\n+ * Returns: Corresponding physical address, or -1 if no page found.\n  */\n hwaddr cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);\n \ndiff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h\nindex a4fc330bea..a87c55d922 100644\n--- a/include/hw/core/sysemu-cpu-ops.h\n+++ b/include/hw/core/sysemu-cpu-ops.h\n@@ -31,6 +31,8 @@ typedef struct SysemuCPUOps {\n     bool (*get_paging_enabled)(const CPUState *cpu);\n     /**\n      * @get_phys_addr_debug: Callback for obtaining a physical address.\n+     * This must be able to handle a non-page-aligned address, and will\n+     * return the physical address corresponding to that address.\n      */\n     hwaddr (*get_phys_addr_debug)(CPUState *cpu, vaddr addr);\n     /**\n@@ -39,6 +41,8 @@ typedef struct SysemuCPUOps {\n      *       access.\n      * CPUs which use memory transaction attributes should implement this\n      * instead of get_phys_addr_debug.\n+     * This must be able to handle a non-page-aligned address, and will\n+     * return the physical address corresponding to that address.\n      */\n     hwaddr (*get_phys_addr_attrs_debug)(CPUState *cpu, vaddr addr,\n                                         MemTxAttrs *attrs);\n",
    "prefixes": [
        "10/17"
    ]
}