get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196573,
    "url": "http://patchwork.ozlabs.org/api/patches/2196573/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260215052225.22513-13-mohamed@unpredictable.fr/",
    "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": "<20260215052225.22513-13-mohamed@unpredictable.fr>",
    "list_archive_url": null,
    "date": "2026-02-15T05:22:23",
    "name": "[v3,12/14] whpx: i386: remove CPUID trapping",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "12da428d9480ed77b9d7c90b2c80cd822455c5ae",
    "submitter": {
        "id": 91318,
        "url": "http://patchwork.ozlabs.org/api/people/91318/?format=api",
        "name": "Mohamed Mediouni",
        "email": "mohamed@unpredictable.fr"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260215052225.22513-13-mohamed@unpredictable.fr/mbox/",
    "series": [
        {
            "id": 492201,
            "url": "http://patchwork.ozlabs.org/api/series/492201/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492201",
            "date": "2026-02-15T05:22:12",
            "name": "whpx: x86 updates (2026-02)",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492201/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196573/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196573/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=unpredictable.fr header.i=@unpredictable.fr\n header.a=rsa-sha256 header.s=sig1 header.b=V+H3EiIH;\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 4fDDrL5MKvz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 16:25:22 +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 1vrUbN-0000TK-DR; Sun, 15 Feb 2026 00:23:25 -0500",
            "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 <mohamed@unpredictable.fr>)\n id 1vrUbG-0000RC-GO\n for qemu-devel@nongnu.org; Sun, 15 Feb 2026 00:23:19 -0500",
            "from p-west2-cluster1-host12-snip4-9.eps.apple.com ([57.103.68.42]\n helo=outbound.mr.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 1vrUbE-0004vC-T4\n for qemu-devel@nongnu.org; Sun, 15 Feb 2026 00:23:18 -0500",
            "from outbound.mr.icloud.com (unknown [127.0.0.2])\n by p00-icloudmta-asmtp-us-west-2a-60-percent-1 (Postfix) with ESMTPS id\n 31DC118003A7; Sun, 15 Feb 2026 05:23:14 +0000 (UTC)",
            "from localhost.localdomain (unknown [17.57.152.38])\n by p00-icloudmta-asmtp-us-west-2a-60-percent-1 (Postfix) with ESMTPSA id\n AF9C61800130; Sun, 15 Feb 2026 05:23:10 +0000 (UTC)"
        ],
        "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr;\n s=sig1; t=1771132995; x=1773724995;\n bh=O7pcpgfwM6ECBoMunj3RQ37ql2fZKOaaMfhrgMDZZG8=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme;\n b=V+H3EiIHq4ceFbiZlKzllaTMFafv9RxpgXbfuq7MXlbcpNkugft882HcYf3CbfH+XXX57z7Vy+D/DNRP+4P9YclPPzBs6zhEmSRbIBZemzD9N6ZryHJumNdiFJhoPlkoZwn7Kk5vYXmC7plMRXoiwMHKtZBbFYmjrX1MfkjOWTKaPcEApAccZ55nhR+9hR2pscQKFHKjBpEyE/a6xM48rnfjxIYr1CWDOV+PyD9Azq59ysvhjmDkEZw+/6aIHYVd3+a6OnY0Ne9A1uJAX6OSIEytJP20REWENsu3liYBhHVtvUcSZogOWHKeupsAjGiGA6frPXUFf7rzEGkwyHfaYA==",
        "mail-alias-created-date": "1752046281608",
        "From": "Mohamed Mediouni <mohamed@unpredictable.fr>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Phil Dennis-Jordan <phil@philjordan.eu>,\n Bernhard Beschow <shentey@gmail.com>, Cameron Esfahani <dirty@apple.com>,\n Magnus Kulke <magnuskulke@linux.microsoft.com>, qemu-arm@nongnu.org,\n Peter Maydell <peter.maydell@linaro.org>,\n Roman Bolshakov <rbolshakov@ddn.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Mohamed Mediouni <mohamed@unpredictable.fr>,\n Pedro Barbuda <pbarbuda@microsoft.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, =?utf-8?q?Marc?=\n\t=?utf-8?q?-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Magnus Kulke <magnus.kulke@linux.microsoft.com>, =?utf-8?q?Philippe_Mathieu?=\n\t=?utf-8?q?-Daud=C3=A9?= <philmd@linaro.org>, Wei Liu <wei.liu@kernel.org>,\n Zhao Liu <zhao1.liu@intel.com>",
        "Subject": "[PATCH v3 12/14] whpx: i386: remove CPUID trapping",
        "Date": "Sun, 15 Feb 2026 06:22:23 +0100",
        "Message-ID": "<20260215052225.22513-13-mohamed@unpredictable.fr>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260215052225.22513-1-mohamed@unpredictable.fr>",
        "References": "<20260215052225.22513-1-mohamed@unpredictable.fr>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Proofpoint-ORIG-GUID": "0yhWO3b1wymaNyFh3BYtVTMRrhoiHykv",
        "X-Authority-Info-Out": "v=2.4 cv=aKv9aL9m c=1 sm=1 tr=0 ts=69915843\n cx=c_apl:c_apl_out:c_pps a=9OgfyREA4BUYbbCgc0Y0oA==:117\n a=9OgfyREA4BUYbbCgc0Y0oA==:17 a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=Gk9p9Fe9aJpBGj35TJ8A:9",
        "X-Proofpoint-GUID": "0yhWO3b1wymaNyFh3BYtVTMRrhoiHykv",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjE1MDAzNiBTYWx0ZWRfX8p7gwqrpbIkj\n 1eIB2G5IoboIxDVCTYuo9twvVtqce/oLyqwKhQGapqrxzmi3M/TT9ArHq4jrRC1qTgIWHWIvc9t\n cDcOYHJ25qzx7Yu+oSFfEMsF6cbAuURTj8elGWTdFY3OuvDPRvJ/YmlFh8kDCprHc6/bX9AhMSY\n nJPVwwhA1TElRL0dW+HIQmDoasY974vnmeXT5jPDmhuH3cGURBsx9EPJ3NxbxV9Wooxl6W5XbGW\n vSOJZRc89Xv0MKvX9GIiQYm37jjy0ktc/LGTDOkwb4BSAfvYTrJNql14xkhavF9/xuTnMkJX+UM\n JyiS81BE+sWIsKqvPcsXLfVskrt0CCfl6vw2QQU7Zz+vgodIh5vMXRfNj99IUI=",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-02-15_02,2026-02-13_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 phishscore=0\n mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0\n lowpriorityscore=0 malwarescore=0 mlxlogscore=999 clxscore=1030\n classifier=spam authscore=0 adjust=0 reason=mlx scancount=1\n engine=8.22.0-2601150000 definitions=main-2602150036",
        "X-JNJ": "\n AAAAAAABEyOedJHujD+k9CKdEUXNGA9xV8hhQUo29GgJvcl15sjUKPJbZgBegLGUC+gC8K3zZW0fTzeAcir5pmDR21boHPZsKbxF2OuT+MI8dsfo9JvbE2EjrldqFU1d1onznLrGw05MXI4ZjCkQubmD4TzHpMe3kluz8aAVI0Bep0ifb3LOkrhZSfA9zZ6x64mP1+kGQhg94o4+bmGhSchsbNL1zTkeEN8oRq3xx75fjTaxTk29iBb3xXgHaKd6qFA0sJcrzSy16OzLqMCguAwZjcvEICaX2Wj+6+uqobgNPMpnqAxDwNF1ikBNZLqb7zhSTuW83T1MuFSSAxIfxi6JBYtX3lN72QlWOb4XRh/y1zwluoJE8jVojxMaRP1Q+v3uDDWkoxSGqKn5uRdWJIHCcr2mXfmJdIhYmRWhO85wytbDX7cMpU2e8bNE2fpYf5hQ4cFsTDx21iIsW62GZGObCqf7cFoL29fp0jqg2Lns869Xtq9hv+NuOdirDzM3fL0eCjT3TB8nl0OYahq6uksQAY1zzT3mUG76+7tQwCInWjl6AAglHLfSMET68sKQaCxv+0/laRvuqi4PpZcZacRN6ggmiqJ4V1TDVFKZfLXjxAfdcIm51pzenuDtgPSdxWlW1ZOOW+eXRJx7Df1ATK71C22CugRdmmT4ta4W0wgM4yfVPhJUmokaL0S7LIw80YyEcEg0b8bTHmPcA5/FaJRFaIwS/YhhEBlwiqPP0GS8EgnEzvqOXuVVSaMtVSchL4WNeYQ/hL3PkcjV+3R7uv7AycjgFQWuivgcTagTS1putTlWuHSptIi50F7lktoM4jZXbv5V",
        "Received-SPF": "pass client-ip=57.103.68.42;\n envelope-from=mohamed@unpredictable.fr; helo=outbound.mr.icloud.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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n 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": "Very partial in its current state and results in significantly inconsistent\nCPUID data. Remove it until it's reimplemented later.\n\nSigned-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\n---\n target/i386/whpx/whpx-all.c | 104 ------------------------------------\n 1 file changed, 104 deletions(-)",
    "diff": "diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c\nindex e815ca9bfa..0e8fb0e72e 100644\n--- a/target/i386/whpx/whpx-all.c\n+++ b/target/i386/whpx/whpx-all.c\n@@ -1793,75 +1793,6 @@ int whpx_vcpu_run(CPUState *cpu)\n             ret = 0;\n             break;\n         }\n-        case WHvRunVpExitReasonX64Cpuid: {\n-            WHV_REGISTER_VALUE reg_values[5];\n-            WHV_REGISTER_NAME reg_names[5];\n-            UINT32 reg_count = 5;\n-            UINT64 cpuid_fn, rip = 0, rax = 0, rcx = 0, rdx = 0, rbx = 0;\n-            X86CPU *x86_cpu = X86_CPU(cpu);\n-            CPUX86State *env = &x86_cpu->env;\n-\n-            memset(reg_values, 0, sizeof(reg_values));\n-\n-            rip = vcpu->exit_ctx.VpContext.Rip +\n-                  vcpu->exit_ctx.VpContext.InstructionLength;\n-            cpuid_fn = vcpu->exit_ctx.CpuidAccess.Rax;\n-\n-            /*\n-             * Ideally, these should be supplied to the hypervisor during VCPU\n-             * initialization and it should be able to satisfy this request.\n-             * But, currently, WHPX doesn't support setting CPUID values in the\n-             * hypervisor once the partition has been setup, which is too late\n-             * since VCPUs are realized later. For now, use the values from\n-             * QEMU to satisfy these requests, until WHPX adds support for\n-             * being able to set these values in the hypervisor at runtime.\n-             */\n-            cpu_x86_cpuid(env, cpuid_fn, 0, (UINT32 *)&rax, (UINT32 *)&rbx,\n-                (UINT32 *)&rcx, (UINT32 *)&rdx);\n-            switch (cpuid_fn) {\n-            case 0x40000000:\n-                /* Expose the vmware cpu frequency cpuid leaf */\n-                rax = 0x40000010;\n-                rbx = rcx = rdx = 0;\n-                break;\n-\n-            case 0x40000010:\n-                rax = env->tsc_khz;\n-                rbx = env->apic_bus_freq / 1000; /* Hz to KHz */\n-                rcx = rdx = 0;\n-                break;\n-\n-            case 0x80000001:\n-                /* Remove any support of OSVW */\n-                rcx &= ~CPUID_EXT3_OSVW;\n-                break;\n-            }\n-\n-            reg_names[0] = WHvX64RegisterRip;\n-            reg_names[1] = WHvX64RegisterRax;\n-            reg_names[2] = WHvX64RegisterRcx;\n-            reg_names[3] = WHvX64RegisterRdx;\n-            reg_names[4] = WHvX64RegisterRbx;\n-\n-            reg_values[0].Reg64 = rip;\n-            reg_values[1].Reg64 = rax;\n-            reg_values[2].Reg64 = rcx;\n-            reg_values[3].Reg64 = rdx;\n-            reg_values[4].Reg64 = rbx;\n-\n-            hr = whp_dispatch.WHvSetVirtualProcessorRegisters(\n-                whpx->partition, cpu->cpu_index,\n-                reg_names,\n-                reg_count,\n-                reg_values);\n-\n-            if (FAILED(hr)) {\n-                error_report(\"WHPX: Failed to set CpuidAccess state registers,\"\n-                             \" hr=%08lx\", hr);\n-            }\n-            ret = 0;\n-            break;\n-        }\n         case WHvRunVpExitReasonException:\n             whpx_get_registers(cpu);\n \n@@ -2015,26 +1946,6 @@ int whpx_init_vcpu(CPUState *cpu)\n         }\n     }\n \n-    /*\n-     * If the vmware cpuid frequency leaf option is set, and we have a valid\n-     * tsc value, trap the corresponding cpuid's.\n-     */\n-    if (x86_cpu->vmware_cpuid_freq && env->tsc_khz) {\n-        UINT32 cpuidExitList[] = {1, 0x80000001, 0x40000000, 0x40000010};\n-\n-        hr = whp_dispatch.WHvSetPartitionProperty(\n-                whpx->partition,\n-                WHvPartitionPropertyCodeCpuidExitList,\n-                cpuidExitList,\n-                RTL_NUMBER_OF(cpuidExitList) * sizeof(UINT32));\n-\n-        if (FAILED(hr)) {\n-            error_report(\"WHPX: Failed to set partition CpuidExitList hr=%08lx\",\n-                        hr);\n-            ret = -EINVAL;\n-            goto error;\n-        }\n-    }\n \n     vcpu->interruptable = true;\n     cpu->vcpu_dirty = true;\n@@ -2071,7 +1982,6 @@ int whpx_accel_init(AccelState *as, MachineState *ms)\n     WHV_CAPABILITY whpx_cap;\n     UINT32 whpx_cap_size;\n     WHV_PARTITION_PROPERTY prop;\n-    UINT32 cpuidExitList[] = {1, 0x80000001};\n     WHV_CAPABILITY_FEATURES features = {0};\n \n     whpx = &whpx_global;\n@@ -2181,7 +2091,6 @@ int whpx_accel_init(AccelState *as, MachineState *ms)\n     /* Register for MSR and CPUID exits */\n     memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY));\n     prop.ExtendedVmExits.X64MsrExit = 1;\n-    prop.ExtendedVmExits.X64CpuidExit = 1;\n     prop.ExtendedVmExits.ExceptionExit = 1;\n     if (whpx_irqchip_in_kernel()) {\n         prop.ExtendedVmExits.X64ApicInitSipiExitTrap = 1;\n@@ -2198,19 +2107,6 @@ int whpx_accel_init(AccelState *as, MachineState *ms)\n         goto error;\n     }\n \n-    hr = whp_dispatch.WHvSetPartitionProperty(\n-        whpx->partition,\n-        WHvPartitionPropertyCodeCpuidExitList,\n-        cpuidExitList,\n-        RTL_NUMBER_OF(cpuidExitList) * sizeof(UINT32));\n-\n-    if (FAILED(hr)) {\n-        error_report(\"WHPX: Failed to set partition CpuidExitList hr=%08lx\",\n-                     hr);\n-        ret = -EINVAL;\n-        goto error;\n-    }\n-\n     /*\n      * We do not want to intercept any exceptions from the guest,\n      * until we actually start debugging with gdb.\n",
    "prefixes": [
        "v3",
        "12/14"
    ]
}