get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196923,
    "url": "http://patchwork.ozlabs.org/api/patches/2196923/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260216145219.1959-2-alireza.sanaee@huawei.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": "<20260216145219.1959-2-alireza.sanaee@huawei.com>",
    "list_archive_url": null,
    "date": "2026-02-16T14:52:17",
    "name": "[v3,1/2] hw/cxl: Use HPA in cxl_cfmws_find_device() rather than offset in window.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "eb06cf26f6bfe0f384c1adaa988449ada9cc02b4",
    "submitter": {
        "id": 90159,
        "url": "http://patchwork.ozlabs.org/api/people/90159/?format=api",
        "name": "Alireza Sanaee",
        "email": "alireza.sanaee@huawei.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260216145219.1959-2-alireza.sanaee@huawei.com/mbox/",
    "series": [
        {
            "id": 492317,
            "url": "http://patchwork.ozlabs.org/api/series/492317/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492317",
            "date": "2026-02-16T14:52:17",
            "name": "Performant CXL type 3 non-interleaved regions",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492317/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196923/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196923/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 4fF5Pn41xsz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 01:53:49 +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 1vrzyL-0006jC-Au; Mon, 16 Feb 2026 09:53:13 -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 <alireza.sanaee@huawei.com>)\n id 1vrzyJ-0006iU-57\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 09:53:11 -0500",
            "from frasgout.his.huawei.com ([185.176.79.56])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alireza.sanaee@huawei.com>)\n id 1vrzyG-0004s4-4a\n for qemu-devel@nongnu.org; Mon, 16 Feb 2026 09:53:10 -0500",
            "from mail.maildlp.com (unknown [172.18.224.83])\n by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4fF5Nb39cjzJ468n;\n Mon, 16 Feb 2026 22:52:47 +0800 (CST)",
            "from dubpeml500005.china.huawei.com (unknown [7.214.145.207])\n by mail.maildlp.com (Postfix) with ESMTPS id 0E3EB40572;\n Mon, 16 Feb 2026 22:52:56 +0800 (CST)",
            "from a2303103017.china.huawei.com (10.47.67.55) by\n dubpeml500005.china.huawei.com (7.214.145.207) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.11; Mon, 16 Feb 2026 14:52:55 +0000"
        ],
        "To": "<qemu-devel@nongnu.org>, <lizhijian@fujitsu.com>",
        "CC": "<anisa.su887@gmail.com>, <armbru@redhat.com>, <david@kernel.org>,\n <gourry@gourry.net>, <imammedo@redhat.com>, <jonathan.cameron@huawei.com>,\n <linuxarm@huawei.com>, <mst@redhat.com>, <nifan.cxl@gmail.com>,\n <peterx@redhat.com>, <philmd@linaro.org>, <ppbonzini@redhat.com>,\n <venkataravis@micron.com>, <xiaoguangrong.eric@gmail.com>",
        "Subject": "[PATCH v3 1/2] hw/cxl: Use HPA in cxl_cfmws_find_device() rather than\n offset in window.",
        "Date": "Mon, 16 Feb 2026 14:52:17 +0000",
        "Message-ID": "<20260216145219.1959-2-alireza.sanaee@huawei.com>",
        "X-Mailer": "git-send-email 2.51.0.windows.2",
        "In-Reply-To": "<20260216145219.1959-1-alireza.sanaee@huawei.com>",
        "References": "<20260216145219.1959-1-alireza.sanaee@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.47.67.55]",
        "X-ClientProxiedBy": "lhrpeml100009.china.huawei.com (7.191.174.83) To\n dubpeml500005.china.huawei.com (7.214.145.207)",
        "Received-SPF": "pass client-ip=185.176.79.56;\n envelope-from=alireza.sanaee@huawei.com; helo=frasgout.his.huawei.com",
        "X-Spam_score_int": "-41",
        "X-Spam_score": "-4.2",
        "X-Spam_bar": "----",
        "X-Spam_report": "(-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_NONE=0.001, 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>",
        "Reply-to": "Alireza Sanaee <alireza.sanaee@huawei.com>",
        "From": "Alireza Sanaee via qemu development <qemu-devel@nongnu.org>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "This function will shortly be used to help find if there is a route to a\ndevice, serving an HPA, under a particular fixed memory window. Rather\nthan having that new use case subtract the base address in the caller,\nonly to add it again in cxl_cfmws_find_device(), push the responsibility\nfor calculating the HPA to the caller.\n\nThis also reduces the inconsistency in the meaning of the hwaddr\naddr parameter between this function and the calls made within it\nthat access the HDM decoders that operating on HPA.\n\nSigned-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>\nTested-by: Gregory Price <gourry@gourry.net>\n---\n hw/cxl/cxl-host.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c\nindex f3479b1991..415a792380 100644\n--- a/hw/cxl/cxl-host.c\n+++ b/hw/cxl/cxl-host.c\n@@ -157,7 +157,8 @@ static bool cxl_hdm_find_target(uint32_t *cache_mem, hwaddr addr,\n     return found;\n }\n \n-static PCIDevice *cxl_cfmws_find_device(CXLFixedWindow *fw, hwaddr addr)\n+static PCIDevice *cxl_cfmws_find_device(CXLFixedWindow *fw, hwaddr addr,\n+                                        bool allow_interleave)\n {\n     CXLComponentState *hb_cstate, *usp_cstate;\n     PCIHostState *hb;\n@@ -168,8 +169,6 @@ static PCIDevice *cxl_cfmws_find_device(CXLFixedWindow *fw, hwaddr addr)\n     bool target_found;\n     PCIDevice *rp, *d;\n \n-    /* Address is relative to memory region. Convert to HPA */\n-    addr += fw->base;\n \n     rb_index = (addr / cxl_decode_ig(fw->enc_int_gran)) % fw->num_targets;\n     hb = PCI_HOST_BRIDGE(fw->target_hbs[rb_index]->cxl_host_bridge);\n@@ -254,7 +253,7 @@ static MemTxResult cxl_read_cfmws(void *opaque, hwaddr addr, uint64_t *data,\n     CXLFixedWindow *fw = opaque;\n     PCIDevice *d;\n \n-    d = cxl_cfmws_find_device(fw, addr);\n+    d = cxl_cfmws_find_device(fw, addr + fw->base, true);\n     if (d == NULL) {\n         *data = 0;\n         /* Reads to invalid address return poison */\n@@ -271,7 +270,7 @@ static MemTxResult cxl_write_cfmws(void *opaque, hwaddr addr,\n     CXLFixedWindow *fw = opaque;\n     PCIDevice *d;\n \n-    d = cxl_cfmws_find_device(fw, addr);\n+    d = cxl_cfmws_find_device(fw, addr + fw->base, true);\n     if (d == NULL) {\n         /* Writes to invalid address are silent */\n         return MEMTX_OK;\n",
    "prefixes": [
        "v3",
        "1/2"
    ]
}