get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2220146,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220146/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406141735.25844-7-armenon@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": "<20260406141735.25844-7-armenon@redhat.com>",
    "date": "2026-04-06T14:17:31",
    "name": "[v3,06/10] hw/tpm: Add support for VM migration with TPM CRB chunking",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2aae75cea9cae9a06d0d943ca36b0bda5dc7f5f3",
    "submitter": {
        "id": 91136,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/91136/?format=api",
        "name": "Arun Menon",
        "email": "armenon@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260406141735.25844-7-armenon@redhat.com/mbox/",
    "series": [
        {
            "id": 498860,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/498860/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498860",
            "date": "2026-04-06T14:17:28",
            "name": "hw/tpm: CRB chunking capability to handle PQC",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/498860/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2220146/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2220146/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=hzUIvVjw;\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=gqTwhPRK;\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 4fqBKD0kqDz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 00:19:12 +1000 (AEST)",
            "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 1w9kmq-0003zx-AL; Mon, 06 Apr 2026 10:18:44 -0400",
            "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 <armenon@redhat.com>)\n id 1w9kmk-0003yc-AC\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:18:39 -0400",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <armenon@redhat.com>)\n id 1w9kmi-00054S-Pf\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:18:38 -0400",
            "from mail-pl1-f200.google.com (mail-pl1-f200.google.com\n [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-583-WCBSQPzCMUW-6NYjdpZEMw-1; Mon, 06 Apr 2026 10:18:34 -0400",
            "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2b0b57e192bso31466095ad.1\n for <qemu-devel@nongnu.org>; Mon, 06 Apr 2026 07:18:34 -0700 (PDT)",
            "from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([152.59.100.84])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b27478cb4fsm156732905ad.29.2026.04.06.07.18.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 06 Apr 2026 07:18:31 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775485116;\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=wBU+397EypgY+h5PHONu2tHrEibGvEnQLvVz+RQFsbU=;\n b=hzUIvVjwAX5UZEWS30WIt7m9OpOSIjMAQ4JwPp9Dne1Hy63hvkElLt3JjRLf01VakWYGvB\n godjcUOi3e4ZBeqiXQG7BGlS8Mu8sTX8X0ncKooVpYG55Mqc1Z3dc2kKenpB+Vou/9c29w\n ay5fENbLjY3PPz6Lo1iuOEWI7rYu+dc=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1775485113; x=1776089913; 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=wBU+397EypgY+h5PHONu2tHrEibGvEnQLvVz+RQFsbU=;\n b=gqTwhPRKEEtVEeMBzF2/uyPmPDa2DMYJrg9HsKM6DE5HtTJX4kr54pjJLy7mQCJyzq\n mE8aKnYs+mcjfqZ06ae2YJKQGg/IeJsM9Sc/QjewUMrBcXuI68blj3mDBnk/Y3ab9hL4\n Bs/Jp+rygJkHv2J7uPW23ovndjD10IujqMKGHdlnSHydN4zyWYcZx+/Zwe1nqEtk+nYP\n 0ZYEK4K/NZ1BOWOh2iDFA+aY4G9RNB5mLZns79KNar5uGD2wIR/Nx7v9JYKrYQqBMs4A\n 0vctltP+qPjFJI5GT3IIhZU08jsySSavdUHDNj1q4V/pRwPRd1OSAeRTEu2EkzrK2IW3\n pHrA=="
        ],
        "X-MC-Unique": "WCBSQPzCMUW-6NYjdpZEMw-1",
        "X-Mimecast-MFC-AGG-ID": "WCBSQPzCMUW-6NYjdpZEMw_1775485113",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775485113; x=1776089913;\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=wBU+397EypgY+h5PHONu2tHrEibGvEnQLvVz+RQFsbU=;\n b=cqqMZrwA58TjpJDBSlwx7RmsIVnEc3XnneeponHJCKT51LnVhyc5XGygu15EeuYssI\n HVZWt4lx127KInh1QEHQW9PfH6+bY77QTXMRrEKHAiGEM1/oZ0wXsz749KH2fVMMBetB\n vGS4GU/HSa7Trj1z7ZcnI0lNrP7X0+lexdOJgn4lgVyjgkGggJSwkzRoa/i+zflbhft4\n ryxj4nWgHe6YadJx96Inl1EFhqgUZxyomsJ6WD+CgUqq2//fuc704XFTqgTPmyGtiPAU\n BpKBxiaPPuyDt0QmcXXx83lmsVPfF0i/zUyvwxxVI4iG00sD20DFZkRtLfRGINgSp7mN\n gzvA==",
        "X-Gm-Message-State": "AOJu0YzDUfv6pHIrec/dhgKww26gjZwW+TPVA59//qxcVbq3LmrlJUQf\n kxLNER8f8CibjyJRSDY3/suigUPqnJ2ySGZlDUhQnDwOyqgrUrRHo0V25wH2ahQxx8R833Ttmdx\n DnXNf/IA2/Gb5PjlcqmLM2eRD9O55teJVJl12a8F0PBqMSPQj2ZO5ePdjlT7eQfpM9mk2IBaqMg\n agN8LK7Kb6818+ugoDy4NKDGTIZXjy8sy0r82mvjs=",
        "X-Gm-Gg": "AeBDievgQJVG0n7657SfnvjN/TEXX7rTOew4mXNwb8CUXk/eI1NayG//SJUhcSGWD/s\n 5aJJKwvct/E4+SERpBkQqmXEP8Rd4C6tKPft/hJ16VA8f+1bRsq1l+StmDj+xh2/qjBN615CzWv\n RRd9WxTdiayG2oa9mAe5FBY79uqMoSzFaljVDCcne7957feWFUwrhURL4mz/q2a7YHRFLqnR2cw\n z2UvBydtO6r5SFkIiipvYnFdWvr1d5ShKUsJvphXFlkcias2WQKjFpToHs0O5Qx2KjQEJhzRMLt\n pzhSi8y+cex0ZroJNZM/zz4DHzWCIpVh0fkPD2H+dRagZnUeiCDuPdNhC51pgyACwAPRA68lfMK\n 1jHMXyP/leCaEW9tOa8K539haZHWKMRm7IsI1e3KQearsuL4aChjcssZQxpc77570SEM=",
        "X-Received": [
            "by 2002:a17:903:1ae3:b0:2b0:afad:7aad with SMTP id\n d9443c01a7336-2b2818016c3mr133742145ad.45.1775485112933;\n Mon, 06 Apr 2026 07:18:32 -0700 (PDT)",
            "by 2002:a17:903:1ae3:b0:2b0:afad:7aad with SMTP id\n d9443c01a7336-2b2818016c3mr133741645ad.45.1775485112390;\n Mon, 06 Apr 2026 07:18:32 -0700 (PDT)"
        ],
        "From": "Arun Menon <armenon@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Ani Sinha <anisinha@redhat.com>, Laurent Vivier <lvivier@redhat.com>,\n Zhao Liu <zhao1.liu@intel.com>, Stefan Berger <stefanb@linux.vnet.ibm.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Paolo Bonzini <pbonzini@redhat.com>, Fabiano Rosas <farosas@suse.de>,\n marcandre.lureau@redhat.com, \"Michael S. Tsirkin\" <mst@redhat.com>,\n Yanan Wang <wangyanan55@huawei.com>, Igor Mammedov <imammedo@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Arun Menon <armenon@redhat.com>",
        "Subject": "[PATCH v3 06/10] hw/tpm: Add support for VM migration with TPM CRB\n chunking",
        "Date": "Mon,  6 Apr 2026 19:47:31 +0530",
        "Message-ID": "<20260406141735.25844-7-armenon@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260406141735.25844-1-armenon@redhat.com>",
        "References": "<20260406141735.25844-1-armenon@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124; envelope-from=armenon@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com",
        "X-Spam_score_int": "-25",
        "X-Spam_score": "-2.6",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\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_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_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": "From: Arun Menon <armenon@redhat.com>\n\n- Add subsection in VMState for TPM CRB with the newly introduced\n  command and response buffers, along with a needed callback, so that\n  newer QEMU only sends the buffers if it is necessary.\n- Add hw_compat blocker because the feature is only supported for\n  machine type 11.1 and higher.\n- If the VM has no pending chunked TPM commands in the internal buffers\n  during a VM migration, or if the machine type does not support newly\n  introduced buffers, then the needed callback will return false, as it\n  checks the hw_compat blocker and thus the subsection will not be sent\n  to the destination host.\n\nSigned-off-by: Arun Menon <armenon@redhat.com>\n---\n hw/core/machine.c |  4 +++-\n hw/tpm/tpm_crb.c  | 31 +++++++++++++++++++++++++++++++\n 2 files changed, 34 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/hw/core/machine.c b/hw/core/machine.c\nindex 1abc8ae737..fb290c6c53 100644\n--- a/hw/core/machine.c\n+++ b/hw/core/machine.c\n@@ -38,7 +38,9 @@\n #include \"hw/acpi/generic_event_device.h\"\n #include \"qemu/audio.h\"\n \n-GlobalProperty hw_compat_11_0[] = {};\n+GlobalProperty hw_compat_11_0[] = {\n+    { \"tpm-crb\", \"migrate-buffers\", \"off\"},\n+};\n const size_t hw_compat_11_0_len = G_N_ELEMENTS(hw_compat_11_0);\n \n GlobalProperty hw_compat_10_2[] = {\ndiff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c\nindex b9f295db7a..81471dd9f8 100644\n--- a/hw/tpm/tpm_crb.c\n+++ b/hw/tpm/tpm_crb.c\n@@ -49,6 +49,8 @@ struct CRBState {\n \n     bool ppi_enabled;\n     TPMPPI ppi;\n+\n+    bool migrate_buffers;\n };\n typedef struct CRBState CRBState;\n \n@@ -345,18 +347,47 @@ static int tpm_crb_pre_save(void *opaque)\n     return 0;\n }\n \n+static bool tpm_crb_chunk_needed(void *opaque)\n+{\n+    CRBState *s = opaque;\n+\n+    if (!s->migrate_buffers) {\n+        return false;\n+    }\n+\n+    return ((s->command_buffer && s->command_buffer->len > 0) ||\n+            (s->response_buffer && s->response_buffer->len > 0));\n+}\n+\n+static const VMStateDescription vmstate_tpm_crb_chunk = {\n+    .name = \"tpm-crb/chunk\",\n+    .version_id = 0,\n+    .needed = tpm_crb_chunk_needed,\n+    .fields = (const VMStateField[]) {\n+        VMSTATE_GBYTEARRAY(command_buffer, CRBState, 0),\n+        VMSTATE_GBYTEARRAY(response_buffer, CRBState, 0),\n+        VMSTATE_UINT32(response_offset, CRBState),\n+        VMSTATE_END_OF_LIST()\n+    }\n+};\n+\n static const VMStateDescription vmstate_tpm_crb = {\n     .name = \"tpm-crb\",\n     .pre_save = tpm_crb_pre_save,\n     .fields = (const VMStateField[]) {\n         VMSTATE_UINT32_ARRAY(regs, CRBState, TPM_CRB_R_MAX),\n         VMSTATE_END_OF_LIST(),\n+    },\n+    .subsections = (const VMStateDescription * const []) {\n+        &vmstate_tpm_crb_chunk,\n+        NULL,\n     }\n };\n \n static const Property tpm_crb_properties[] = {\n     DEFINE_PROP_TPMBE(\"tpmdev\", CRBState, tpmbe),\n     DEFINE_PROP_BOOL(\"ppi\", CRBState, ppi_enabled, true),\n+    DEFINE_PROP_BOOL(\"migrate-buffers\", CRBState, migrate_buffers, true),\n };\n \n static void tpm_crb_reset(void *dev)\n",
    "prefixes": [
        "v3",
        "06/10"
    ]
}