get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195372,
    "url": "http://patchwork.ozlabs.org/api/patches/2195372/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210214044.1174699-4-iii@linux.ibm.com/",
    "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": "<20260210214044.1174699-4-iii@linux.ibm.com>",
    "list_archive_url": null,
    "date": "2026-02-10T21:39:02",
    "name": "[v5,3/5] fpu: Restrict parts_round_to_int_normal to target precision",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "73aed4ee98c3716248bb3140edf5272f95b132f3",
    "submitter": {
        "id": 74525,
        "url": "http://patchwork.ozlabs.org/api/people/74525/?format=api",
        "name": "Ilya Leoshkevich",
        "email": "iii@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210214044.1174699-4-iii@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 491741,
            "url": "http://patchwork.ozlabs.org/api/series/491741/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491741",
            "date": "2026-02-10T21:39:00",
            "name": "target/s390x: Implement DIVIDE TO INTEGER",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/491741/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195372/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195372/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=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=AbXXxRbA;\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 4f9ZlP6LJhz1xx7\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 08:41:53 +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 1vpvTm-00062s-73; Tue, 10 Feb 2026 16:41:06 -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 <iii@linux.ibm.com>)\n id 1vpvTd-0005zQ-Nq; Tue, 10 Feb 2026 16:40:58 -0500",
            "from mx0a-001b2d01.pphosted.com ([148.163.156.1])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <iii@linux.ibm.com>)\n id 1vpvTb-0000Pb-1F; Tue, 10 Feb 2026 16:40:57 -0500",
            "from pps.filterd (m0360083.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 61ACPpeO528536; Tue, 10 Feb 2026 21:40:50 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 4c696uefvr-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 10 Feb 2026 21:40:50 +0000 (GMT)",
            "from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])\n by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 61AHYIQY008883;\n Tue, 10 Feb 2026 21:40:49 GMT",
            "from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229])\n by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4c6g3ybbp0-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 10 Feb 2026 21:40:49 +0000",
            "from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com\n [10.20.54.106])\n by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 61ALelDr51708412\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Tue, 10 Feb 2026 21:40:47 GMT",
            "from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 4D18C20043;\n Tue, 10 Feb 2026 21:40:47 +0000 (GMT)",
            "from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id E453020040;\n Tue, 10 Feb 2026 21:40:46 +0000 (GMT)",
            "from heavy.ibm.com (unknown [9.111.60.229])\n by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP;\n Tue, 10 Feb 2026 21:40:46 +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=60wDWx5HkhKOznUxd\n 1NlthZ99gDvlbwv0NAsJZd2cRw=; b=AbXXxRbAcsuwdk4aLZ2VhW97VSw/CWosf\n qqYJ8Sc0n/9xWIbAvDGg/piZw/vGxHpZDcAIeuIpaWoh8iJgbDLfd9cVfUMnDe9D\n at3lYi/UOdbWG72ygjrVmzWnZEDtPzcmqOyDD4Sag959YSei/vJnH7KF9le83dpI\n C1Da8XUX9xzt0VBoaePF8/mgKJdXujBj+j2Ku5mdWcheToRYkh4GtPET4T3UNc+Q\n xjfiAG048hHhPn92j5VS3pDYN5tDtnwj/q2p2SiNTvBJcEF+7R9a2u4hx73nyC65\n sapjE5iSOMKOJJtf6mhbSL9iRSwdJktBC9IvemM5X99Jqk/F28ejA==",
        "From": "Ilya Leoshkevich <iii@linux.ibm.com>",
        "To": "Thomas Huth <thuth@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>",
        "Cc": "David Hildenbrand <david@kernel.org>, qemu-s390x@nongnu.org,\n qemu-devel@nongnu.org, Ilya Leoshkevich <iii@linux.ibm.com>",
        "Subject": "[PATCH v5 3/5] fpu: Restrict parts_round_to_int_normal to target\n precision",
        "Date": "Tue, 10 Feb 2026 22:39:02 +0100",
        "Message-ID": "<20260210214044.1174699-4-iii@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260210214044.1174699-1-iii@linux.ibm.com>",
        "References": "<20260210214044.1174699-1-iii@linux.ibm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-TM-AS-GCONF": "00",
        "X-Authority-Analysis": "v=2.4 cv=KZnfcAYD c=1 sm=1 tr=0 ts=698ba5e2 cx=c_pps\n a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17\n a=HzLeVaNsDn8A:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22\n a=GgsMoib0sEa3-_RKJdDe:22 a=VnNF1IyMAAAA:8 a=Y7_wFDRbBJZQL2pu5q4A:9",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwMjEwMDE3NiBTYWx0ZWRfX3RZIXhKfsI9H\n r/Z7FcKt72cAXLmyxyNHzXDiWnW94eHis8XPheJ1+bKudk0w3VocFv56HLvAa6uBBBJJY7D410x\n u7aDnWSGRwVOnqLh2O++OmC6QTyh+cxUdhbxIS5kwvbQIdjf8xZ8fDTJVgYE1xnxdYbzPmvNN5o\n KaJhwJGQvs+s12tgnqBeW9AkV5rle01TFEU4zAvZEXTzd9UKGLkZENngTaqV02n6cHYI365thJi\n WQ094oOFweTmC27CZHl9RYts0BjWwWU5wGYVEB+Q1jcZ6rg9sBZyU4a8S34TuWFO1MlLJU+5iBa\n s9dIL1LKmbOUS2CGApTCB4iKb8fE0fiRtiXZdcH0UjKAnPMxL3nk1G/3cZxrKY2FYu/1JZD5imu\n Hhmg6FDrzKfeSiTYXqmXMZ+Ph2sjR++4PnjjLtjD7HQIwIk4wNQAohTtSA+SKQlVn+MLy1Z77S1\n IqIZeZ8cFNy/JQRP1FA==",
        "X-Proofpoint-ORIG-GUID": "a2IEHLiNczEqLfkjXAFk58VU71hHtqLr",
        "X-Proofpoint-GUID": "a2IEHLiNczEqLfkjXAFk58VU71hHtqLr",
        "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-10_03,2026-02-10_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n spamscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 adultscore=0\n clxscore=1015 suspectscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602100176",
        "Received-SPF": "pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com;\n helo=mx0a-001b2d01.pphosted.com",
        "X-Spam_score_int": "-19",
        "X-Spam_score": "-2.0",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001,\n RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,\n SPF_HELO_NONE=0.001, 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": "Currently parts_round_to_int_normal() assumes that its input has just\nbeen unpacked and therefore doesn't expect non-zero fraction bits past\ntarget precision.\n\nThe upcoming DIVIDE TO INTEGER use cases needs it to support\ncalculations on intermediate values that utilize all fraction bits,\nwhile at the same time restricting the result's precision to frac_size.\n\nDelete the \"All integral\" check, because even though really large\nvalues are always integer, their low fraction bits still need to be\ntruncated. For the same reason, make sure rnd_mask covers at least\nfraction bits past target precision.\n\nSigned-off-by: Ilya Leoshkevich <iii@linux.ibm.com>\n---\n fpu/softfloat-parts.c.inc | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/fpu/softfloat-parts.c.inc b/fpu/softfloat-parts.c.inc\nindex 5e0438fc0b7..79b56014ab9 100644\n--- a/fpu/softfloat-parts.c.inc\n+++ b/fpu/softfloat-parts.c.inc\n@@ -1118,11 +1118,6 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,\n         return true;\n     }\n \n-    if (a->exp >= frac_size) {\n-        /* All integral */\n-        return false;\n-    }\n-\n     if (N > 64 && a->exp < N - 64) {\n         /*\n          * Rounding is not in the low word -- shift lsb to bit 2,\n@@ -1132,8 +1127,13 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,\n         frac_shrjam(a, shift_adj);\n         frac_lsb = 1 << 2;\n     } else {\n+        /*\n+         * Rounding is in the low word -- compute the lsb offset for rounding\n+         * and for clamping to the target precision, then map it to an offset\n+         * within frac_lo.\n+         */\n         shift_adj = 0;\n-        frac_lsb = DECOMPOSED_IMPLICIT_BIT >> (a->exp & 63);\n+        frac_lsb = DECOMPOSED_IMPLICIT_BIT >> (MIN(a->exp, frac_size) & 63);\n     }\n \n     frac_lsbm1 = frac_lsb >> 1;\n",
    "prefixes": [
        "v5",
        "3/5"
    ]
}