get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1585751,
    "url": "http://patchwork.ozlabs.org/api/patches/1585751/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20220128153009.2467560-28-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-28-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2022-01-28T15:30:04",
    "name": "[PULL,27/32] hw/intc/arm_gicv3_its: Make GITS_BASER<n> RAZ/WI for unimplemented registers",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8a262a8a248a7eb83eaff12133c6607bbbcaa606",
    "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-28-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/1585751/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1585751/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=tU+ikKCv;\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 4Jlj2h2V71z9t3b\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 29 Jan 2022 03:04:44 +1100 (AEDT)",
            "from localhost ([::1]:47868 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 1nDTju-0007xG-3A\n\tfor incoming@patchwork.ozlabs.org; Fri, 28 Jan 2022 11:04:42 -0500",
            "from eggs.gnu.org ([209.51.188.92]:57692)\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 1nDTD8-0002Ak-7T\n for qemu-devel@nongnu.org; Fri, 28 Jan 2022 10:30:55 -0500",
            "from [2a00:1450:4864:20::429] (port=36447\n helo=mail-wr1-x429.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 1nDTCz-0006Qn-L2\n for qemu-devel@nongnu.org; Fri, 28 Jan 2022 10:30:45 -0500",
            "by mail-wr1-x429.google.com with SMTP id u15so11596623wrt.3\n for <qemu-devel@nongnu.org>; Fri, 28 Jan 2022 07:30:40 -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.38\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:39 -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=1JzsXBg2hmiS63BFFEiqs4MT5Eh+Id4HFoGGl8loaDA=;\n b=tU+ikKCvVs+Ufbtv+BXouy4l1012O2RW3vL8dAJC004uruZUqDDPKUyFbAf73wkmMH\n EuzjJL0miOIbXeF5gOiKGABX2tfeVYfGVuyW6gkbsyCV3fapCjHoS78mOXi9x20Fmvkw\n q/14KsfOXupxC0mism3AH4eZtmwDYlOZt6H/6LTnCSBnLrLxbTzemuRotal150QCxzIV\n mi4PawNlnjgZXd4eGCYiQAEsLZM88e7Wl19ZKw7TEniT+Mh1r3HXfHjvdUFlEW7ds3Hu\n /6dRbjHJmkwgtTl6I6KfDxVQEdWDOd1hShBi7Hhx3E1MsosbAUrUXyiE+9RoC/+jZaR8\n fzkw==",
        "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=1JzsXBg2hmiS63BFFEiqs4MT5Eh+Id4HFoGGl8loaDA=;\n b=P1rL0LCKFEaDLqD+BU8iWYDlF2I+mromdXhDBAxmmPvjx87Pz1SMmTb05TIkQGCwus\n /Fod4N6VutQrEeXyOfKpzXwCMOvrz1UpoltciyJeikvL0HC2WV6+XJUjG2w9Xw5phpVs\n oY8W3j2QPvY9U1sK8BEIioLAq380nLGl+5hyDIOxFW5byWzDdsEfAe6OQxQyGzQvIFqk\n S+TFLnw9cZ5AOoEMYG3MIRYKcNUGnvTSwPnHUfna0r99CLBzHeIhdneCEYslXlpp1ze2\n qFPOTRFCsQgBGoYGK5iWIKQaYAhvCUl4nSsGnJeKxnbIoe5DApfqTWU7t6w8F+GuhbaE\n i5YQ==",
        "X-Gm-Message-State": "AOAM530jcjfCATH20i+54mYtkitOyUD2Vd2Dx9D4Rh/muuen2ojGG+T0\n GHKxYUu/XW7kC5IIYDtDUph82oC2vKQXOQ==",
        "X-Google-Smtp-Source": "\n ABdhPJxSUJyWTHqN/Z4gEKWD3VF8ILNOO1AANdMfKN847SB8o1/Ko7JZlN9Tx7Cx0zmjQIyvFzsFpw==",
        "X-Received": "by 2002:a05:6000:1884:: with SMTP id\n a4mr7167873wri.509.1643383839428;\n Fri, 28 Jan 2022 07:30:39 -0800 (PST)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Subject": "[PULL 27/32] hw/intc/arm_gicv3_its: Make GITS_BASER<n> RAZ/WI for\n unimplemented registers",
        "Date": "Fri, 28 Jan 2022 15:30:04 +0000",
        "Message-Id": "<20220128153009.2467560-28-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::429\n (failed)",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::429;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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": "The ITS has a bank of 8 GITS_BASER<n> registers, which allow the\nguest to specify the base address of various data tables.  Each\nregister has a read-only type field indicating which table it is for\nand a read-write field where the guest can write in the base address\n(among other things).  We currently allow the guest to write the\nwriteable fields for all eight registers, even if the type field is 0\nindicating \"Unimplemented\".  This means the guest can provoke QEMU\ninto asserting by writing an address into one of these unimplemented\nbase registers, which bypasses the \"if (!value) continue\" check in\nextract_table_params() and lets us hit the assertion that the type\nfield is one of the permitted table types.\n\nPrevent the assertion by not allowing the guest to write to the\nunimplemented base registers. This means their value will remain 0\nand extract_table_params() will ignore them.\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nMessage-id: 20220122182444.724087-12-peter.maydell@linaro.org\n---\n hw/intc/arm_gicv3_its.c | 8 ++++++++\n 1 file changed, 8 insertions(+)",
    "diff": "diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c\nindex b17f2631269..237198845d7 100644\n--- a/hw/intc/arm_gicv3_its.c\n+++ b/hw/intc/arm_gicv3_its.c\n@@ -929,6 +929,10 @@ static bool its_writel(GICv3ITSState *s, hwaddr offset,\n         if (!(s->ctlr & R_GITS_CTLR_ENABLED_MASK)) {\n             index = (offset - GITS_BASER) / 8;\n \n+            if (s->baser[index] == 0) {\n+                /* Unimplemented GITS_BASERn: RAZ/WI */\n+                break;\n+            }\n             if (offset & 7) {\n                 value <<= 32;\n                 value &= ~GITS_BASER_RO_MASK;\n@@ -1025,6 +1029,10 @@ static bool its_writell(GICv3ITSState *s, hwaddr offset,\n          */\n         if (!(s->ctlr & R_GITS_CTLR_ENABLED_MASK)) {\n             index = (offset - GITS_BASER) / 8;\n+            if (s->baser[index] == 0) {\n+                /* Unimplemented GITS_BASERn: RAZ/WI */\n+                break;\n+            }\n             s->baser[index] &= GITS_BASER_RO_MASK;\n             s->baser[index] |= (value & ~GITS_BASER_RO_MASK);\n         }\n",
    "prefixes": [
        "PULL",
        "27/32"
    ]
}