get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216903,
    "url": "http://patchwork.ozlabs.org/api/patches/2216903/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260327111700.795099-55-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": "<20260327111700.795099-55-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2026-03-27T11:16:49",
    "name": "[v2,54/65] target/arm: Add has_gcie property to enable FEAT_GCIE",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "15636a9cbb8783e745043da1f6829d4ed31af9f1",
    "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/20260327111700.795099-55-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 497750,
            "url": "http://patchwork.ozlabs.org/api/series/497750/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=497750",
            "date": "2026-03-27T11:16:25",
            "name": "arm: Implement an emulation of GICv5 interrupt controller",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/497750/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216903/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216903/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=RFBJH/+D;\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 4fhytG0VQ0z1yFr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 22:22:46 +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 1w65Dk-0001AX-Gd; Fri, 27 Mar 2026 07:19:20 -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 1w65CT-0007RY-Oy\n for qemu-devel@nongnu.org; Fri, 27 Mar 2026 07:18:02 -0400",
            "from mail-wr1-x430.google.com ([2a00:1450:4864:20::430])\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 1w65CN-0008VI-Ag\n for qemu-devel@nongnu.org; Fri, 27 Mar 2026 07:17:59 -0400",
            "by mail-wr1-x430.google.com with SMTP id\n ffacd0b85a97d-43b5bded412so1432756f8f.0\n for <qemu-devel@nongnu.org>; Fri, 27 Mar 2026 04:17:54 -0700 (PDT)",
            "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43b919cf2b2sm15484227f8f.18.2026.03.27.04.17.52\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Mar 2026 04:17:52 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1774610273; x=1775215073; 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=RE5bgzAjVOacUgbbD9Z/UDipABb/jWxn6hy30QQZTF0=;\n b=RFBJH/+D0U6+/9cyZYFrC/4PcQVnTSGJ4DaD2l5O4o2am4oix/9QNyzLDOAqQ5fymm\n Q9qb9rrQaPHkNkwXoJFvjPAptfECYHEANrlgyzKeNjGPIPl1N08D6dRprC/mAAfDkHzy\n BNDZzMdebW9k5EnZBTNLXRhwkUvHNFa/qIc0KcUKAxQawNjz1z0zWZh+A2qq3qvlRLsa\n m5LeipLXe+ZmGKsp33w8XmqzbE83a+7Qk8pyCCNSbv+DLDEN3djig0Fffe91V14tiYzE\n QUsRQj/PMD0tWPm6SeKk4wWIX12xYPJoVeI7cFfIasPUOAHFp74Oq2xZ4fLIEHUNefjq\n 6E2A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774610273; x=1775215073;\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=RE5bgzAjVOacUgbbD9Z/UDipABb/jWxn6hy30QQZTF0=;\n b=RBv6wH2nrurtIECK2O6NkhwWA2FnbI9vPn7BLy3v0uDwa3/F1HMs0278tgz38cYi0b\n zE7RnYebCWXFB5+vDf5gcAcv7kSlVKyt+b0f2BX1G56MKI4x/bKghrXDSfS2EQzAjraH\n 7kAy/yh/Emc+6qh1Ls1iY2oRfYOX/FhW6hsXwNyzi3dpSHM/lga8h5OLQ7qM+tFNbiOq\n SxH5nUGFlEfBFAqLnyY1It2qop7nopQ0M/VRELCwiucAJTuF2Acj55FNs7GLUXZ6NnXm\n tbzq71v/58DFZniGOxU0rKAtWZo5cFAShj4mxUn+vEWTZ465Pk4JZQ/2mNnZxflpcwhH\n soTA==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCX76+dJvWFsPYymrnwS1SCH4VR7uFPui/n2SLSihybJL1L9SEyTsCP1MjUj6TSqN2rTAHvkE4WWsCwT@nongnu.org",
        "X-Gm-Message-State": "AOJu0Yy3I8PF5a441G153LijPvmyTyFcRk8tyFUx/P7QVO5aCaxFKH2P\n mhNJb0Jw+0v6dlNeYq5dkLxETfCNEIJobHCtrIHsvS9Mhqxva0Eu2dY0j9LOZg98suI=",
        "X-Gm-Gg": "ATEYQzxWyRaJb+h2sAULKehHbi/lqk/rysryyVUOlnRsEzbdYpIsvwhOblmRlQz0NIN\n TxNMarwHwnRb5cRauhugG9boSd3Y6QO165Bdqb86AXJtb4U1aqVyO6ITHk0EKaTt87bPQR6hrYf\n +WNVeuh3Pa7ZEPFMgm8GdHxg/e5qWvQL64vnfi/Wzzl0liiXsAsqw+/7CAW0ddpcDlFUsK7gMgc\n 5wK2J5weHRkXo7e7CYISTHLUQ44lIDMc4XlcJg0V2DWs64ODF2BZzxOCRnuKG7ou6sS8rJ8sH9Q\n IHBslQ5YUnGBonCSm/qdjoIo2iDauqhG2QA3YQNxhzdodBQO/N6MWhOWBK6gF1yfhV2OV0BD198\n SN0zDrDay/ut7bMdCmP5hhbJ5M2vKr3zJFnY3oODjabKrKRbiyhiMlzCCmnGFy2OUw9D81TgDrA\n gm5awl1OEppuY0qAoSuh/6sYDvrlxkYCJk85/v90Cnp5aGDc06S5pnI46UCxhWNSPds69yy5COR\n tT3yx2wAeEVB7qBBOHz0OW7ZAq95Tk=",
        "X-Received": "by 2002:a05:6000:4027:b0:43a:580:f60d with SMTP id\n ffacd0b85a97d-43b9ea4a5b4mr3266355f8f.35.1774610273421;\n Fri, 27 Mar 2026 04:17:53 -0700 (PDT)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-arm@nongnu.org,\n\tqemu-devel@nongnu.org",
        "Cc": "Jonathan Cameron <jonathan.cameron@huawei.com>",
        "Subject": "[PATCH v2 54/65] target/arm: Add has_gcie property to enable\n FEAT_GCIE",
        "Date": "Fri, 27 Mar 2026 11:16:49 +0000",
        "Message-ID": "<20260327111700.795099-55-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260327111700.795099-1-peter.maydell@linaro.org>",
        "References": "<20260327111700.795099-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::430;\n envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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=unavailable 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": "Add a has_gcie QOM property to the CPU which allows the board code to\nenable FEAT_GCIE, the GICv5 CPU interface.\n\nEnabling the GICv5 CPU interface comes with a significant\nrestriction: because the GICv5 architecture is Armv9, it assumes the\nArmv9 requirement that only EL0 (userspace) may be in AArch32.  So\nthere are no GIC control system registers defined for AArch32.  We\nforce AArch32 at ELs 1, 2 and 3 to disabled, to avoid a guest being\nable to get into an EL where interrupts are completely broken.\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\nReviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>\n---\n target/arm/cpu-features.h |  5 +++++\n target/arm/cpu.c          | 45 +++++++++++++++++++++++++++++++++++++++\n target/arm/cpu.h          |  2 ++\n 3 files changed, 52 insertions(+)",
    "diff": "diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h\nindex e391b394ba..c0ba56f244 100644\n--- a/target/arm/cpu-features.h\n+++ b/target/arm/cpu-features.h\n@@ -1072,6 +1072,11 @@ static inline bool isar_feature_aa64_aa32_el2(const ARMISARegisters *id)\n     return FIELD_EX64_IDREG(id, ID_AA64PFR0, EL2) >= 2;\n }\n \n+static inline bool isar_feature_aa64_aa32_el3(const ARMISARegisters *id)\n+{\n+    return FIELD_EX64_IDREG(id, ID_AA64PFR0, EL3) >= 2;\n+}\n+\n static inline bool isar_feature_aa64_ras(const ARMISARegisters *id)\n {\n     return FIELD_EX64_IDREG(id, ID_AA64PFR0, RAS) != 0;\ndiff --git a/target/arm/cpu.c b/target/arm/cpu.c\nindex ceb303a55a..21c2953501 100644\n--- a/target/arm/cpu.c\n+++ b/target/arm/cpu.c\n@@ -1197,6 +1197,9 @@ static const Property arm_cpu_has_el2_property =\n \n static const Property arm_cpu_has_el3_property =\n             DEFINE_PROP_BOOL(\"has_el3\", ARMCPU, has_el3, true);\n+\n+static const Property arm_cpu_has_gcie_property =\n+            DEFINE_PROP_BOOL(\"has_gcie\", ARMCPU, has_gcie, false);\n #endif\n \n static const Property arm_cpu_cfgend_property =\n@@ -1425,6 +1428,11 @@ static void arm_cpu_post_init(Object *obj)\n         object_property_add_uint64_ptr(obj, \"rvbar\",\n                                        &cpu->rvbar_prop,\n                                        OBJ_PROP_FLAG_READWRITE);\n+\n+        /* We only allow GICv5 on a 64-bit v8 CPU */\n+        if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {\n+            qdev_property_add_static(DEVICE(obj), &arm_cpu_has_gcie_property);\n+        }\n     }\n \n     if (arm_feature(&cpu->env, ARM_FEATURE_EL3)) {\n@@ -1699,6 +1707,12 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)\n                        current_accel_name());\n             return;\n         }\n+        if (cpu->has_gcie) {\n+            error_setg(errp,\n+                       \"Cannot enable %s when guest CPU has GICv5 enabled\",\n+                       current_accel_name());\n+            return;\n+        }\n     }\n #endif\n \n@@ -2022,6 +2036,37 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)\n         FIELD_DP32_IDREG(isar, ID_PFR1, VIRTUALIZATION, 0);\n     }\n \n+    /* Report FEAT_GCIE in our ID registers if property was set */\n+    FIELD_DP64_IDREG(isar, ID_AA64PFR2, GCIE, cpu->has_gcie);\n+    if (cpu_isar_feature(aa64_gcie, cpu)) {\n+        if (!arm_feature(env, ARM_FEATURE_AARCH64)) {\n+            /*\n+             * We only create the have_gcie property for AArch64 CPUs,\n+             * but the user might have tried aarch64=off with has_gcie=on.\n+             */\n+            error_setg(errp, \"Cannot both enable has_gcie and disable aarch64\");\n+            return;\n+        }\n+\n+        /*\n+         * FEAT_GCIE implies Armv9, which implies no AArch32 above EL0.\n+         * Usually we don't strictly insist on this kind of feature\n+         * dependency, but in this case we enforce it, because the\n+         * GICv5 CPU interface has no AArch32 versions of its system\n+         * registers, so interrupts wouldn't work if we allowed AArch32\n+         * in EL1 or above. Downgrade \"AArch32 and AArch64\" to \"AArch64\".\n+         */\n+        if (cpu_isar_feature(aa64_aa32_el3, cpu)) {\n+            FIELD_DP64_IDREG(isar, ID_AA64PFR0, EL3, 1);\n+        }\n+        if (cpu_isar_feature(aa64_aa32_el2, cpu)) {\n+            FIELD_DP64_IDREG(isar, ID_AA64PFR0, EL2, 1);\n+        }\n+        if (cpu_isar_feature(aa64_aa32_el1, cpu)) {\n+            FIELD_DP64_IDREG(isar, ID_AA64PFR0, EL1, 1);\n+        }\n+    }\n+\n     if (cpu_isar_feature(aa64_mte, cpu)) {\n         /*\n          * The architectural range of GM blocksize is 2-6, however qemu\ndiff --git a/target/arm/cpu.h b/target/arm/cpu.h\nindex 651fccd59b..a5f27dfe0f 100644\n--- a/target/arm/cpu.h\n+++ b/target/arm/cpu.h\n@@ -1032,6 +1032,8 @@ struct ArchCPU {\n     bool has_neon;\n     /* CPU has M-profile DSP extension */\n     bool has_dsp;\n+    /* CPU has FEAT_GCIE GICv5 CPU interface */\n+    bool has_gcie;\n \n     /* CPU has memory protection unit */\n     bool has_mpu;\n",
    "prefixes": [
        "v2",
        "54/65"
    ]
}