get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2197728,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197728/?format=api",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.0/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": ""
    },
    "msgid": "<20260218114233.266178-5-anisinha@redhat.com>",
    "date": "2026-02-18T11:41:57",
    "name": "[v5,04/34] system/physmem: add helper to reattach existing memory after KVM VM fd change",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9aeb1509bc3ef147ec4d000dc8fcc1791abd343b",
    "submitter": {
        "id": 86030,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/86030/?format=api",
        "name": "Ani Sinha",
        "email": "anisinha@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218114233.266178-5-anisinha@redhat.com/mbox/",
    "series": [
        {
            "id": 492541,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/492541/?format=api",
            "date": "2026-02-18T11:41:56",
            "name": "Introduce support for confidential guest reset (x86)",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/492541/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2197728/checks/",
    "tags": {},
    "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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=V8jLMq64;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=r/Dnfs5E;\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 4fGF825FnSz1xwr\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 22:45:54 +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 1vsfxg-0003Dy-VC; Wed, 18 Feb 2026 06:43:22 -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 <anisinha@redhat.com>)\n id 1vsfxa-00038I-54\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:15 -0500",
            "from us-smtp-delivery-124.mimecast.com ([170.10.133.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <anisinha@redhat.com>)\n id 1vsfxT-0007nk-1b\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:10 -0500",
            "from mail-pl1-f199.google.com (mail-pl1-f199.google.com\n [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-474--wgtqLMMNiCf2Y50H7wgXw-1; Wed, 18 Feb 2026 06:43:00 -0500",
            "by mail-pl1-f199.google.com with SMTP id\n d9443c01a7336-2aaf0dbd073so66397675ad.3\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 03:42:59 -0800 (PST)",
            "from rhel9-box.lan ([117.99.83.54])\n by smtp.googlemail.com with ESMTPSA id\n d9443c01a7336-2ad1aaeab38sm127803425ad.82.2026.02.18.03.42.55\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 03:42:58 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771414981;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=V8jLMq648UpzUNWWvdbtd+80c5GVNDPE6enDhV02k1cJsNJcpVlow4veB4f1BVqfWNWg8R\n PKRGe7IT0K8wtlcpx8Qm5tYkjy+GitGQKRf68lHD4oa0OjyySCxQu6eAxDQkuS6ZG/CdUY\n NtLCKblipWrN5yrzz9mrFwKkHb01Yx0=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771414979; x=1772019779; 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=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=r/Dnfs5EfEjH2ddnocklwwYXa4X0KpZSBFwLhSI9OflgHvqrf/iZlczyW0IxTonCIx\n yy/WPauuvKYog+Yeub3SP1mm7Bzq37Ry9GWBi/sV2S+eC/DWi37+ICioQT6Z3NyST6Jt\n HOWvsTA3MNjdFlwfVxtLZgAHD9uWMZxCj2pOhfoVgvqcXUJbkeSTbSnyudoQeN8rNYu4\n nSzh234mmDWTO463GMtERQVcdo3W3a+nG3q4gf2b9rpzWSQT/2YcctjV+G1SV13cgjlK\n JufSbJKjZrV5OVoQjzPQtfpDophuqtJ6P2bbi3gltuC4iPoIf7F+ziTuMSaO11G/eqly\n 94LQ=="
        ],
        "X-MC-Unique": "-wgtqLMMNiCf2Y50H7wgXw-1",
        "X-Mimecast-MFC-AGG-ID": "-wgtqLMMNiCf2Y50H7wgXw_1771414979",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771414979; x=1772019779;\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=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=mGVOPkXcbTGdJMtrVIf/0XDUDcuAmF38XWDc1eAl3rGqRtSUe3s+FfyI7b//1r0dt4\n ZeI+eCstlKaGI8wGtYDhHCn9u967TNak9t84j1UaCyETZzHYEHz/0Kmzzkql1XiOZ7fV\n 2CRXspqpV3GBAmLNXWUte2OxnFHXHBrTbs8EDc4ZJUA9fw8Ub+cW/KDtGHGxl6jIaHhd\n ySPTj2B79hJZo9u3qPHexyvWsWNzUbnaO8minhYZBeXQ/h46Pa01oEsLUUmghOxYNGaN\n GTyUHek80NA/t4QFoi2AWbEzoaiBQ7TaU1jNAyO26ZQelD0hjzTJMb/eDAlFRsPs5gYM\n 7/hg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCUegrNe0oEInUleDtIZ/QkALB1jmlS7jbIzsfQU/dlZ0yqnGjbKRkwxb4fGcm6GQzzsPKOkGFPRlP2s@nongnu.org",
        "X-Gm-Message-State": "AOJu0Yz+65GIjwrjw/u9EASXUCXgH+Za92JGe3bdVb8IKuFjjMKsfy7h\n s2hL0r8BK/bsjz/7hOSyDKNCxRqpdiBZYv3jnObq/8y0QER1ypT66RQHrw54fAFcGJ47Tn5uLSv\n Dmfpcm45iE/Q4bVf/DsmD3GtSm9GwJSDYQgxhSp+0qo60q3JqSr6lCp1O5BwDY37G",
        "X-Gm-Gg": "AZuq6aJ5mqFJa1v/Dz+bqXMYIlKgH77ya+Pu+AHybRnHehKOG7vd+5Xg5iu5RdZjrb6\n 7aiF8oID8iXtdHDbDVE5YoqYDKYOQFqzhqgN/Q09mKzXg4vwvTBLAkD8TEWYxkMSLWy+g8R9W/A\n UhtcvX6nm9qe1s1jR+E5OKJ2Ml3LUJJD95I1Xd9/btQ6tFKPo/u62U+1kq/mlA6JHPebHMWIpAK\n zDn2qhFMPFO8hPY+tiQY5gHzpitq1jKjMKm6sjMYaKfxIyH8v5kjjDO5X4Xb7riK0+7EtKHzKw/\n N/AF5YwPv0RaPJCRSugHI35rlbt8pK2i0g//JLezr6VF5h6ZqVPrRdSrNyIbTkTR6hRsrZvE3O2\n Ze9liFotKBBw6lWNCks877+icVxJxFL+FHWV7y95cF5sUq/bxTmGs",
        "X-Received": [
            "by 2002:a17:903:2452:b0:2a1:3ee7:cc75 with SMTP id\n d9443c01a7336-2ab50560babmr177003755ad.19.1771414978764;\n Wed, 18 Feb 2026 03:42:58 -0800 (PST)",
            "by 2002:a17:903:2452:b0:2a1:3ee7:cc75 with SMTP id\n d9443c01a7336-2ab50560babmr177003585ad.19.1771414978405;\n Wed, 18 Feb 2026 03:42:58 -0800 (PST)"
        ],
        "From": "Ani Sinha <anisinha@redhat.com>",
        "To": "Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "Cc": "Ani Sinha <anisinha@redhat.com>, kraxel@redhat.com, qemu-devel@nongnu.org",
        "Subject": "[PATCH v5 04/34] system/physmem: add helper to reattach existing\n memory after KVM VM fd change",
        "Date": "Wed, 18 Feb 2026 17:11:57 +0530",
        "Message-ID": "<20260218114233.266178-5-anisinha@redhat.com>",
        "X-Mailer": "git-send-email 2.42.0",
        "In-Reply-To": "<20260218114233.266178-1-anisinha@redhat.com>",
        "References": "<20260218114233.266178-1-anisinha@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.133.124;\n envelope-from=anisinha@redhat.com;\n helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.043,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=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_PASS=-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>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "After the guest KVM file descriptor has changed as a part of the process of\nconfidential guest reset mechanism, existing memory needs to be reattached to\nthe new file descriptor. This change adds a helper function ram_block_rebind()\nfor this purpose. The next patch will make use of this function.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n include/system/physmem.h |  1 +\n system/physmem.c         | 28 ++++++++++++++++++++++++++++\n 2 files changed, 29 insertions(+)",
    "diff": "diff --git a/include/system/physmem.h b/include/system/physmem.h\nindex 7bb7d3e154..da91b77bd9 100644\n--- a/include/system/physmem.h\n+++ b/include/system/physmem.h\n@@ -51,5 +51,6 @@ physical_memory_snapshot_and_clear_dirty(MemoryRegion *mr, hwaddr offset,\n bool physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap,\n                                         ram_addr_t start,\n                                         ram_addr_t length);\n+int ram_block_rebind(Error **errp);\n \n #endif\ndiff --git a/system/physmem.c b/system/physmem.c\nindex 2fb0c25c93..e5ff26acec 100644\n--- a/system/physmem.c\n+++ b/system/physmem.c\n@@ -2826,6 +2826,34 @@ found:\n     return block;\n }\n \n+/*\n+ * Creates new guest memfd for the ramblocks and closes the\n+ * existing memfd.\n+ */\n+int ram_block_rebind(Error **errp)\n+{\n+    RAMBlock *block;\n+\n+    qemu_mutex_lock_ramlist();\n+\n+    RAMBLOCK_FOREACH(block) {\n+        if (block->flags & RAM_GUEST_MEMFD) {\n+            if (block->guest_memfd >= 0) {\n+                close(block->guest_memfd);\n+            }\n+            block->guest_memfd = kvm_create_guest_memfd(block->max_length,\n+                                                        0, errp);\n+            if (block->guest_memfd < 0) {\n+                qemu_mutex_unlock_ramlist();\n+                return -1;\n+            }\n+\n+        }\n+    }\n+    qemu_mutex_unlock_ramlist();\n+    return 0;\n+}\n+\n /*\n  * Finds the named RAMBlock\n  *\n",
    "prefixes": [
        "v5",
        "04/34"
    ]
}