get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230843,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230843/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260430061333.37905-2-amachhiw@linux.ibm.com/",
    "project": {
        "id": 69,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/69/?format=api",
        "name": "QEMU powerpc development",
        "link_name": "qemu-ppc",
        "list_id": "qemu-ppc.nongnu.org",
        "list_email": "qemu-ppc@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260430061333.37905-2-amachhiw@linux.ibm.com>",
    "date": "2026-04-30T06:13:32",
    "name": "[1/2] hw/ppc/spapr: Do not fallback to raw mode when KVM rejects compat",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8e7293fe4ebc8062916a27fb64e4f8df4f0606af",
    "submitter": {
        "id": 87864,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/87864/?format=api",
        "name": "Amit Machhiwal",
        "email": "amachhiw@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-ppc/patch/20260430061333.37905-2-amachhiw@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 502208,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502208/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-ppc/list/?series=502208",
            "date": "2026-04-30T06:13:32",
            "name": "ppc/kvm: Handle CPU compatibility mode correctly for nested guests",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502208/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230843/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230843/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<qemu-ppc-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=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=E9kEm3Q7;\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-ppc-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 4g5kQh5t2Tz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 16:14:19 +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-ppc-bounces@nongnu.org>)\n\tid 1wIKf4-0002xW-6G; Thu, 30 Apr 2026 02:14:10 -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 <amachhiw@linux.ibm.com>)\n id 1wIKez-0002vi-CN; Thu, 30 Apr 2026 02:14:05 -0400",
            "from mx0b-001b2d01.pphosted.com ([148.163.158.5])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <amachhiw@linux.ibm.com>)\n id 1wIKew-0006GL-Gs; Thu, 30 Apr 2026 02:14:05 -0400",
            "from pps.filterd (m0356516.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63TFUqqp1317126; Thu, 30 Apr 2026 06:14:01 GMT",
            "from ppma22.wdc07v.mail.ibm.com\n (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4drk1jvq79-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Thu, 30 Apr 2026 06:14:00 +0000 (GMT)",
            "from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])\n by ppma22.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 63U6CYqc028392;\n Thu, 30 Apr 2026 06:14:00 GMT",
            "from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228])\n by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4ds8aw1rn5-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Thu, 30 Apr 2026 06:14:00 +0000 (GMT)",
            "from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com\n [10.20.54.102])\n by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63U6Du6D30605936\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Thu, 30 Apr 2026 06:13:56 GMT",
            "from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 5294120043;\n Thu, 30 Apr 2026 06:13:56 +0000 (GMT)",
            "from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id EEECC20040;\n Thu, 30 Apr 2026 06:13:53 +0000 (GMT)",
            "from localhost.localdomain (unknown [9.39.18.70])\n by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP;\n Thu, 30 Apr 2026 06:13:53 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:in-reply-to:message-id\n :mime-version:references:subject:to; s=pp1; bh=I1hsOJZQR2XGOk7WI\n H8LLfPojJ5cB30a2SQsOUbn0oU=; b=E9kEm3Q7SEJCEDJ1Wlqdl6QdDNWO4uaY8\n OdS//P6q2nEKbTXWL+2rNtMTFwtjfyxggppL61EeYYtI5UWMBvRcBcdmlfD5CQJK\n y2N1VvtgbRpleh71LtuxOubno0WH2urEoTofS6n3Ua31cCS6A/UxqC0C8jI6X+Qq\n 4wNeepwqEkPJZEnHVirPuOR/sjAqODKCZvvg7MElfPfm6T6PSuZt5Pn3Ne0Kc9VU\n 3qrGHTsIAMIdSgDK57WksIevioO576aK8EXTOeY0Y2FwS1OMMycwUGq+4jtrq2Di\n vTbkyaS87mxJO339Q+z2BxfbND+IiqdwCqcixLcbcFON55yXfqc+A==",
        "From": "Amit Machhiwal <amachhiw@linux.ibm.com>",
        "To": "qemu-ppc@nongnu.org, Harsh Prateek Bora <harshpb@linux.ibm.com>",
        "Cc": "Amit Machhiwal <amachhiw@linux.ibm.com>,\n Vaibhav Jain <vaibhav@linux.ibm.com>,\n Nicholas Piggin <npiggin@gmail.com>, qemu-devel@nongnu.org",
        "Subject": "[PATCH 1/2] hw/ppc/spapr: Do not fallback to raw mode when KVM\n rejects compat",
        "Date": "Thu, 30 Apr 2026 11:43:32 +0530",
        "Message-ID": "<20260430061333.37905-2-amachhiw@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260430061333.37905-1-amachhiw@linux.ibm.com>",
        "References": "<20260430061333.37905-1-amachhiw@linux.ibm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-Reinject": "loops=2 maxloops=12",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDMwMDA1NSBTYWx0ZWRfX6VCigxYIKKr0\n b/8YiwUEaMyKVkRjAs4p7vcXuyXokQ64IcFPMhrNOabc3SlybJntLquRAQrlcWlUT/fmJQNrRUn\n rczP/whc6ixPACFovwVR/acpuhX9LjL00O5rZWA/BnA22+L/ke4tsok765c0oL7Kxyq9l7YW+Zk\n xhGMGqOz489Hihl1mR96GGysE5dWwRXes/9YSe462JnydwGJOFJItlsYxVqHXA145IqiWfTtEfe\n MP/OJ+Ti/NkqqXhO9bgzXh63+Fo2/fngyPHG9InXz+iN257dXKtPREifB+a8LSk7AnaI7H4hvqp\n 7j2o6OJls3dKPKMHJ2p5dYUmob2nFVBySjTf1X7xnczhDDNZX9lxj1YRbiSK6dDUd5aQfEAkGxd\n hPRbFqIYh1nc9NJAJCxmzwEAMXLwzn3g89zmUJPZjn86okorga66/2gqCbteeDuX/jGVhxR2a7v\n w15vJTXHu5DZXvgDPrA==",
        "X-Proofpoint-GUID": "uyRCmT0r1xCx0KyvyebRTrbDtt7UnBtE",
        "X-Proofpoint-ORIG-GUID": "ZDy38hcoxYTltlot8ycqj1HW3oiC3TMj",
        "X-Authority-Analysis": "v=2.4 cv=MohiLWae c=1 sm=1 tr=0 ts=69f2f329 cx=c_pps\n a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VnNF1IyMAAAA:8 a=i5GS84888sUNcPDMq4UA:9",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-30_01,2026-04-28_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 spamscore=0\n priorityscore=1501 malwarescore=0 clxscore=1015 lowpriorityscore=0\n impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604300055",
        "Received-SPF": "pass client-ip=148.163.158.5;\n envelope-from=amachhiw@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com",
        "X-Spam_score_int": "-26",
        "X-Spam_score": "-2.7",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-ppc@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<qemu-ppc.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-ppc>",
        "List-Post": "<mailto:qemu-ppc@nongnu.org>",
        "List-Help": "<mailto:qemu-ppc-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-ppc>,\n <mailto:qemu-ppc-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "During H_CLIENT_ARCHITECTURE_SUPPORT, QEMU attempts to set the requested\nCPU compatibility mode via ppc_set_compat_all(). If this fails, the\nexisting code may fall back to raw mode when supported by the guest.\n\nThe current logic treats all failures uniformly and tried to fall back\nto raw mode whenever possible. As a result, errors from KVM (e.g.\nkvmppc_set_compat() returning -EINVAL) are silently masked, making\ndebugging difficult and allowing the guest to proceed with an\nunsupported or incompatible configuration.\n\nWhen running with KVM, such failures indicate that the requested\ncompatibility level is not supported by the host. Do not fallback in\nthis case; instead, report the error and fail the CAS negotiation.\n\nThis makes the failure visible to the user and ensures that invalid\ncompatibility requests are rejected early rather than being hidden by\nfallback behavior. For example, the following error is now reported:\n\n  qemu-system-ppc64: Unable to set CPU compatibility mode in KVM: Invalid argument\n\nFixes: cc7b35b169e9 (\"spapr: fallback to raw mode if best compat mode cannot be set during CAS\")\nSigned-off-by: Amit Machhiwal <amachhiw@linux.ibm.com>\n---\n hw/ppc/spapr_hcall.c | 9 +++++++++\n 1 file changed, 9 insertions(+)",
    "diff": "diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c\nindex 032805a8d0db..de2ea6f5e579 100644\n--- a/hw/ppc/spapr_hcall.c\n+++ b/hw/ppc/spapr_hcall.c\n@@ -1204,6 +1204,15 @@ target_ulong do_client_architecture_support(PowerPCCPU *cpu,\n         Error *local_err = NULL;\n \n         if (ppc_set_compat_all(cas_pvr, &local_err) < 0) {\n+            /*\n+             * If KVM rejected the compat mode, do not fallback. This indicates\n+             * the host cannot support the requested level.\n+             */\n+            if (kvm_enabled()) {\n+                error_report_err(local_err);\n+                return H_HARDWARE;\n+            }\n+\n             /* We fail to set compat mode (likely because running with KVM PR),\n              * but maybe we can fallback to raw mode if the guest supports it.\n              */\n",
    "prefixes": [
        "1/2"
    ]
}