get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219849,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2219849/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/adGTUNUSckx1KrAk@p100/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<adGTUNUSckx1KrAk@p100>",
    "list_archive_url": null,
    "date": "2026-04-04T22:40:16",
    "name": "[v3] Allow building qemu tools on 32-bit hosts",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d81632222c056fe2524cfd998df79e54c8961e9c",
    "submitter": {
        "id": 87076,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/87076/?format=api",
        "name": "Helge Deller",
        "email": "deller@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/adGTUNUSckx1KrAk@p100/mbox/",
    "series": [
        {
            "id": 498753,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/498753/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498753",
            "date": "2026-04-04T22:40:16",
            "name": "[v3] Allow building qemu tools on 32-bit hosts",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/498753/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219849/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219849/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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=QepZcu1t;\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 4fp9Y44qQKz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2026 08:40:56 +1000 (AEST)",
            "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 1w99fL-0004XX-NS; Sat, 04 Apr 2026 18:40:32 -0400",
            "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 <deller@kernel.org>) id 1w99fJ-0004X2-AO\n for qemu-devel@nongnu.org; Sat, 04 Apr 2026 18:40:29 -0400",
            "from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <deller@kernel.org>) id 1w99fF-0006wF-Jr\n for qemu-devel@nongnu.org; Sat, 04 Apr 2026 18:40:29 -0400",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by sea.source.kernel.org (Postfix) with ESMTP id B0A1C4054B;\n Sat,  4 Apr 2026 22:40:19 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 7FC1AC19421;\n Sat,  4 Apr 2026 22:40:18 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1775342419;\n bh=QQH19VbRhYXYPUyEUH1EWv9i9L2lje3mJnL+gL0s4+s=;\n h=Date:From:To:Subject:From;\n b=QepZcu1tMVc06bDf2+mMoDmGYnhiBFwNaUhsfNx7XQlC9GKrY9XF4ek3+pNYoXMaO\n XpXIHXfi9n7pQn6FECR6alUZeEwlajQGAKRmoLDSjRmX++tVHAv5Jth9YZcJ42r3vJ\n AHoGxcUBtRRgoLjJ/+nHBdGEAkA1PFzxlBEni0ILCzYW0zQKKOkqzFEE0RP/q3tH4v\n BlhizKF0Utqbbc31EFa27WH3YJb/vkT2i6/wMyJYCs6zT1pnZeLSRSHZDVS82TJ/0n\n rrtY/7m1hlg6ZmYsQD1FilEDCozYiy8RcpFOH78rKn6IwSGewOOQYzfq0imcrvegHP\n ZIYdIXmJubw3w==",
        "Date": "Sun, 5 Apr 2026 00:40:16 +0200",
        "From": "Helge Deller <deller@kernel.org>",
        "To": "qemu-devel@nongnu.org, Richard Henderson <richard.henderson@linaro.org>,\n Michael Tokarev <mjt@tls.msk.ru>",
        "Subject": "[PATCH v3] Allow building qemu tools on 32-bit hosts",
        "Message-ID": "<adGTUNUSckx1KrAk@p100>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "Received-SPF": "pass client-ip=2600:3c0a:e001:78e:0:1991:8:25;\n envelope-from=deller@kernel.org; helo=sea.source.kernel.org",
        "X-Spam_score_int": "-25",
        "X-Spam_score": "-2.6",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\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": "Qemu's tools like qemu-img are often needed on 32-bit platforms,\nalthough the actual qemu emulators have been discontinued on 32-bit.\n\nTo allow building the tools on 32-bit this patch implements three small\nchanges:\n\na) The check in meson.build is changed to still error out if the user\ntries to build qemu-system or qemu-user on a 32-bit platform, but allows\nbuilding tools (e.g. by \"--enable-tools\") alone.\n\nb) The compile time check in atomic.h now checks against\nsizeof(uint64_t) so that 32-bit environments can still build\nsuccessfully, while 128-bit atomic operations are prevented to sneak in.\n\nc) Allow linking against libatomic as long as we don't build the\nqemu-system and qemu-user binaries.\n\nSucessfully tested on the 32-bit big-endian powerpc architecture.\n\nv2:\n- keep comple time checks in atomic.h\n- allow linking against libatomic when building tools\n\nv3:\n- Drop \"-Wl,\"\n- added S-o-b\n\nSigned-off-by: Helge Deller <deller@gmx.de>\nSuggested-by: Richard Henderson <richard.henderson@linaro.org>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nReviewed-by: Michael Tokarev <mjt@tls.msk.ru>",
    "diff": "diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h\nindex dc9290084b..e4dd948863 100644\n--- a/include/qemu/atomic.h\n+++ b/include/qemu/atomic.h\n@@ -58,11 +58,11 @@\n \n /*\n  * Sanity check that the size of an atomic operation isn't \"overly large\".\n- * Despite the fact that e.g. i686 has 64-bit atomic operations, we do not\n+ * Despite the fact that e.g. x86-64 has 128-bit atomic operations, we do not\n  * want to use them because we ought not need them, and this lets us do a\n- * bit of sanity checking that other 32-bit hosts might build.\n+ * bit of sanity checking that other 32- and 64-bit hosts might build.\n  */\n-#define ATOMIC_REG_SIZE  sizeof(void *)\n+#define ATOMIC_REG_SIZE  sizeof(uint64_t)\n \n /* Weak atomic operations prevent the compiler moving other\n  * loads/stores past the atomic operation load/store. However there is\ndiff --git a/meson.build b/meson.build\nindex daa58e46a3..ab3e97eb9f 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -323,8 +323,8 @@ endif\n # Compiler flags #\n ##################\n \n-if cc.sizeof('void *') < 8\n-  error('QEMU requires a 64-bit CPU host architecture')\n+if (cc.sizeof('void *') < 8) and (have_system or have_user)\n+  error('QEMU emulator requires a 64-bit CPU host architecture. Only tools may be built for 32-bit.')\n endif\n \n foreach lang : all_languages\n@@ -423,8 +423,16 @@ endif\n #\n # Later checks assume we won't get atomic ops for int128 without\n # explicitly asking for -latomic, so we must disable GCC's new\n-# automatic linking with the new -fno-link-libatomic flag\n-qemu_isa_flags += cc.get_supported_arguments('-fno-link-libatomic')\n+# automatic linking with the new -fno-link-libatomic flag.\n+#\n+# When not building the emulators, but qemu helper tools only\n+# (e.g. on 32-bit hosts), libatomic is sometimes required and\n+# thus acceptable.\n+if (have_system or have_user)\n+  qemu_isa_flags += cc.get_supported_arguments('-fno-link-libatomic')\n+else\n+  qemu_ldflags += cc.get_supported_link_arguments('-latomic')\n+endif\n \n qemu_common_flags = qemu_isa_flags + qemu_common_flags\n \n",
    "prefixes": [
        "v3"
    ]
}