get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2026288,
    "url": "http://patchwork.ozlabs.org/api/patches/2026288/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-8-npiggin@gmail.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": "<20241220104220.2007786-8-npiggin@gmail.com>",
    "list_archive_url": null,
    "date": "2024-12-20T10:42:09",
    "name": "[07/17] async/coroutine: Convert to new bh API",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "de4d90e1142faab91514828f49af958744026a23",
    "submitter": {
        "id": 69518,
        "url": "http://patchwork.ozlabs.org/api/people/69518/?format=api",
        "name": "Nicholas Piggin",
        "email": "npiggin@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20241220104220.2007786-8-npiggin@gmail.com/mbox/",
    "series": [
        {
            "id": 437728,
            "url": "http://patchwork.ozlabs.org/api/series/437728/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=437728",
            "date": "2024-12-20T10:42:02",
            "name": "replay: Fixes and avocado test updates",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/437728/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2026288/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2026288/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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=UMjBvM5h;\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 4YF3v94WYSz1yT0\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Dec 2024 21:44:21 +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 1tOaTl-0004A9-Tr; Fri, 20 Dec 2024 05:43:34 -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 <npiggin@gmail.com>)\n id 1tOaTk-0003xQ-1M; Fri, 20 Dec 2024 05:43:32 -0500",
            "from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <npiggin@gmail.com>)\n id 1tOaTi-0005Ii-G7; Fri, 20 Dec 2024 05:43:31 -0500",
            "by mail-pj1-x1029.google.com with SMTP id\n 98e67ed59e1d1-2ee709715d9so1258535a91.3;\n Fri, 20 Dec 2024 02:43:29 -0800 (PST)",
            "from wheely.local0.net (14-200-18-130.tpgi.com.au. [14.200.18.130])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-2f2ee06dfd3sm5376942a91.32.2024.12.20.02.43.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 20 Dec 2024 02:43:27 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1734691408; x=1735296208; 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=QBfCSDwU8LQFcTcaCgA2fhYXCIcXyYzKBDWtkVyojeU=;\n b=UMjBvM5hrgaMu+hIgdIxaka0q+cLJrV/RVky8EF5veGyIfV4xeyixVhibYUY+TENPs\n nitOjK9Lbu2gJvWZsKGSmIQxgnMnLtfvrMrO9bAw3UYG1iV79KlgVheTmGVIPLUJLdyn\n s6SVDecocF0sHW9LDcS1X1ETglJPtGHn/xspihx4NlGg1ZsmZTA3TiAbm3gDkAudMJLf\n 0RhGyQy/CGgdhNNF23CEdpoIqIXu1b4uDtIOMwwCUvNixiz4cWytQb1zW0O6CghPU5Qm\n jYwGIbHJUb68yh3ZMQPdtzlJ36IzIIuUcwxOcF9jIdMCDIoKwuBcqgK84hp3Y6JMVpTN\n Ycwg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1734691408; x=1735296208;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=QBfCSDwU8LQFcTcaCgA2fhYXCIcXyYzKBDWtkVyojeU=;\n b=Ny7LQbjLr/Ith9sL4tdyW6ZbZBNHtLNBytuemEG1tvoRJ/L5qi/4AMZYziYDRBhKyG\n Hri0gtW3Bg5WS1ZdVfsUlYb3BTLixXsei7Y7yOqIjTN4O/2MVApvoGfSn5XeycTwGRvc\n KoUFnGbnruQ0P9fnnh+OjiUT8n3spZuZEMm6BCAzuNtZoqBHdywBm4izW84OmgSnveV5\n 1irZtCMIltzCDhc5xGSoFZpshbRH8HzjnmR29um4UgS5xdkdxJwIEWHhqRR/A0eegqiB\n yd6zEA1sgyoWPtpP531oiD4uVFOS+Z9FOcmOFGvdEE31Q+Jyl0rk8y+F2YIlGBmHGoOt\n tpnw==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCXyPbQSDlFK2a5DPrTgIlOnKhDwS5hRuVu3aVe7H7rnii096Q1P3s1FjajrLSI+PgRxAAQQbdrm2gs+@nongnu.org",
        "X-Gm-Message-State": "AOJu0Yw5j7Klhu99sqcgytxr+PTyUhQBMgHLCIJFr6KXzbYbDVt7S8U4\n drgUUrU+e1D8OHD6GnFM1FhGlJdaZZlPG/RrzWr3klGnnueqddam50bG8Q==",
        "X-Gm-Gg": "ASbGncs/Xll0IFrk3UUiVPBUspo+V1O5RXu+utjfFLaIdfby0YS4pXwULZTWjXtTWKX\n WEOgMEINldXhSXGYNZJ79FS88DEngMBtA3LmBl2eDiMF+tSV645Kn9avzXdn2p9lGYGHdOEzuHM\n ZUrshGbvDNkYr5cw9z/tLyGxG2blfxVPdHDEChQn0qHzsbO0wxb3AuzjQoTEle9IHih7M4h5nIX\n YXoLd9vYNBf0zsHrlM8UxUgfhttcVRhwNyXlaYS2By+v8gKWDACKP2z23H7OOBdCeODo2BxG6Zp\n BM/pCWxApw==",
        "X-Google-Smtp-Source": "\n AGHT+IElEt/zuUs5W64t2CXQPKauNpjjfBqCIxRvI+xKK5wXhQOGNM88/BRn+nIaRajHENsjTcXH6Q==",
        "X-Received": "by 2002:a17:90b:538e:b0:2ee:f80c:6884 with SMTP id\n 98e67ed59e1d1-2f452eed77emr3868617a91.33.1734691408238;\n Fri, 20 Dec 2024 02:43:28 -0800 (PST)",
        "From": "Nicholas Piggin <npiggin@gmail.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Nicholas Piggin <npiggin@gmail.com>, qemu-block@nongnu.org, =?utf-8?q?Al?=\n\t=?utf-8?q?ex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,\n Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>,\n Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>,\n Fam Zheng <fam@euphon.net>, Ronnie Sahlberg <ronniesahlberg@gmail.com>,\n John Snow <jsnow@redhat.com>, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Jason Wang <jasowang@redhat.com>,\n Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,\n Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>,\n \"Dr. David Alan Gilbert\" <dave@treblig.org>,\n Markus Armbruster <armbru@redhat.com>, Michael Roth <michael.roth@amd.com>,\n Wainer dos Santos Moschetta <wainersm@redhat.com>",
        "Subject": "[PATCH 07/17] async/coroutine: Convert to new bh API",
        "Date": "Fri, 20 Dec 2024 20:42:09 +1000",
        "Message-ID": "<20241220104220.2007786-8-npiggin@gmail.com>",
        "X-Mailer": "git-send-email 2.45.2",
        "In-Reply-To": "<20241220104220.2007786-1-npiggin@gmail.com>",
        "References": "<20241220104220.2007786-1-npiggin@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::1029;\n envelope-from=npiggin@gmail.com; helo=mail-pj1-x1029.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, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, 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": "Convert qemu_bh_schedule() to qemu_bh_schedule_event() and\naio_bh_schedule_oneshot() to aio_bh_schedule_oneshot_event(), which can\nspecify the clock type, making it compatible with record-replay.\n\nCoroutine scheduling does not affect target machine state, so it should\nuse QEMU_CLOCK_REALTIME so it is not recorded and replayed.\n\nSigned-off-by: Nicholas Piggin <npiggin@gmail.com>\n---\n job.c                              | 3 ++-\n util/async.c                       | 2 +-\n scripts/block-coroutine-wrapper.py | 3 ++-\n 3 files changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/job.c b/job.c\nindex 660ce22c56b..45e9d9fc096 100644\n--- a/job.c\n+++ b/job.c\n@@ -1109,7 +1109,8 @@ static void coroutine_fn job_co_entry(void *opaque)\n         job->deferred_to_main_loop = true;\n         job->busy = true;\n     }\n-    aio_bh_schedule_oneshot(qemu_get_aio_context(), job_exit, job);\n+    aio_bh_schedule_oneshot_event(qemu_get_aio_context(), job_exit, job,\n+                                  QEMU_CLOCK_REALTIME);\n }\n \n void job_start(Job *job)\ndiff --git a/util/async.c b/util/async.c\nindex b88083ecbe7..6ac994effec 100644\n--- a/util/async.c\n+++ b/util/async.c\n@@ -683,7 +683,7 @@ void aio_co_schedule(AioContext *ctx, Coroutine *co)\n \n     QSLIST_INSERT_HEAD_ATOMIC(&ctx->scheduled_coroutines,\n                               co, co_scheduled_next);\n-    qemu_bh_schedule(ctx->co_schedule_bh);\n+    qemu_bh_schedule_event(ctx->co_schedule_bh, QEMU_CLOCK_REALTIME);\n \n     aio_context_unref(ctx);\n }\ndiff --git a/scripts/block-coroutine-wrapper.py b/scripts/block-coroutine-wrapper.py\nindex dbbde99e39e..c111c322487 100644\n--- a/scripts/block-coroutine-wrapper.py\n+++ b/scripts/block-coroutine-wrapper.py\n@@ -292,7 +292,8 @@ def gen_no_co_wrapper(func: FuncDecl) -> str:\n     }};\n     assert(qemu_in_coroutine());\n \n-    aio_bh_schedule_oneshot(qemu_get_aio_context(), {name}_bh, &s);\n+    aio_bh_schedule_oneshot_event(qemu_get_aio_context(), {name}_bh, &s,\n+                                  QEMU_CLOCK_REALTIME);\n     qemu_coroutine_yield();\n \n     {func.ret}\n",
    "prefixes": [
        "07/17"
    ]
}