get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2233211,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2233211/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505202640.1011006-11-peterx@redhat.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": "<20260505202640.1011006-11-peterx@redhat.com>",
    "date": "2026-05-05T20:26:27",
    "name": "[PULL,10/23] vfio/migration: Fix incorrect reporting for VFIO pending data",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "40586eafb38817f842cd0277b3ded3d12f308284",
    "submitter": {
        "id": 67717,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/67717/?format=api",
        "name": "Peter Xu",
        "email": "peterx@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505202640.1011006-11-peterx@redhat.com/mbox/",
    "series": [
        {
            "id": 502897,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502897/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502897",
            "date": "2026-05-05T20:26:17",
            "name": "[PULL,01/23] migration: Fix blocking in POSTCOPY_DEVICE during package load",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502897/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2233211/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2233211/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=cja1Ifg3;\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=QWcQMGlG;\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 4g997W2K8gz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 06:28:07 +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 1wKMMJ-0004Vb-9D; Tue, 05 May 2026 16:27:13 -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 <peterx@redhat.com>) id 1wKMMB-0004SZ-Li\n for qemu-devel@nongnu.org; Tue, 05 May 2026 16:27:03 -0400",
            "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 <peterx@redhat.com>) id 1wKMM7-0002cf-Gq\n for qemu-devel@nongnu.org; Tue, 05 May 2026 16:27:02 -0400",
            "from mail-qk1-f197.google.com (mail-qk1-f197.google.com\n [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-324-kf9f9osJONuADIKTkVENSQ-1; Tue, 05 May 2026 16:26:57 -0400",
            "by mail-qk1-f197.google.com with SMTP id\n af79cd13be357-902e1e4f8ccso340965185a.0\n for <qemu-devel@nongnu.org>; Tue, 05 May 2026 13:26:57 -0700 (PDT)",
            "from x1.com ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8b53c6b8123sm155283806d6.35.2026.05.05.13.26.55\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 13:26:55 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1778012818;\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=OGmcZTJdrvJChcgQdhUlKR40+p3UPXTZRXwTZoQgmPs=;\n b=cja1Ifg3KvzSIJwQHOyCLzNKTxvSdJjdnLrJsTqlLlGqbKgVeLc8+uUKBgJKKptsAZ2gYL\n nU9IErTzoJDOGfbu1w7t0dL5yHVLR24gTiDuD5m84T0u2WE/O1DVLVqPmpUNHsTlPRnIWQ\n OX+QVqsdLEAEAxTMI6pMcv36Cy+QEh4=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1778012817; x=1778617617; 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=OGmcZTJdrvJChcgQdhUlKR40+p3UPXTZRXwTZoQgmPs=;\n b=QWcQMGlGm9tTLfnVrlIQ8gUMgWOEgoF9k2RDTVoLzbyRVYyfiA2nuUp3TK6LJ5P5y7\n T9NUcZEi51Ybi/KWvU7j6yJ+e/UHNu8Su/Mj7dYjCVdupH+KERBQs6BPTmINs4x5GdK2\n iIOCNE8AGNJa7xsB0VsKk8gJ5SP/hWZrUZaAq/M/RLCReF8sZCIsG9aJJkWK/12ztesv\n NiUGaulHgPLhrwP2DhWoUuoPJxN+ezps8hpTDqmaCLkg3IqX4U0RTLuOjNNFPemTidZs\n 0dw3jJrzxXFaNX+cmPgZoaMgvA3ns6ghqkbarWXJyUBDgms6KJBNK05iZj/izq2qfnlt\n meWw=="
        ],
        "X-MC-Unique": "kf9f9osJONuADIKTkVENSQ-1",
        "X-Mimecast-MFC-AGG-ID": "kf9f9osJONuADIKTkVENSQ_1778012817",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778012817; x=1778617617;\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=OGmcZTJdrvJChcgQdhUlKR40+p3UPXTZRXwTZoQgmPs=;\n b=CHG9PheVBHN2DZccpP6xKWuXqCg4NyxChachDozhbPpY0Dfo0dLxM5DHojsQJ1aBza\n 82B3c0uyNgKzcn/dZ8SVSmmQCjeIEGPiI25dhUZkSo/tmD0Bdh9GvVWFr32oSzstafSR\n nemGWpbGB+6XrOOnZykoRpdi4qGDpBZivLWvMV4M47+OCFFJzR9JW8WFoA1ZeRbajiIg\n tREq31IZbOLXdu703G8mZ/k6nwEcrS/83y9n9+oPQLmphwqF3TEpw4BSU1wsq3KVpuoq\n fOL54aCnolagQGZNxEFB7ZbxHuWc+oLmSF8vWs3CRsguXOQcBdrEshI60qqmBvuBiibw\n xv+g==",
        "X-Gm-Message-State": "AOJu0Ywy010U7Yvvmew4i07fZ2PL07YUAztqK0+eCG/aExTf5sFu9TcD\n vmGsmxwiXjfY13c5xldsMFZu6qkkKPQMwJ+o62akW+GYchXqhxBy58JgC0W6V1Dn80TAZqROPRo\n xDxTZzGHedA0iWTuZhkuS+hHP1aOeKdFT8G4W7uJgF/YKZdU1sSLWrWkPPobdoFnDvicsa7p8yQ\n R3dy01XieGgpLuSlqFhIDznHU3Dvrh/AlR19UWSQ==",
        "X-Gm-Gg": "AeBDiesgzJKRsRYo8hizcr4Mlit9b6CMVRKCKJ7/DUy8mDXiNn7MZM22HBP0i8TdIVO\n nqzdRX5vh7OkHpSaP8Qm+DaTivdpLB+bC6iZXd6ZX9Gb9NDVV2zxX0O8nUIXHDlMzrqt5IgQhL6\n gJzqB6y+3XV/xRktxpccKq/v+i60+7oqMQZWHSyRSrseXCNu3mOYh2cYvdYTtg3n62YDuHzCx4R\n E9GAujudcXQshjEnMUyPudsGoW9qp69tkltI2tZmaE0FGB359Q4pfpqan+Q37zhhCcnRJl6LVIn\n jshcGQQwTFB0EQRpS5Wsf1XpkMuXkZZJ3McJyQtgefTwvjDoL4IRLEyL6VzAZMs0BSfLssJy6vq\n /8D9UGjXwcZYP1MACfnwMWCBj+Mdj2ApNs4zhydfmrgrCyw/CKdB7zBU=",
        "X-Received": [
            "by 2002:a05:620a:2544:b0:8e5:b6a5:8d0a with SMTP id\n af79cd13be357-904d74b318cmr90979685a.62.1778012816541;\n Tue, 05 May 2026 13:26:56 -0700 (PDT)",
            "by 2002:a05:620a:2544:b0:8e5:b6a5:8d0a with SMTP id\n af79cd13be357-904d74b318cmr90973285a.62.1778012815837;\n Tue, 05 May 2026 13:26:55 -0700 (PDT)"
        ],
        "From": "Peter Xu <peterx@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Fabiano Rosas <farosas@suse.de>, Paolo Bonzini <pbonzini@redhat.com>,\n Peter Xu <peterx@redhat.com>, Avihai Horon <avihaih@nvidia.com>",
        "Subject": "[PULL 10/23] vfio/migration: Fix incorrect reporting for VFIO pending\n data",
        "Date": "Tue,  5 May 2026 16:26:27 -0400",
        "Message-ID": "<20260505202640.1011006-11-peterx@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260505202640.1011006-1-peterx@redhat.com>",
        "References": "<20260505202640.1011006-1-peterx@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com",
        "X-Spam_score_int": "-24",
        "X-Spam_score": "-2.5",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443,\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 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": "VFIO reports different things in its fast/slow version of query pending\nresults.  It was because it wants to make sure precopy data can reach 0,\nwhich is needed to make sure sync queries will happen periodically over\ntime.\n\nNow with stopcopy size reporting facility it doesn't need this hack\nanymore.  Fix this by reporting the same values in fast/slow versions of\nquery pending request, except that the slow version will do a slow sync\nwith the hardwares.\n\nWhen at it, removing the special casing for vfio_device_state_is_precopy()\nwhich may reporting nothing in a fast query.  Then ther reporting will be\nconsistent to VFIO devices that do not support precopy phase.\n\nCopy stable might be too much; just skip it and skip the Fixes.\n\nReviewed-by: Avihai Horon <avihaih@nvidia.com>\nTested-by: Avihai Horon <avihaih@nvidia.com>\nLink: https://lore.kernel.org/r/20260421202110.306051-9-peterx@redhat.com\nSigned-off-by: Peter Xu <peterx@redhat.com>\n---\n hw/vfio/migration.c | 18 +++++++++++-------\n 1 file changed, 11 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c\nindex e965ba51fb..e6e6a0d53d 100644\n--- a/hw/vfio/migration.c\n+++ b/hw/vfio/migration.c\n@@ -587,19 +587,23 @@ static void vfio_state_pending(void *opaque, MigPendingData *pending,\n {\n     VFIODevice *vbasedev = opaque;\n     VFIOMigration *migration = vbasedev->migration;\n-    uint64_t remain;\n+    uint64_t precopy_size, stopcopy_size;\n \n     if (exact) {\n         vfio_state_pending_sync(vbasedev);\n-        remain = migration->stopcopy_size;\n+    }\n+\n+    precopy_size =\n+        migration->precopy_init_size + migration->precopy_dirty_size;\n+\n+    if (migration->stopcopy_size > precopy_size) {\n+        stopcopy_size = migration->stopcopy_size - precopy_size;\n     } else {\n-        if (!vfio_device_state_is_precopy(vbasedev)) {\n-            return;\n-        }\n-        remain = migration->precopy_init_size + migration->precopy_dirty_size;\n+        stopcopy_size = 0;\n     }\n \n-    pending->precopy_bytes += remain;\n+    pending->precopy_bytes += precopy_size;\n+    pending->stopcopy_bytes += stopcopy_size;\n \n     trace_vfio_state_pending(vbasedev->name, migration->stopcopy_size,\n                              migration->precopy_init_size,\n",
    "prefixes": [
        "PULL",
        "10/23"
    ]
}