get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230494,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230494/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429190532.26538-8-mohamed@unpredictable.fr/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": ""
    },
    "msgid": "<20260429190532.26538-8-mohamed@unpredictable.fr>",
    "date": "2026-04-29T19:05:24",
    "name": "[v21,07/15] hvf: gate ARM_FEATURE_PMU register emulation when using the Apple vGIC",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e6e6604d021aedbc16fb16479fcc4da4bd4aea3b",
    "submitter": {
        "id": 91318,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/91318/?format=api",
        "name": "Mohamed Mediouni",
        "email": "mohamed@unpredictable.fr"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260429190532.26538-8-mohamed@unpredictable.fr/mbox/",
    "series": [
        {
            "id": 502138,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502138/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502138",
            "date": "2026-04-29T19:05:29",
            "name": "HVF: Add support for platform vGIC and nested virtualisation",
            "version": 21,
            "mbox": "http://patchwork.ozlabs.org/series/502138/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230494/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230494/checks/",
    "tags": {},
    "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=unpredictable.fr header.i=@unpredictable.fr\n header.a=rsa-sha256 header.s=sig1 header.b=VgAXrGmd;\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 4g5Rfr4S4gz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 05:08:52 +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 1wIAEa-0001ne-5w; Wed, 29 Apr 2026 15:06:08 -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 <mohamed@unpredictable.fr>)\n id 1wIAEY-0001mu-Pi\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 15:06:06 -0400",
            "from p-west3-cluster3-host8-snip4-10.eps.apple.com ([57.103.72.211]\n helo=outbound.ms.icloud.com)\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <mohamed@unpredictable.fr>)\n id 1wIAEU-0000NP-AY\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 15:06:06 -0400",
            "from outbound.ms.icloud.com (unknown [127.0.0.2])\n by p00-icloudmta-asmtp-us-west-3a-60-percent-6 (Postfix) with ESMTPS id\n BBDC718000C5; Wed, 29 Apr 2026 19:05:58 +0000 (UTC)",
            "from localhost.localdomain (unknown [17.57.154.37])\n by p00-icloudmta-asmtp-us-west-3a-60-percent-6 (Postfix) with ESMTPSA id\n A0DBA18002E8; Wed, 29 Apr 2026 19:05:55 +0000 (UTC)"
        ],
        "X-ICL-Out-Info": "\n HUtFAUMHWwJACUgBTUQeDx5WFlZNRAJCTQFIHV8DWRxBAUkdXw9LVxQEFVwFVgZXFHkNXR1FDlYZWgxSD1sOHBZLWFUJCgZdGFgVVgl3HlwASx1XBFQfUxJVHR0LRUtAEwRJB01fDl4fBBdGGVUERx5dVl4eGQJRHFYNV0NUBF9QSQxBUGxaAEcXSB1dGVlvUF0cDhhZG0AVXRFQGVYJXhUXHkFNWgJWTQVKA18BWwZCAEkKXQJYAF4LTgZeD0YKXVQXWwxaDlYwTBZDH1IPWxNNGVEBUkVUAgdYRxRHDg8TTAtHAlo0Vh9UGVoD",
        "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr;\n s=sig1; t=1777489561; x=1780081561;\n bh=okJ5cnEaqKHvGtSWn7uQC28UhrgcqlO+u8jRZ447zdE=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:x-icloud-hme;\n b=VgAXrGmd1RTg8i3p3hCpPBig9F502cQ/mJZB2JYBCI+ja2OIwaOFlfF+rnJwEDgTnmYky3bIBQC4+N/kjn7XN2PZfbZ46KzvEscj+xWzvgLm2W/S7GhQq9y9BRwpI7Fo3oE4qgPz3APP2Oc2pNJl0mc97vydaqX3XZP7dWv2o5CWOFUxp4kp3S0LZf+XMxf+v4/9jUxZvrofdjyXgMmi2q8GAnfGO3ernimcxiLAZsOKdbaKSkcnnWf5uY4L/XylxB6pfoWBdDDyk+BIlzavqgqTeKOzFtluUo+wn+pFTsWgt6TAYIPZHUv02zlaW/XunrXgtYeGY2rBrjqAL1rymA==",
        "mail-alias-created-date": "1752046281608",
        "From": "Mohamed Mediouni <mohamed@unpredictable.fr>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Phil Dennis-Jordan <phil@philjordan.eu>,\n Yanan Wang <wangyanan55@huawei.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Roman Bolshakov <rbolshakov@ddn.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n qemu-arm@nongnu.org, Zhao Liu <zhao1.liu@intel.com>,\n Alexander Graf <agraf@csgraf.de>, Eduardo Habkost <eduardo@habkost.net>,\n Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,\n Peter Maydell <peter.maydell@linaro.org>,\n Mohamed Mediouni <mohamed@unpredictable.fr>,\n Manos Pitsidianakis <manos.pitsidianakis@linaro.org>",
        "Subject": "[PATCH v21 07/15] hvf: gate ARM_FEATURE_PMU register emulation when\n using the Apple vGIC",
        "Date": "Wed, 29 Apr 2026 21:05:24 +0200",
        "Message-ID": "<20260429190532.26538-8-mohamed@unpredictable.fr>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260429190532.26538-1-mohamed@unpredictable.fr>",
        "References": "<20260429190532.26538-1-mohamed@unpredictable.fr>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Authority-Info-Out": "v=2.4 cv=bcFmkePB c=1 sm=1 tr=0 ts=69f25698\n cx=c_apl:c_pps:t_out a=qkKslKyYc0ctBTeLUVfTFg==:117 a=IkcTkHD0fZMA:10\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=KKAkSRfTAAAA:8\n a=TzKBU_9rahY9vEVlUJ4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=cvBusfyB2V15izCimMoJ:22",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDI5MDE5MCBTYWx0ZWRfX+BvahotabncE\n lBg+pkYd+AW5Rzfmt63auj8IxV5kcXijmSMigjf5w7ihkwSusAJGrl0yuZzQWkWfdNUgOIzI/0U\n GBvJMfUuFCaqaVqfk1aFzFIreMTnaNKQsck+OQPXGGxlbGjDxiZzFZui0qdrZcY2LJJihi3VAk+\n p18Z4k9gMCux3ym2TpcAt6odOvZDSgwcYUQP6pG95FcxilQ47mlObd9xnI4XOpBQPjQSN8aQqL2\n PurW2yL2uGZwIP+HD4HobxH7anyN6izH2YgbdKpgKckPlCH5+xdQow4pPCt3KzvP79VIi/wWEA+\n R856341yxTFhJS/YgHANn/GpxiOv3QjTrJBDRfyxYm69ZsqrVQsti8yld8f8O4=",
        "X-Proofpoint-GUID": "P_1tUE1L_zcqw_geOAwAWCtloDsnZgfZ",
        "X-Proofpoint-ORIG-GUID": "P_1tUE1L_zcqw_geOAwAWCtloDsnZgfZ",
        "Received-SPF": "pass client-ip=57.103.72.211;\n envelope-from=mohamed@unpredictable.fr; helo=outbound.ms.icloud.com",
        "X-Spam_score_int": "-27",
        "X-Spam_score": "-2.8",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-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": "From Apple documentation:\n\n> When EL2 is disabled, PMU register accesses trigger \"Trapped MSR, MRS, or\n> System Instruction\" exceptions. When this happens, hv_vcpu_run() returns, and the\n>  hv_vcpu_exit_t object contains the information about this exception.\n\n> When EL2 is enabled, the handling of PMU register accesses is determined by the PMUVer\n> field of ID_AA64DFR0_EL1 register.\n> If the PMUVer field value is zero or is invalid, PMU register accesses generate \"Undefined\"\n> exceptions, which are sent to the guest.\n> If the PMUVer field value is non-zero and valid, PMU register accesses are emulated by the framework.\n> The ID_AA64DFR0_EL1 register can be modified via hv_vcpu_set_sys_reg API.\n\nHowever, despite what that documentation says this is actually gated on using the Apple vGIC\ninstead of nested virtualisation per se. Apple introduced both at the same time.\n\nSigned-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\nReviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>\n---\n target/arm/hvf/hvf.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c\nindex fa0a22fdc3..9d64f2e1a5 100644\n--- a/target/arm/hvf/hvf.c\n+++ b/target/arm/hvf/hvf.c\n@@ -1601,7 +1601,7 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t reg, uint64_t *val)\n     ARMCPU *arm_cpu = ARM_CPU(cpu);\n     CPUARMState *env = &arm_cpu->env;\n \n-    if (arm_feature(env, ARM_FEATURE_PMU)) {\n+    if (!hvf_irqchip_in_kernel() && arm_feature(env, ARM_FEATURE_PMU)) {\n         switch (reg) {\n         case SYSREG_PMCR_EL0:\n             *val = env->cp15.c9_pmcr;\n@@ -1862,7 +1862,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t reg, uint64_t val)\n                            SYSREG_OP2(reg),\n                            val);\n \n-    if (arm_feature(env, ARM_FEATURE_PMU)) {\n+    if (!hvf_irqchip_in_kernel() && arm_feature(env, ARM_FEATURE_PMU)) {\n         switch (reg) {\n         case SYSREG_PMCCNTR_EL0:\n             pmu_op_start(env);\n",
    "prefixes": [
        "v21",
        "07/15"
    ]
}