get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1585791,
    "url": "http://patchwork.ozlabs.org/api/patches/1585791/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20220128153009.2467560-20-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": "<20220128153009.2467560-20-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2022-01-28T15:29:56",
    "name": "[PULL,19/32] hw/intc/arm_gicv3: Initialise dma_as in GIC, not ITS",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1764c3ead989d46bf020b0bc890131afaa123cc8",
    "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/20220128153009.2467560-20-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 283405,
            "url": "http://patchwork.ozlabs.org/api/series/283405/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=283405",
            "date": "2022-01-28T15:29:53",
            "name": "[PULL,01/32] Update copyright dates to 2022",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/283405/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1585791/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1585791/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@bilbo.ozlabs.org",
        "Authentication-Results": [
            "bilbo.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=rgRyz2lo;\n\tdkim-atps=neutral",
            "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=<UNKNOWN>)"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4JljVL28wPz9t3b\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 29 Jan 2022 03:25:14 +1100 (AEDT)",
            "from localhost ([::1]:45258 helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1nDU3j-0001Fo-FV\n\tfor incoming@patchwork.ozlabs.org; Fri, 28 Jan 2022 11:25:11 -0500",
            "from eggs.gnu.org ([209.51.188.92]:57758)\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 1nDTDD-0002B5-DW\n for qemu-devel@nongnu.org; Fri, 28 Jan 2022 10:30:58 -0500",
            "from [2a00:1450:4864:20::42c] (port=33704\n helo=mail-wr1-x42c.google.com)\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 1nDTD0-0006QD-3A\n for qemu-devel@nongnu.org; Fri, 28 Jan 2022 10:30:48 -0500",
            "by mail-wr1-x42c.google.com with SMTP id e8so11670040wrc.0\n for <qemu-devel@nongnu.org>; Fri, 28 Jan 2022 07:30:34 -0800 (PST)",
            "from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2])\n by smtp.gmail.com with ESMTPSA id j3sm4749485wrb.57.2022.01.28.07.30.32\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 28 Jan 2022 07:30:33 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n h=from:to:subject:date:message-id:in-reply-to:references:mime-version\n :content-transfer-encoding;\n bh=9SyNcRrVuvovEvSkxrvxeCVjQbfrBwz9kaivzr8f5zc=;\n b=rgRyz2loESAPI3X0p3n1io84VmrtIb5mWV+Sr9YuXqXRvdUK4wVr6XbVc7mRb8MQvG\n NTQq9+EmnTzJPx5flS2wJB/btSw0MQwtmPg5ni6z0JDT4O/L/cUnlHLB26JSsZLeWFlJ\n EFEQO+ZvsfmE1bMyYFNQfhZVDnkPplGk8RdMLVAX6mxLhC8MFX3wfcb/aVwPPq3SVYDr\n aoDR00L8oFL8kIbI32Ve90vROE/L2QK6dn0GjxHgpd0XSgrhwgFzMyfto/frNymbVuar\n vk/Jajg6s8cYSDeLhmLa+4aAJUiS890kknwaGVrf6E4VCZxth0YDHn6wf+UJOpmd19LT\n smLQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=9SyNcRrVuvovEvSkxrvxeCVjQbfrBwz9kaivzr8f5zc=;\n b=hjW6m0C/raBdsMdpffq7D+vapECb0k3lVKuTy/SoR+/X1lwvlLGkYzRF2Y9I04NyLL\n h7ksHX8efOK8msu9eEYE0nXA/p6BUIUYDYGKfLZIV6U3kxH5+DYxM59NVmNjLcjDehYQ\n JviBc5t8eVNQ0qGpJtVUZpYY1Y9TmPO0bsKaaYThGS8LNqDK/MHRBial5CXFyjvjDmTF\n IJzWl/ucfUk10CsXrFrryO8E1XlYbsoBCFb9BC9vLtfSRtfxn8hwLYu72se/fSby8VPF\n 9P1oR65mbg+UeyQvKYUb+10MJxVZAY+ELIajP+5I5BPE4BY9i0vtRHBwYesg0azgLWeF\n 0cHA==",
        "X-Gm-Message-State": "AOAM531A5wDix667tN3JD7EsqG03KIpa64ONxk5Q9a39Jwckf5REzTCQ\n +NgQ7RYKwlCaXJnzuyG2ryOCdzY/qpRjnA==",
        "X-Google-Smtp-Source": "\n ABdhPJxu67oQfKMUE5gxMipFPYQE8C9U7Kcdjn1APMKvcmFFSwPiAnfEBIg2SV421ElnPjllHsnxhQ==",
        "X-Received": "by 2002:adf:d1c7:: with SMTP id b7mr5867113wrd.506.1643383833683;\n Fri, 28 Jan 2022 07:30:33 -0800 (PST)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Subject": "[PULL 19/32] hw/intc/arm_gicv3: Initialise dma_as in GIC, not ITS",
        "Date": "Fri, 28 Jan 2022 15:29:56 +0000",
        "Message-Id": "<20220128153009.2467560-20-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220128153009.2467560-1-peter.maydell@linaro.org>",
        "References": "<20220128153009.2467560-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Host-Lookup-Failed": "Reverse DNS lookup failed for 2a00:1450:4864:20::42c\n (failed)",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::42c;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com",
        "X-Spam_score_int": "-12",
        "X-Spam_score": "-1.3",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.3 / 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 PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001,\n T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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\"\n <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "In our implementation, all ITSes connected to a GIC share a single\nAddressSpace, which we keep in the GICv3State::dma_as field and\ninitialized based on the GIC's 'sysmem' property. The right place\nto set it up by calling address_space_init() is therefore in the\nGIC's realize method, not the ITS's realize.\n\nThis fixes a theoretical bug where QEMU hangs on startup if the board\nmodel creates two ITSes connected to the same GIC -- we would call\naddress_space_init() twice on the same AddressSpace*, which creates\nan infinite loop in the QTAILQ that softmmu/memory.c uses to store\nits list of AddressSpaces and causes any subsequent attempt to\niterate through that list to loop forever.  There aren't any board\nmodels like that in the tree at the moment, though.\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nMessage-id: 20220122182444.724087-4-peter.maydell@linaro.org\n---\n hw/intc/arm_gicv3_common.c | 5 +++++\n hw/intc/arm_gicv3_its.c    | 3 ---\n 2 files changed, 5 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c\nindex 9884d2e39b9..579aa0cb9ed 100644\n--- a/hw/intc/arm_gicv3_common.c\n+++ b/hw/intc/arm_gicv3_common.c\n@@ -357,6 +357,11 @@ static void arm_gicv3_common_realize(DeviceState *dev, Error **errp)\n         return;\n     }\n \n+    if (s->lpi_enable) {\n+        address_space_init(&s->dma_as, s->dma,\n+                           \"gicv3-its-sysmem\");\n+    }\n+\n     s->cpu = g_new0(GICv3CPUState, s->num_cpu);\n \n     for (i = 0; i < s->num_cpu; i++) {\ndiff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c\nindex 6d2549e64b1..67f12d98af3 100644\n--- a/hw/intc/arm_gicv3_its.c\n+++ b/hw/intc/arm_gicv3_its.c\n@@ -1194,9 +1194,6 @@ static void gicv3_arm_its_realize(DeviceState *dev, Error **errp)\n \n     gicv3_its_init_mmio(s, &gicv3_its_control_ops, &gicv3_its_translation_ops);\n \n-    address_space_init(&s->gicv3->dma_as, s->gicv3->dma,\n-                       \"gicv3-its-sysmem\");\n-\n     /* set the ITS default features supported */\n     s->typer = FIELD_DP64(s->typer, GITS_TYPER, PHYSICAL, 1);\n     s->typer = FIELD_DP64(s->typer, GITS_TYPER, ITT_ENTRY_SIZE,\n",
    "prefixes": [
        "PULL",
        "19/32"
    ]
}