get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223041,
    "url": "http://patchwork.ozlabs.org/api/patches/2223041/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414082915.112122-8-armenon@redhat.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": "<20260414082915.112122-8-armenon@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-14T08:29:12",
    "name": "[v4,07/10] qtests: Enable starting swtpm with a given profile",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "9a0d632e1883b7ba1eb001b1c050c0b437a1e15e",
    "submitter": {
        "id": 91136,
        "url": "http://patchwork.ozlabs.org/api/people/91136/?format=api",
        "name": "Arun Menon",
        "email": "armenon@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260414082915.112122-8-armenon@redhat.com/mbox/",
    "series": [
        {
            "id": 499802,
            "url": "http://patchwork.ozlabs.org/api/series/499802/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499802",
            "date": "2026-04-14T08:29:05",
            "name": "hw/tpm: CRB chunking capability to handle PQC",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/499802/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223041/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223041/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=HuJGsoTT;\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=Io3Fcvwn;\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 4fvyD43NLTz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 18:31:16 +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 1wCZAl-0008Od-Ad; Tue, 14 Apr 2026 04:31:03 -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 <armenon@redhat.com>)\n id 1wCZAe-00085x-8d\n for qemu-devel@nongnu.org; Tue, 14 Apr 2026 04:31:00 -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 <armenon@redhat.com>)\n id 1wCZAc-00043v-JA\n for qemu-devel@nongnu.org; Tue, 14 Apr 2026 04:30:55 -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-696-fDlGMK7qOEmZP4TJG5R3eA-1; Tue, 14 Apr 2026 04:30:51 -0400",
            "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2b2ed279eedso15400865ad.0\n for <qemu-devel@nongnu.org>; Tue, 14 Apr 2026 01:30:51 -0700 (PDT)",
            "from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([49.36.110.202])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2d4e0f909sm181493785ad.35.2026.04.14.01.30.39\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 01:30:48 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776155452;\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=ClfWz/hTXQx5IWEI8DJH2vTF1tKQTfAQCoPQ/9w7nI8=;\n b=HuJGsoTT7Z5IyqEev4BzkDzSAzlfUxfcABi1imQa4bJnNL4NQXGGet7voWMgpXwIysYSvR\n jc+u+xkwYS9bPf+gkCYxxQP8xOeQzuxx2lmXpbVyBx1kD87egRyNigxgNZW8JYjYCJINbJ\n Hfe4fgGKIZUfK5P7bCkqb9WydjFfTjE=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1776155450; x=1776760250; 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=ClfWz/hTXQx5IWEI8DJH2vTF1tKQTfAQCoPQ/9w7nI8=;\n b=Io3FcvwnSoJ3/mjO45PO+qzBI4HNz0ZmyRq/b5CeohfbbUXjQj619HakRMy7F6z7xD\n QAFYnEAWG4ZIC0zswBmVPQqxT+9pRSth05w73PP9nDLrX0OUX+vmrFmsMMb/xoUXkSFr\n y7I98RRpyEMqG2cPIwyMVWAOm1VbCMAJIvP+sGvew5z0d7TpPjWtdh3IIVPaPSSzHWAM\n pQ37uqsm9GTx25jetsLAYVwtiBNcAEFggYEqAlG8UFeqfiFEIsO/rXhtAvmn4d+h6ie3\n lpHjkyUYDDjHc3QfGhDodBKFXgaikn/Iw9sQDIgSl7OhmbKM0xs5OuYqCrk2uIHEbKIy\n 5zQQ=="
        ],
        "X-MC-Unique": "fDlGMK7qOEmZP4TJG5R3eA-1",
        "X-Mimecast-MFC-AGG-ID": "fDlGMK7qOEmZP4TJG5R3eA_1776155450",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776155450; x=1776760250;\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=ClfWz/hTXQx5IWEI8DJH2vTF1tKQTfAQCoPQ/9w7nI8=;\n b=Je9oMwmVjphBs4KqYOFlpNqHHwwtiAoWOu/OhIMNTNJJAihAyreCLalNUFj0O1TFTk\n cu3DnsqNb7LcszTmsd8fzvpjI/7QrjFVokqCaqECw1VEQhsEL7qbb78tB3J435Bg/4yk\n +OQ1Zo3qQds1ePepdbFBGY6t+z2iv5FzGl2+5J+tC5YtWFnLV4XIahz9nb7gGXfnHyth\n vpvN+i5nIu4Kb7RZeem02cD/+IPnF+3dJJdrpezpkryuRvxcnFzEoTbXtkbupw6ZLqts\n w5hJAeg7uFf9HmoJzJA8TRn0Nr+Cs9SOmfxCkbUo38QNZZWR1JIgWl3b4nsAHGFTltM4\n vMYQ==",
        "X-Gm-Message-State": "AOJu0YxvMtosrloooUpVJ/hrnSbvqe8nvzoWwkmQ7byxZxoCJNQQbyqX\n W3fiFyOCaQKk/qg6CWuU6XPbjLZT3rq3ccdZNoaAsTv2BV9kF5fjeAqx3K1OQ0SXDGSBxksW1dX\n WI4QzpwnaywGZI/IUVr9xXqBcEBMM/xZf7blrAbH2ZZBs4AC95n7iwbfaAVgz7xMRdwxlNh9kN+\n s1jBlJ+7eHRU/WYuAlNM/5H9aY0OLeB1r2yrS3Unc=",
        "X-Gm-Gg": "AeBDieu9N2jGiX6uVdtGoEEvmizlajNqUGyHX4i7+mIZpmhz/Tlx+xRr0uRpfkJyKJ/\n 5MDhJ9vrOHzREXu82QWOI0pt+bav4ueBocybNQa+rtGub2pubEaPqC3eNj1hUAZKT+WhvrM90NT\n iUoSkC8MbC2LWY50H+BzRpZCZiLmtf2MKzs+F2e1yjFMmgbUqmYVT+X8oTizLNNTUb8oLdZwCFd\n JFsoo9YoRP22bFtsMPNcTdfg2HPSeqKVlM5xQTFhCmUpF0QAYRVtPzg4W8BkNbTcR4MH6yne2AK\n C7oedmnUuslODCcxjhafgJ065Nl5CmTvKBZzBQ0E46JcQUi2b9kpMR+iB4XdwZ4Mf1sGzDEqYoS\n PJDF7jLDPWxjz9nA5V/QfyaY+VVrGKRpB6G/LX8YHlj4s3boCSuDbGvdXXb04tas=",
        "X-Received": [
            "by 2002:a17:902:724b:b0:2b0:5795:9ead with SMTP id\n d9443c01a7336-2b2d57d9aa2mr109672655ad.0.1776155449948;\n Tue, 14 Apr 2026 01:30:49 -0700 (PDT)",
            "by 2002:a17:902:724b:b0:2b0:5795:9ead with SMTP id\n d9443c01a7336-2b2d57d9aa2mr109672215ad.0.1776155449320;\n Tue, 14 Apr 2026 01:30:49 -0700 (PDT)"
        ],
        "From": "Arun Menon <armenon@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Yanan Wang <wangyanan55@huawei.com>, Ani Sinha <anisinha@redhat.com>,\n \"Michael S. Tsirkin\" <mst@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud?=\n\t=?utf-8?q?=C3=A9?= <philmd@linaro.org>,\n Stefan Berger <stefanb@linux.vnet.ibm.com>,\n Paolo Bonzini <pbonzini@redhat.com>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Zhao Liu <zhao1.liu@intel.com>, marcandre.lureau@redhat.com,\n Igor Mammedov <imammedo@redhat.com>, Laurent Vivier <lvivier@redhat.com>,\n Fabiano Rosas <farosas@suse.de>, Arun Menon <armenon@redhat.com>,\n Stefan Berger <stefanb@linux.ibm.com>",
        "Subject": "[PATCH v4 07/10] qtests: Enable starting swtpm with a given profile",
        "Date": "Tue, 14 Apr 2026 13:59:12 +0530",
        "Message-ID": "<20260414082915.112122-8-armenon@redhat.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260414082915.112122-1-armenon@redhat.com>",
        "References": "<20260414082915.112122-1-armenon@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.133.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_H2=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: Stefan Berger <stefanb@linux.ibm.com>\n\nEnable swtpm to start with a given profile by passing it to swtpm on the\ncommand line using\n\n   --profile name=<profile name>\n\nRemove any existing TPM 2 state file since applying a new profile to\nexisting state would be refused by swtpm.\n\nSigned-off-by: Stefan Berger <stefanb@linux.ibm.com>\nSigned-off-by: Arun Menon <armenon@redhat.com>\n---\n tests/qtest/tpm-tests.c | 6 +++---\n tests/qtest/tpm-util.c  | 9 ++++++++-\n tests/qtest/tpm-util.h  | 3 ++-\n 3 files changed, 13 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/tests/qtest/tpm-tests.c b/tests/qtest/tpm-tests.c\nindex 197714f8d9..f71d882990 100644\n--- a/tests/qtest/tpm-tests.c\n+++ b/tests/qtest/tpm-tests.c\n@@ -43,7 +43,7 @@ void tpm_test_swtpm_test(const char *src_tpm_path, tx_func *tx,\n         return;\n     }\n \n-    succ = tpm_util_swtpm_start(src_tpm_path, &swtpm_pid, &addr, &error);\n+    succ = tpm_util_swtpm_start(src_tpm_path, &swtpm_pid, &addr, NULL, &error);\n     g_assert_true(succ);\n \n     args = g_strdup_printf(\n@@ -91,11 +91,11 @@ void tpm_test_swtpm_migration_test(const char *src_tpm_path,\n     }\n \n     succ = tpm_util_swtpm_start(src_tpm_path, &src_tpm_pid,\n-                                &src_tpm_addr, &error);\n+                                &src_tpm_addr, NULL, &error);\n     g_assert_true(succ);\n \n     succ = tpm_util_swtpm_start(dst_tpm_path, &dst_tpm_pid,\n-                                &dst_tpm_addr, &error);\n+                                &dst_tpm_addr, NULL, &error);\n     g_assert_true(succ);\n \n     tpm_util_migration_start_qemu(&src_qemu, &dst_qemu,\ndiff --git a/tests/qtest/tpm-util.c b/tests/qtest/tpm-util.c\nindex 744592763f..cbba5b1c1f 100644\n--- a/tests/qtest/tpm-util.c\n+++ b/tests/qtest/tpm-util.c\n@@ -212,7 +212,8 @@ bool tpm_util_swtpm_has_tpm2(void)\n }\n \n gboolean tpm_util_swtpm_start(const char *path, GPid *pid,\n-                              SocketAddress **addr, GError **error)\n+                              SocketAddress **addr, const char *profilename,\n+                              GError **error)\n {\n     char *swtpm_argv_tpmstate = g_strdup_printf(\"dir=%s\", path);\n     char *swtpm_argv_ctrl = g_strdup_printf(\"type=unixio,path=%s/sock\",\n@@ -222,11 +223,17 @@ gboolean tpm_util_swtpm_start(const char *path, GPid *pid,\n         g_strdup(\"--tpmstate\"), swtpm_argv_tpmstate,\n         g_strdup(\"--ctrl\"), swtpm_argv_ctrl,\n         g_strdup(\"--tpm2\"),\n+        profilename ? g_strdup(\"--profile\") : NULL,\n+        profilename ? g_strdup_printf(\"name=%s\", profilename) : NULL,\n         NULL\n     };\n+    g_autofree char *swtpm_state_file;\n     gboolean succ;\n     unsigned i;\n \n+    swtpm_state_file = g_strdup_printf(\"%s/tpm2-00.permall\", path);\n+    g_unlink(swtpm_state_file);\n+\n     *addr = g_new0(SocketAddress, 1);\n     (*addr)->type = SOCKET_ADDRESS_TYPE_UNIX;\n     (*addr)->u.q_unix.path = g_build_filename(path, \"sock\", NULL);\ndiff --git a/tests/qtest/tpm-util.h b/tests/qtest/tpm-util.h\nindex 681544e7d8..ca2d7d173f 100644\n--- a/tests/qtest/tpm-util.h\n+++ b/tests/qtest/tpm-util.h\n@@ -41,7 +41,8 @@ void tpm_util_pcrread(QTestState *s, tx_func *tx,\n bool tpm_util_swtpm_has_tpm2(void);\n \n gboolean tpm_util_swtpm_start(const char *path, GPid *pid,\n-                              SocketAddress **addr, GError **error);\n+                              SocketAddress **addr, const char *profilename,\n+                              GError **error);\n void tpm_util_swtpm_kill(GPid pid);\n \n void tpm_util_migrate(QTestState *who, const char *uri);\n",
    "prefixes": [
        "v4",
        "07/10"
    ]
}