get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2215412,
    "url": "http://patchwork.ozlabs.org/api/patches/2215412/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260324151111.237411-2-peter.maydell@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": "<20260324151111.237411-2-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2026-03-24T15:11:01",
    "name": "[PULL,01/11] target/arm: fix s2prot not set for two-stage PMSA translations",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "085b24c605b4478f87950c2cd6d9276e2d76c8f3",
    "submitter": {
        "id": 5111,
        "url": "http://patchwork.ozlabs.org/api/people/5111/?format=api",
        "name": "Peter Maydell",
        "email": "peter.maydell@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260324151111.237411-2-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 497302,
            "url": "http://patchwork.ozlabs.org/api/series/497302/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=497302",
            "date": "2026-03-24T15:11:00",
            "name": "[PULL,01/11] target/arm: fix s2prot not set for two-stage PMSA translations",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497302/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2215412/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2215412/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=bTpInedD;\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 4fgD6V6TB9z1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 02:12:18 +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 1w53Pn-0000mm-6q; Tue, 24 Mar 2026 11:11:31 -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 <peter.maydell@linaro.org>)\n id 1w53Pb-0000bO-EZ\n for qemu-devel@nongnu.org; Tue, 24 Mar 2026 11:11:19 -0400",
            "from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>)\n id 1w53PY-0005Bj-IJ\n for qemu-devel@nongnu.org; Tue, 24 Mar 2026 11:11:19 -0400",
            "by mail-wr1-x42b.google.com with SMTP id\n ffacd0b85a97d-439c6fc2910so1102928f8f.0\n for <qemu-devel@nongnu.org>; Tue, 24 Mar 2026 08:11:16 -0700 (PDT)",
            "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43b64717e97sm40781916f8f.35.2026.03.24.08.11.13\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 24 Mar 2026 08:11:13 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774365075; x=1774969875; 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=ErylgoX7rGE2MPVTc4vGOkn7Dc6WAKHtKwRhn5S4AVo=;\n b=bTpInedDvaJq6S2mpiFeeED3lHQ42LBoqkiNUDlKqkLam1LRy8YhpddzftR4HYyZJG\n +AeZvSkR8SbQj29xU2iFS8TKVskX1mrxCgp58w7gfHeyCaP/F22n9ZKFl/VDNMGVPGPK\n hMvZ730JDaR6iDEKubaAta8Q18OksMi5MoVgF9xtJ4bE0SRhM/mDAw4KA8oTeyOQPNbg\n aMMdTaV6OTLuYqrbCxAaxQcpdITHE/ZpRs83KwC2sTeBrlTfmoq6jApYa9hltkzXwKVE\n rqnmEGI0hfTC0aw4Bw4GCBaNRYml6lUV6jSpwN5mH6BQBWCMAwD4Mjyzv4OwVq1VAAKS\n lpfA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774365075; x=1774969875;\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;\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QbysjI/ugba73vooSTzKfDafkHCKoROb4tWaZI2mw26x+/CQoR\n u9ri+rSnfQjt1UIp+GICtkNKaKiqGg=",
        "X-Received": "by 2002:a5d:5d82:0:b0:439:b3ff:9ab9 with SMTP id\n ffacd0b85a97d-43b642919b2mr26523385f8f.48.1774365074750;\n Tue, 24 Mar 2026 08:11:14 -0700 (PDT)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Subject": "[PULL 01/11] target/arm: fix s2prot not set for two-stage PMSA\n translations",
        "Date": "Tue, 24 Mar 2026 15:11:01 +0000",
        "Message-ID": "<20260324151111.237411-2-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260324151111.237411-1-peter.maydell@linaro.org>",
        "References": "<20260324151111.237411-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::42b;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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": "From: Jose Martins <josemartins90@gmail.com>\n\nCommit a811c5dafb7 (\"target/arm: Implement get_S2prot_indirect\")\nchanged get_phys_addr_twostage() to combine stage 1 and stage 2\npermissions using the new s2prot field:\n\n  result->f.prot = s1_prot & result->s2prot;\n\nThe LPAE stage 2 path sets result->s2prot explicitly, but the PMSA\nstage 2 path (get_phys_addr_pmsav8) only sets result->f.prot, leaving\ns2prot at zero. This causes the combined permission to be zero,\nresulting in addr_read being set to -1 in the TLB entry and triggering\nan assertion in atomic_mmu_lookup() when the guest executes an atomic\ninstruction on a two-stage PMSA platform (e.g. Cortex-R52 with EL2).\n\nSet s2prot from f.prot after the PMSA stage 2 lookup, consistent with\nwhat the LPAE path does.\n\nCc: qemu-stable@nongnu.org\nFixes: a811c5dafb7 (\"target/arm: Implement get_S2prot_indirect\")\nSigned-off-by: Jose Martins <josemartins90@gmail.com>\n[PMM: refer to the right commit in the commit message]\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\nMessage-id: 20260321231916.2852653-1-josemartins90@gmail.com\nReviewed-by: Gustavo Romero <gustavo.romero@linaro.org>\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\n target/arm/ptw.c | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/target/arm/ptw.c b/target/arm/ptw.c\nindex 8b8dc09e72..e289f88124 100644\n--- a/target/arm/ptw.c\n+++ b/target/arm/ptw.c\n@@ -3200,6 +3200,13 @@ static bool get_phys_addr_pmsav8(CPUARMState *env,\n \n     ret = pmsav8_mpu_lookup(env, address, access_type, ptw->in_prot_check,\n                             mmu_idx, secure, result, fi, NULL);\n+    /*\n+     * For two-stage PMSA translations, s2prot holds the stage 2\n+     * permissions to be combined with stage 1 in get_phys_addr_twostage().\n+     */\n+    if (regime_is_stage2(mmu_idx)) {\n+        result->s2prot = result->f.prot;\n+    }\n     if (sattrs.subpage) {\n         result->f.lg_page_size = 0;\n     }\n",
    "prefixes": [
        "PULL",
        "01/11"
    ]
}