get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231735,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231735/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260501101505.3485916-14-peter.maydell@linaro.org/",
    "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": "<20260501101505.3485916-14-peter.maydell@linaro.org>",
    "date": "2026-05-01T10:14:50",
    "name": "[PULL,13/28] target/arm/kvm: Cache host CPU probe failure",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ca31864d0fef1fd7ace654523b3be143a3f83164",
    "submitter": {
        "id": 5111,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/5111/?format=api",
        "name": "Peter Maydell",
        "email": "peter.maydell@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260501101505.3485916-14-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 502437,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502437/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502437",
            "date": "2026-05-01T10:14:41",
            "name": "[PULL,01/28] hw/arm/fsl-imx8mp: Do not create redundant unimplemented devices",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502437/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231735/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231735/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=oRXoGm9g;\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 4g6Rp61S9rz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 20:18:38 +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 1wIkuI-00042d-Ud; Fri, 01 May 2026 06:15:38 -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 <peter.maydell@linaro.org>)\n id 1wIkuA-000403-9b\n for qemu-devel@nongnu.org; Fri, 01 May 2026 06:15:30 -0400",
            "from mail-wm1-x329.google.com ([2a00:1450:4864:20::329])\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 1wIku8-0000AB-Dh\n for qemu-devel@nongnu.org; Fri, 01 May 2026 06:15:29 -0400",
            "by mail-wm1-x329.google.com with SMTP id\n 5b1f17b1804b1-48984d29fe3so26211545e9.0\n for <qemu-devel@nongnu.org>; Fri, 01 May 2026 03:15:27 -0700 (PDT)",
            "from lanath.. (wildly.archaic.org.uk. [81.2.115.145])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48a8fede418sm12863335e9.6.2026.05.01.03.15.23\n for <qemu-devel@nongnu.org>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 01 May 2026 03:15:24 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777630526; x=1778235326; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:from:to:cc:subject:date:message-id\n :reply-to; bh=2YjxkgDmODhzB8F97AzDnOR+tGT6XYFOQgHnOUXmosQ=;\n b=oRXoGm9gk7R71IyQxNkHRQyGzFLOiB2vp5S6Ba3YLdZIh4Pe9X9T8jTjrkOWvj5vmS\n ps9FAYw5mONzDIsGcWE8nr2YqpT+ubJIFc3aG2jgGdGi5H4LOnvTXwKX1d9Oh1h5ICzx\n WpFuzt6rC0AT6/E6lepCyWnffvQYinCcYbrPA69CordLQ4GZ1jQvaIKGe7flDDGORRQl\n klTDx+9/pKlHkR7KwlASUiOKk5wP8/fVEVFbYpmxO1iFJLOOnTQo9sDKpr2T2BCBPx60\n 3Jzy1ldJYHhLV79KPf2t/6qgnBHUHQE1A9hNrRypCtmaDJegTqeXZNv1U9kNGGYX8qjQ\n 5avA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777630526; x=1778235326;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=2YjxkgDmODhzB8F97AzDnOR+tGT6XYFOQgHnOUXm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pHUFxgficQEYR7yXz9YfrjScpCe2uUlhqxruFg",
        "X-Received": "by 2002:a05:600c:1d1a:b0:485:30d4:6b9e with SMTP id\n 5b1f17b1804b1-48a84458d16mr114107105e9.21.1777630526469;\n Fri, 01 May 2026 03:15:26 -0700 (PDT)",
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Subject": "[PULL 13/28] target/arm/kvm: Cache host CPU probe failure",
        "Date": "Fri,  1 May 2026 11:14:50 +0100",
        "Message-ID": "<20260501101505.3485916-14-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260501101505.3485916-1-peter.maydell@linaro.org>",
        "References": "<20260501101505.3485916-1-peter.maydell@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2a00:1450:4864:20::329;\n envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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=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": "From: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>\n\nkvm_arm_set_cpu_features_from_host() does not properly handle host CPU\nprobe failure with caching. The current algorithm can be summarized as\nfollows:\n\n    If dtb_compatible is not cached:\n        If kvm_arm_create_scratch_host_vcpu() fails:\n            Report failure\n\n        Cache dtb_compatible\n\n        If getting register values fails:\n            Report failure\n\n    Report success\n\nThis algorithm has the following problems:\n\n- If kvm_arm_create_scratch_host_vcpu() fails, probing may be repeated.\n- If getting register values fails, later invocations incorrectly report\n  success.\n\nMake two changes to fix them:\n\n- Cache dtb_compatible whenever a probe is attempted.\n- Record probe failure by assigning QEMU_KVM_ARM_TARGET_NONE to\n  arm_host_cpu_features.target.\n\nSuggested-by: Peter Maydell <peter.maydell@linaro.org>\nSigned-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\nMessage-id: 20260428-features-v1-1-1841b39da7e6@rsg.ci.i.u-tokyo.ac.jp\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\n target/arm/kvm.c | 38 ++++++++++++++++++++++----------------\n 1 file changed, 22 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/target/arm/kvm.c b/target/arm/kvm.c\nindex d4a68874b8..7d194ea112 100644\n--- a/target/arm/kvm.c\n+++ b/target/arm/kvm.c\n@@ -273,7 +273,7 @@ static uint32_t kvm_arm_sve_get_vls(int fd)\n     return vls[0] & MAKE_64BIT_MASK(0, ARM_MAX_VQ);\n }\n \n-static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n+static void kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n {\n     /* Identify the feature bits corresponding to the host CPU, and\n      * fill out the ARMHostCPUClass fields accordingly. To do this\n@@ -287,6 +287,13 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n     uint64_t features = 0;\n     int err;\n \n+    ahcf->target = QEMU_KVM_ARM_TARGET_NONE;\n+    ahcf->dtb_compatible = \"arm,armv8\";\n+\n+    if (!kvm_enabled()) {\n+        return;\n+    }\n+\n     /*\n      * target = -1 informs kvm_arm_create_scratch_host_vcpu()\n      * to use the preferred target\n@@ -326,11 +333,9 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n     }\n \n     if (!kvm_arm_create_scratch_host_vcpu(fdarray, &init)) {\n-        return false;\n+        return;\n     }\n \n-    ahcf->target = init.target;\n-    ahcf->dtb_compatible = \"arm,armv8\";\n     int fd = fdarray[2];\n \n     err = get_host_cpu_reg(fd, ahcf, ID_AA64PFR0_EL1_IDX);\n@@ -454,7 +459,7 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n     kvm_arm_destroy_scratch_host_vcpu(fdarray);\n \n     if (err < 0) {\n-        return false;\n+        return;\n     }\n \n     /*\n@@ -471,9 +476,8 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)\n         features |= 1ULL << ARM_FEATURE_EL2;\n     }\n \n+    ahcf->target = init.target;\n     ahcf->features = features;\n-\n-    return true;\n }\n \n void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)\n@@ -481,18 +485,20 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu)\n     CPUARMState *env = &cpu->env;\n \n     if (!arm_host_cpu_features.dtb_compatible) {\n-        if (!kvm_enabled() ||\n-            !kvm_arm_get_host_cpu_features(&arm_host_cpu_features)) {\n-            /* We can't report this error yet, so flag that we need to\n-             * in arm_cpu_realizefn().\n-             */\n-            cpu->kvm_target = QEMU_KVM_ARM_TARGET_NONE;\n-            cpu->host_cpu_probe_failed = true;\n-            return;\n-        }\n+        kvm_arm_get_host_cpu_features(&arm_host_cpu_features);\n     }\n \n     cpu->kvm_target = arm_host_cpu_features.target;\n+\n+    if (cpu->kvm_target == QEMU_KVM_ARM_TARGET_NONE) {\n+        /*\n+         * We can't report this error yet, so flag that we need to\n+         * in arm_cpu_realizefn().\n+         */\n+        cpu->host_cpu_probe_failed = true;\n+        return;\n+    }\n+\n     cpu->dtb_compatible = arm_host_cpu_features.dtb_compatible;\n     cpu->isar = arm_host_cpu_features.isar;\n     cpu->sve_vq.supported = arm_host_cpu_features.sve_vq_supported;\n",
    "prefixes": [
        "PULL",
        "13/28"
    ]
}