get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226828,
    "url": "http://patchwork.ozlabs.org/api/patches/2226828/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422195746.88865-23-philmd@linaro.org/",
    "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": "<20260422195746.88865-23-philmd@linaro.org>",
    "list_archive_url": null,
    "date": "2026-04-22T19:57:20",
    "name": "[PULL,22/48] hw/tpm: Propagate @ppi_enabled to tpm_tis_reset() and remove in TPMState",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "eeda9323d8fb5e460313a8bf982fc494a7a9deae",
    "submitter": {
        "id": 85046,
        "url": "http://patchwork.ozlabs.org/api/people/85046/?format=api",
        "name": "Philippe Mathieu-Daudé",
        "email": "philmd@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260422195746.88865-23-philmd@linaro.org/mbox/",
    "series": [
        {
            "id": 501099,
            "url": "http://patchwork.ozlabs.org/api/series/501099/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501099",
            "date": "2026-04-22T19:56:59",
            "name": "[PULL,01/48] hw/avr: Build as common unit files",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501099/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226828/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226828/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=WGUlIyNk;\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 4g19Bk5FpDz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 06:03:10 +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 1wFdkY-0007BC-TK; Wed, 22 Apr 2026 16:00:43 -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 <philmd@linaro.org>) id 1wFdkP-0006gM-Ro\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 16:00:36 -0400",
            "from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1wFdkM-0001vN-GB\n for qemu-devel@nongnu.org; Wed, 22 Apr 2026 16:00:32 -0400",
            "by mail-wm1-x32b.google.com with SMTP id\n 5b1f17b1804b1-488af96f6b2so75000065e9.0\n for <qemu-devel@nongnu.org>; Wed, 22 Apr 2026 13:00:24 -0700 (PDT)",
            "from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fc18bccfsm425786435e9.8.2026.04.22.13.00.21\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Wed, 22 Apr 2026 13:00:21 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1776888023; x=1777492823; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=JH1RhoT67ixQCInyH6yG0/xCY2TR3evf5THZqvNeLuI=;\n b=WGUlIyNkGUPMzAgGA8R33oZWiNtH+4IoTjF3FBt2PqkVeplx/bWQ8X53R1zO1yf6wI\n 1VY3aiQjhudGFbZ9P8h+u8eD9qX0mDOFFv3eloT7NXklREIGyGCOgbF6RqFoGxLdXvDC\n Xg9O+gqo8MtPAvpVJfDxfQh5CzrmXV3tx1+M2YqP+2826pC7pNtANMhd+1jxEBp/2R45\n xmMdP4Ca6Pd8fCC99JhGadp56qgzBZKiimY5JQegJYo1iuNixe6iWB+fI8XE/sdkgm4y\n x5BCLYCR68znj9aaujsX0q+/ZnqerHRpZJnsJetFaco1hXfB5f2b6UrxtlN6f3FYMQbD\n rzLA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776888023; x=1777492823;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=JH1RhoT67ixQCInyH6yG0/xCY2TR3evf5THZqvNeLuI=;\n b=iJaszDscwOBbSOFfDKSKLasOsAwfebNF2Kb/6Luu7jZALHgwO+LdSvIc+Gq7Uc6pGD\n WuIwDiaKUidi7FDeqFLhpZlzjs13jOz4NZ9untdnhsG0U9JsTmgprtwrbtUotTvDTth1\n sgnh6fQJM//bPOUzC+dARAO2+2apvuH9uN0EVPS9FMArvSw63NJkBBJDIDdrTTTA3tA9\n 04pQE5rAg4gXPRfnTDYA62u7UcfKbvW8OSwDbp63IOEjyZj/mLi78PQj8PCotlqzQV5/\n o73GKAni43B+Ft8kFHyMBZKvjovVgvLjCmbpuSaszCTF+a1W8VewcTKLMjqBE+uLK832\n fAtA==",
        "X-Gm-Message-State": "AOJu0YzfKm+nSKH1pcKolqJiKN45Uw+G7jMPdTKkFSY81Kl0KXYpLmjM\n F/4vgEW5cuVKcNJrWNPhMtEYslMHYd5lBUztmAzLeBTUeLknn01WZ09yoTR4dwuO/brwXgH7PIX\n WuVpa/mw=",
        "X-Gm-Gg": "AeBDiesN9PI3Tp/4ZfrkNg767w8Y/999SROkfF21KIYY+PL+2yeDkL/CROFMkp34UPb\n h166rVD6IofdeGyj2EzzHBoYLLz8VYcayLOOFp+EzQH117IUIc3vukkYJqCJsIUI0kS1GiS00gE\n /oP5EVfQro7DNedmcZ+MCEh9tKlsFPc1Aip/QKCKPCHhgDiu6ALsOezRDom87k8njpTbVYQYpoJ\n 1j43Ceyt/8OQKLGEwyrodLyIftL/MypvQN2PwcN9MYj5ni3ldoYzVE1VN0HPvJUx+30/6Yy2Wjt\n 7CtkCcKoa8cSAM+Rnue8v17qynC5Qgo7FMvQpoo2xtPC+jmibiOT+mQOhY4/cJG2zdV+fiFzIVy\n T14+Mi38nuedMOItzfHMUw8vKAEj3ki1IrgU7I9tTWvkPPmxEpBnz0RVjmSkshX0Np6ZMTvJlbZ\n uPzje3HNPOX038hzru0gRNzybFzBlRSE9krTB00aVZT0FIKlkgnPmIY2+nsH3UXCE6C7dfiyx65\n f7J2OvnZ5g=",
        "X-Received": "by 2002:a05:600c:468c:b0:48a:56d5:16f2 with SMTP id\n 5b1f17b1804b1-48a56d5179amr116684295e9.7.1776888023054;\n Wed, 22 Apr 2026 13:00:23 -0700 (PDT)",
        "From": "=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Subject": "[PULL 22/48] hw/tpm: Propagate @ppi_enabled to tpm_tis_reset() and\n remove in TPMState",
        "Date": "Wed, 22 Apr 2026 21:57:20 +0200",
        "Message-ID": "<20260422195746.88865-23-philmd@linaro.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260422195746.88865-1-philmd@linaro.org>",
        "References": "<20260422195746.88865-1-philmd@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::32b;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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,\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 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": "Of the TPM devices using FIFO mode, only the ISA variant has\nPPI, and calls tpm_ppi_init() to initialize the PPI state.\nPropagate @ppi_enabled to tpm_tis_reset() so it only resets\nthe PPI part when requested (ISA case) otherwise the PPI is in\nuninitialized state. Remove the now unused TPMState::ppi_enabled\nfield. Set the generic TPMIfClass::ppi_enabled so ACPI subsystem\ncan keep checking its availability.\n\nSigned-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nReviewed-by: Stefan Berger <stefanb@linux.ibm.com>\nMessage-Id: <20260317120241.16320-5-philmd@linaro.org>\n---\n hw/tpm/tpm_tis.h        |  3 +--\n hw/tpm/tpm_tis_common.c |  4 ++--\n hw/tpm/tpm_tis_i2c.c    |  2 +-\n hw/tpm/tpm_tis_isa.c    | 10 ++++------\n hw/tpm/tpm_tis_sysbus.c |  2 +-\n 5 files changed, 9 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/hw/tpm/tpm_tis.h b/hw/tpm/tpm_tis.h\nindex 184632ff66b..1531620bf9d 100644\n--- a/hw/tpm/tpm_tis.h\n+++ b/hw/tpm/tpm_tis.h\n@@ -75,7 +75,6 @@ typedef struct TPMState {\n \n     size_t be_buffer_size;\n \n-    bool ppi_enabled;\n     TPMPPI ppi;\n } TPMState;\n \n@@ -83,7 +82,7 @@ extern const VMStateDescription vmstate_locty;\n extern const MemoryRegionOps tpm_tis_memory_ops;\n \n int tpm_tis_pre_save(TPMState *s);\n-void tpm_tis_reset(TPMState *s);\n+void tpm_tis_reset(TPMState *s, bool ppi_enabled);\n enum TPMVersion tpm_tis_get_tpm_version(TPMState *s);\n void tpm_tis_request_completed(TPMState *s, int ret);\n uint32_t tpm_tis_read_data(TPMState *s, hwaddr addr, unsigned size);\ndiff --git a/hw/tpm/tpm_tis_common.c b/hw/tpm/tpm_tis_common.c\nindex f594b15b8ab..a134d5c2059 100644\n--- a/hw/tpm/tpm_tis_common.c\n+++ b/hw/tpm/tpm_tis_common.c\n@@ -813,7 +813,7 @@ enum TPMVersion tpm_tis_get_tpm_version(TPMState *s)\n  * This function is called when the machine starts, resets or due to\n  * S3 resume.\n  */\n-void tpm_tis_reset(TPMState *s)\n+void tpm_tis_reset(TPMState *s, bool ppi_enabled)\n {\n     int c;\n \n@@ -821,7 +821,7 @@ void tpm_tis_reset(TPMState *s)\n     s->be_buffer_size = MIN(tpm_backend_get_buffer_size(s->be_driver),\n                             TPM_TIS_BUFFER_MAX);\n \n-    if (s->ppi_enabled) {\n+    if (ppi_enabled) {\n         tpm_ppi_reset(&s->ppi);\n     }\n     tpm_backend_reset(s->be_driver);\ndiff --git a/hw/tpm/tpm_tis_i2c.c b/hw/tpm/tpm_tis_i2c.c\nindex 9f13e0ec120..b4f258c7bcb 100644\n--- a/hw/tpm/tpm_tis_i2c.c\n+++ b/hw/tpm/tpm_tis_i2c.c\n@@ -523,7 +523,7 @@ static void tpm_tis_i2c_reset(DeviceState *dev)\n     i2cst->csum_enable = 0;\n     i2cst->loc_sel = 0x00;\n \n-    return tpm_tis_reset(s);\n+    return tpm_tis_reset(s, false);\n }\n \n static void tpm_tis_i2c_class_init(ObjectClass *klass, const void *data)\ndiff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c\nindex 61e95434f5b..1ca403241de 100644\n--- a/hw/tpm/tpm_tis_isa.c\n+++ b/hw/tpm/tpm_tis_isa.c\n@@ -88,13 +88,12 @@ static void tpm_tis_isa_reset(DeviceState *dev)\n     TPMStateISA *isadev = TPM_TIS_ISA(dev);\n     TPMState *s = &isadev->state;\n \n-    return tpm_tis_reset(s);\n+    return tpm_tis_reset(s, true);\n }\n \n static const Property tpm_tis_isa_properties[] = {\n     DEFINE_PROP_UINT32(\"irq\", TPMStateISA, state.irq_num, TPM_TIS_IRQ),\n     DEFINE_PROP_TPMBE(\"tpmdev\", TPMStateISA, state.be_driver),\n-    DEFINE_PROP_BOOL(\"ppi\", TPMStateISA, state.ppi_enabled, true),\n };\n \n static void tpm_tis_isa_initfn(Object *obj)\n@@ -132,10 +131,8 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, Error **errp)\n     memory_region_add_subregion(isa_address_space(ISA_DEVICE(dev)),\n                                 TPM_TIS_ADDR_BASE, &s->mmio);\n \n-    if (s->ppi_enabled) {\n-        tpm_ppi_init(&s->ppi, isa_address_space(ISA_DEVICE(dev)),\n-                     TPM_PPI_ADDR_BASE, OBJECT(dev));\n-    }\n+    tpm_ppi_init(&s->ppi, isa_address_space(ISA_DEVICE(dev)),\n+                 TPM_PPI_ADDR_BASE, OBJECT(dev));\n }\n \n static void build_tpm_tis_isa_aml(AcpiDevAmlIf *adev, Aml *scope)\n@@ -175,6 +172,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, const void *data)\n     device_class_set_props(dc, tpm_tis_isa_properties);\n     dc->vmsd  = &vmstate_tpm_tis_isa;\n     tc->model = TPM_MODEL_TPM_TIS;\n+    tc->ppi_enabled = true;\n     dc->realize = tpm_tis_isa_realizefn;\n     device_class_set_legacy_reset(dc, tpm_tis_isa_reset);\n     tc->request_completed = tpm_tis_isa_request_completed;\ndiff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c\nindex e9372e73163..dd30344d5ac 100644\n--- a/hw/tpm/tpm_tis_sysbus.c\n+++ b/hw/tpm/tpm_tis_sysbus.c\n@@ -87,7 +87,7 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)\n     TPMStateSysBus *sbdev = TPM_TIS_SYSBUS(dev);\n     TPMState *s = &sbdev->state;\n \n-    return tpm_tis_reset(s);\n+    return tpm_tis_reset(s, false);\n }\n \n static const Property tpm_tis_sysbus_properties[] = {\n",
    "prefixes": [
        "PULL",
        "22/48"
    ]
}