get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196192,
    "url": "http://patchwork.ozlabs.org/api/patches/2196192/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260213034556.13471-10-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": "<20260213034556.13471-10-mohamed@unpredictable.fr>",
    "list_archive_url": null,
    "date": "2026-02-13T03:45:52",
    "name": "[v2,09/10] 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/20260213034556.13471-10-mohamed@unpredictable.fr/mbox/",
    "series": [
        {
            "id": 492055,
            "url": "http://patchwork.ozlabs.org/api/series/492055/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=492055",
            "date": "2026-02-13T03:45:43",
            "name": "whpx: x86 updates (2026-02)",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/492055/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196192/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196192/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=HKX1N/ct;\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 4fBym63PWWz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 14:47:18 +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 1vqk8g-0008NU-53; Thu, 12 Feb 2026 22:46:42 -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 1vqk8e-0008NH-K6\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 22:46:40 -0500",
            "from p-west1-cluster4-host7-snip4-10.eps.apple.com ([57.103.65.181]\n helo=outbound.pv.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 1vqk8c-0005tR-Ux\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 22:46:40 -0500",
            "from outbound.pv.icloud.com (unknown [127.0.0.2])\n by p00-icloudmta-asmtp-us-west-1a-60-percent-11 (Postfix) with ESMTPS id\n 32F3918002E6; Fri, 13 Feb 2026 03:46:36 +0000 (UTC)",
            "from localhost.localdomain (unknown [17.56.9.36])\n by p00-icloudmta-asmtp-us-west-1a-60-percent-11 (Postfix) with ESMTPSA id\n AFA3418002E3; Fri, 13 Feb 2026 03:46:32 +0000 (UTC)"
        ],
        "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr;\n s=sig1; t=1770954397; x=1773546397;\n bh=O7pcpgfwM6ECBoMunj3RQ37ql2fZKOaaMfhrgMDZZG8=;\n h=From:To:Subject:Date:Message-ID:MIME-Version:x-icloud-hme;\n b=HKX1N/ctpSFpQm5Pv8ph8yltbWwOmZxD/0KcLWvBjp05vbfeTPgZ8aFmNMn/sPBSs+AzO7OjVIyEEunXDzdASXp7IzVfRYVMjRwhqpWyCvqJuHXtNbUrsRGxHEqO4qEO8DiRoxtmqs0BhgiHVkNPSuXkApV4OHte3JCXb8q72tny3Hd4C/HTrKyl1AcE3iN21IghVZ8qbm4iQWt5RzTA6uio3TwkieR3k2kMvZK6Kyk1IfqI3l7KkGIPzoj5MrBd6wtAWZ6AxutLsXE+bqwwV15/Jz0GRA6a0/bphD6qzXruf/5DFX/MF5a1V8JRqyEmhi4bBptcUMMxnDdE6/1oHA==",
        "mail-alias-created-date": "1752046281608",
        "From": "Mohamed Mediouni <mohamed@unpredictable.fr>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n Magnus Kulke <magnuskulke@linux.microsoft.com>, =?utf-8?q?Philippe_Mathieu-?=\n\t=?utf-8?q?Daud=C3=A9?= <philmd@linaro.org>,\n Bernhard Beschow <shentey@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Mohamed Mediouni <mohamed@unpredictable.fr>, Wei Liu <wei.liu@kernel.org>,\n Pedro Barbuda <pbarbuda@microsoft.com>, Cameron Esfahani <dirty@apple.com>,\n Peter Maydell <peter.maydell@linaro.org>,\n Phil Dennis-Jordan <phil@philjordan.eu>, Zhao Liu <zhao1.liu@intel.com>,\n Roman Bolshakov <rbolshakov@ddn.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>",
        "Subject": "[PATCH v2 09/10] whpx: i386: remove CPUID trapping",
        "Date": "Fri, 13 Feb 2026 04:45:52 +0100",
        "Message-ID": "<20260213034556.13471-10-mohamed@unpredictable.fr>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260213034556.13471-1-mohamed@unpredictable.fr>",
        "References": "<20260213034556.13471-1-mohamed@unpredictable.fr>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Proofpoint-ORIG-GUID": "YhtuqlvwhCZrchmbnsjTBi2fEHN3TaqI",
        "X-Authority-Info-Out": "v=2.4 cv=Qahrf8bv c=1 sm=1 tr=0 ts=698e9e9c\n cx=c_apl:c_apl_out:c_pps a=azHRBMxVc17uSn+fyuI/eg==:117\n a=azHRBMxVc17uSn+fyuI/eg==:17 a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22\n a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=Gk9p9Fe9aJpBGj35TJ8A:9",
        "X-Proofpoint-GUID": "YhtuqlvwhCZrchmbnsjTBi2fEHN3TaqI",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjEzMDAyNSBTYWx0ZWRfXyXRz2XQCHypN\n 5o1helNaDarDwUDSsStMza1MgB5yIx37HZIp89WVTIrCQa8Rm0Apk5gl4E7kuDo9/JFh6pl/BPK\n iv0A4EpcKsD3eZZ6gYPdN1CWolLPVaj18H4GmvXmR4n47l/8qyvCS2TfHtnlGMsOiewp9MJj9Pi\n Iki0KopXI1PXGVUARR5h4/uPbkO/gOSr+NEaxQmLdR2Pl2fym8x/utBBKyVBwhhnK8MngPTocuC\n qZ4MlkFMeY2AqKIdmhFziryYYPKO/6RlDxDkfzwOuWLNj7Xut3oUopKo8kXK2mJhmFg9i1o6bNO\n j2zU82+eGtN7Nd1/Wmy0RWYST3CtDWMk/DqRHFgGVho3QB5PAaXEnUh20YVz3k=",
        "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-12_05,2026-02-12_03,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 suspectscore=0\n malwarescore=0 clxscore=1030 bulkscore=0 mlxscore=0\n spamscore=0 phishscore=0\n mlxlogscore=999 adultscore=0 lowpriorityscore=0 classifier=spam authscore=0\n adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000\n definitions=main-2602130025",
        "X-JNJ": "\n AAAAAAABMOmPJv531qsBnQPS1XKoTMDWy5WUdK4LqlpiU/FfBuTamSBc2VIrQ5cIFert3jyErTYlitBOoi/Fc8tTUaaZ5SM5uFI9urPxZNXq5OqEpaiEPVc3zR/abwS8Hz0DyihG5WRgDnDyPIJUO0iCTxGy9XzzQLJ9HAklRoZnRunnq5Ua8ba+tF42BmPSp0s+tIypo6q9CUjMIlIGQQyR217LXLtadmNUctqvhgNia6+cMTw74n64yV1U+n85XysCE1xFCyC3uYU/CxojGB1ouJ0PysqCU8R4AYwSEYGcQfuldWT9bF3FrIK/Sh7yURDgzWWeZDaZOdVM0U9jfXgCw+C1P9zzlD4mZhHiGk7aq5pQJH4q0xY9qGcLHgt9uK/mFqI1DqsDIZrKacbK7pVrKMZ+FqTJZK8Qt7GSZBGfzEcx8OEKaHSgBqCTeOKYaq/dWbVyoMur+eWAiAz8xwhao4Jp1wuSNpKlT/pOiT4tUd2tGTYD8rQvDJIWm5a4z60unXsQ1YN8TpfaY1cfVEL1R0cH4IbNriyqty3dENUAfeCb+nIp8Nj8DkRibCy0jCb/Ey/PIVI4PzdWPly5En/eJKVpTT7U+m4FkPAj84kXneeDDy6hrJRgDAySErhvG9CllPOHX+/+GJJGlL0OoV86z/ceB82FThzGxqBz8io4u17EI7YEDJvWox2KFLxAlEBTPvuXWgMpZnATZp0njX/hxAsp+/bpYsl07MApzvIRkUUvh3J1N4UzRB/NjQ4rIavdiJRTnWLiQNaxfUjpulq4DshXlbzA4UxxdX3HTuX12xKzfCdq",
        "Received-SPF": "pass client-ip=57.103.65.181;\n envelope-from=mohamed@unpredictable.fr; helo=outbound.pv.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_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=ham 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": [
        "v2",
        "09/10"
    ]
}