Cover Letter Detail
Show a cover letter.
GET /api/covers/2075135/?format=api
{ "id": 2075135, "url": "http://patchwork.ozlabs.org/api/covers/2075135/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/cover.1745295397.git.ktokunaga.mail@gmail.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": "<cover.1745295397.git.ktokunaga.mail@gmail.com>", "list_archive_url": null, "date": "2025-04-22T05:27:04", "name": "[v2,00/20] Enable QEMU TCI to run 32bit guests on browsers", "submitter": { "id": 90637, "url": "http://patchwork.ozlabs.org/api/people/90637/?format=api", "name": "Kohei Tokunaga", "email": "ktokunaga.mail@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/cover.1745295397.git.ktokunaga.mail@gmail.com/mbox/", "series": [ { "id": 453631, "url": "http://patchwork.ozlabs.org/api/series/453631/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=453631", "date": "2025-04-22T05:27:04", "name": "Enable QEMU TCI to run 32bit guests on browsers", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/453631/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2075135/comments/", "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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=WrLgwMBt;\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 4ZhW4B50Rwz1yMy\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 22 Apr 2025 15:28:41 +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 1u76B9-0001Ey-U7; Tue, 22 Apr 2025 01:28:20 -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 <ktokunaga.mail@gmail.com>)\n id 1u76B5-0001EO-Gg; Tue, 22 Apr 2025 01:28:15 -0400", "from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <ktokunaga.mail@gmail.com>)\n id 1u76B2-0007mf-PZ; Tue, 22 Apr 2025 01:28:14 -0400", "by mail-pl1-x62d.google.com with SMTP id\n d9443c01a7336-227c7e57da2so41052585ad.0;\n Mon, 21 Apr 2025 22:28:04 -0700 (PDT)", "from localhost.localdomain ([240d:1a:3b6:8b00:e142:4a4f:1ebb:3ca4])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-22c50eb4483sm75692085ad.118.2025.04.21.22.27.56\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 21 Apr 2025 22:28:02 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1745299684; x=1745904484; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=LlssLeV8PwZvAQFxPCo+Tq04KcXHAkZ9FCrXDlrN+HU=;\n b=WrLgwMBtr7sCcv5+3SlpnaxClXjQvQRd2iqi25yrhrs2qgdAGYkkz6Ahkf/MBZuEY3\n sxcKyVn25qdXaQbMcu5YPlAiTLKBuetY5Ou5O3RJAAFB6U+VdUE9hoFmcU3Pi33EGG62\n Qu7zykKgItzmnKgBQd4yQ8v5J2FuFCFQaPOiq1P8kjUSp4HA0SySUL0781MmOO/odjuq\n 1JjLsQ4YZUBP6LsLqX6gPPGu/39rvdrd6L+QvHsHD/5f0Cc65BB4kFfpyZUrNqxa5E5u\n rnjjkutt2rtY7ll9rxE0p0t0qdzm4A1oDnB94RpHkzq3SfpbC2ybikUYqHqZOKbwlSjZ\n xQLw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1745299684; x=1745904484;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=LlssLeV8PwZvAQFxPCo+Tq04KcXHAkZ9FCrXDlrN+HU=;\n b=RvKmMTm/Pf4XPPw5wgw10RroRt/qvTwDemydu6+A7Rf6N8HoKxqqfFC5Zfv4Tpee8d\n Fv3t6aZsMuwx8R9dnhzoAu/4mXgBgvQclAlyLWuTdui1lyzMk/9ifiSgg1wCOEzX/ADP\n aM8w6fy2bZlewAYkGJzvxVGlOSj4sh+RQsrFf42VIye6SkugsQTt4iMSJijSmx+aamqC\n QZ9Z8woqiGegi8akt7JX92uRGxUH1snqrD7fco0sgkxBWONLS4Bh5DFMr+u1U15t79CP\n +ee+1zSKY2H+mN0VUjSEkPmTQHaeGvf+Ox63GEL6aXm9oWxJfjJwiAgfgJVmqaEX5yJx\n J2hg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCU2OlYV6CMl0TKNKrXg9cx3ODiq0ttXmoO3wQ1Q4MxlG5Lo87kqH9r2cs45+nJ5iDYPtYVuW7rly8v0gg==@nongnu.org,\n AJvYcCXOder6gwOik2m8fmEsCoEmpPzdWWuA6RMEUYibeF6OtG6lOQ+KGXgtbbIhmK0loot6/2yh3h0SvA==@nongnu.org,\n AJvYcCXq04xao1bJy9cSIYl4jyYZGYXYlcejSQzLWEGTvzoQp9lp4X+J2BZU1q+kgUr5BzMWuo0NPP/WCBg=@nongnu.org,\n AJvYcCXu/On7HBht/6Ypjp1TMS433oTwPEdDonZnv+zNTBYlSFEZHvp0oWaDUL6EnhL/bfJG5HJxzi1GUPA/wA==@nongnu.org", "X-Gm-Message-State": "AOJu0YxOeySIT/n8aPlFM85Sit8cfS5f8ZZCwwf4bAh1BfYNJDiK0UT4\n hFPU/Oew6qh1q0G+UqcjKUx2nBs/utNQbpG+RNAkE03RmIml2jOaiU2fZfmv", "X-Gm-Gg": "ASbGncsXGt1pf7A6n6ZngDUnsd4TsLcZJuWvQiR76ECrUifxwEpaBeOLrBUW3Aj0Ew7\n HnALOgX/pj8nMLNWoMpEFQk6fLWxnL7FoIFLCdPsey6y45KvlGWapLgvhgdWDSK3DghwmO5OFpj\n 1phl7w84y+tOyYzI7vJZwUBtx8bhlSXLi4mcVEpqa1+lqh8f9hPdmfPuRjyRwSc38sTC6EoKVq4\n tVDrqSUaleIZfJUfi3UE1Ha8XQh7ku/RS7Yn7a696LdQwqCHGXoUKwL6ycL1+x5sDyba9LuI8du\n UuzF0ne72KNaO+4/nhPOhm+BvuK2uaofSqQzfY4cQF1b2DnBT9jHWy/Ed/k=", "X-Google-Smtp-Source": "\n AGHT+IHud7/aqNVHqUlvMR9p9zobEuKDbwSSH92PhK7xD8g7kXzvl6OyVxAU7dXMRh4D5ulA2ZsBwg==", "X-Received": "by 2002:a17:903:320e:b0:22c:33b2:e410 with SMTP id\n d9443c01a7336-22c53379f1emr210419905ad.2.1745299683567;\n Mon, 21 Apr 2025 22:28:03 -0700 (PDT)", "From": "Kohei Tokunaga <ktokunaga.mail@gmail.com>", "To": "qemu-devel@nongnu.org", "Cc": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Philipp?=\n\t=?utf-8?q?e_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Thomas Huth <thuth@redhat.com>, Kevin Wolf <kwolf@redhat.com>,\n Hanna Reitz <hreitz@redhat.com>, Kohei Tokunaga <ktokunaga.mail@gmail.com>,\n Paolo Bonzini <pbonzini@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>,\n Mahmoud Mandour <ma.mandourr@gmail.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Pavel Pisa <pisa@cmp.felk.cvut.cz>,\n Francisco Iglesias <francisco.iglesias@amd.com>,\n Vikram Garhwal <vikram.garhwal@bytedance.com>,\n Jason Wang <jasowang@redhat.com>,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\t=?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n Eduardo Habkost <eduardo@habkost.net>, Peter Xu <peterx@redhat.com>,\n David Hildenbrand <david@redhat.com>,\n Peter Maydell <peter.maydell@linaro.org>, Zhao Liu <zhao1.liu@intel.com>,\n Nicholas Piggin <npiggin@gmail.com>,\n Daniel Henrique Barboza <danielhb413@gmail.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n Ilya Leoshkevich <iii@linux.ibm.com>, Stefan Hajnoczi <stefanha@redhat.com>,\n qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,\n qemu-s390x@nongnu.org", "Subject": "[PATCH v2 00/20] Enable QEMU TCI to run 32bit guests on browsers", "Date": "Tue, 22 Apr 2025 14:27:04 +0900", "Message-Id": "<cover.1745295397.git.ktokunaga.mail@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::62d;\n envelope-from=ktokunaga.mail@gmail.com; helo=mail-pl1-x62d.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, FREEMAIL_FROM=0.001,\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-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": "V2:\n\n- Updated the commit message to explicitly explain that function pointer\n casts are performed internally by GLib.\n- Fixed typo in the comment in include/glib-compat.h: s/insted/instead/\n- In util/cacheflush.c patch, added an explanation for the change to both\n the code comment and the commit message.\n- Split the block/file-posix.c hunk that adds \"#include <sys/ioctl.h>\" into\n a separate commit and revised the commit message to clarify the purpose of\n the patch.\n- Removed the Emscripten-specific stub of copy_file_range in\n stubs/emscripten.c. Instead, updated the type of the existing\n copy_file_range stub in block/file-posix.c to match the declaration in the\n Emscripten headers and avoid a compilation error.\n- Moved the change that was incorrectly applied to os-posix.h into os-wasm.h\n- Split MAINTAINERS file change to each commit that adds new files.\n- Unified two consecutive #ifndef macros into a single condition in\n qemu-options.hx.\n- Instead of porting mmap-alloc.c to Emscripten, this version excludes the\n file entirely. The rationale is described in the commit message.\n- In meson.build, added a check to ensure TCI is enabled for the wasm build.\n- Split the Dockerfile addition from the previous 18th patch into a separate\n commit.\n\nV1:\n\nThis patch series is split from the original \"Enable QEMU to run on\nbrowsers\" series, focusing solely on the essential code changes needed to\ncompile QEMU TCI with Emscripten. It also inclues fixes based on feedback\nreceived in the original series, thank you for the comments.\n\n# Supported features in this series\n\nThis patch series enables TCI interpreter mode with 32bit guest\nsupport. While the original series included the non-TCI backend and 9pfs\npatches, those components are not included here. They will be reintroduced\nin follow-up series after the foundational patches have been merged.\n\n# Emscripten-Based Coroutine Backend\n\nEmscripten does not support couroutine methods currently used by QEMU but\nprovides a coroutine implementation called \"fiber\". This patch series\nintroduces a coroutine backend using fiber. However, fiber does not support\nsubmitting coroutines to other threads. As a result, this patch series\ndoesn't support components like hw/9pfs, which rely on that behavior.\n\n# Overview of build process\n\nThis section provides an overview of the build process for compiling QEMU\nusing Emscripten. Full instructions are available in the sample\nrepository[1].\n\nTo compile QEMU with Emscripten, the following dependencies are required.\nThe emsdk-wasm32-cross.docker environment includes all necessary components\nand can be used as the build environment:\n\n- Emscripten SDK (emsdk) v3.1.50\n- Libraries cross-compiled with Emscripten (refer to\n emsdk-wasm32-cross.docker for build steps)\n - GLib v2.84.0\n - zlib v1.3.1\n - libffi v3.4.7\n - Pixman v0.44.2\n\nQEMU can be compiled using Emscripten's emconfigure and emmake, which\nautomatically set environment variables such as CC for targeting Emscripten.\n\nemconfigure configure --static --disable-tools \\\n --target-list=arm-softmmu --enable-tcg-interpreter\nemmake make -j$(nproc)\n\nThis process generates the following files:\n\n- qemu-system-arm.js\n- qemu-system-arm.wasm\n- qemu-system-arm.worker.js\n\nGuest images can be packaged using Emscripten's file_packager.py tool.\nFor example, if the images are stored in a directory named \"pack\", the\nfollowing command packages them, allowing QEMU to access them through\nEmscripten's virtual filesystem:\n\n/path/to/file_packager.py qemu-system-arm.data --preload pack > load.js\n\nThis process generates the following files:\n\n- qemu-system-arm.data\n- load.js\n\nEmscripten allows passing arguments to the QEMU command via the Module\nobject in JavaScript:\n\nModule['arguments'] = [\n '-nographic', '-m', '512M', '-machine', 'virt',\n '-L', 'pack/',\n '-global', 'virtio-mmio.force-legacy=false',\n '-device', 'virtio-blk-device,drive=d0',\n '-drive', 'file=pack/rootfs.bin,if=none,format=raw,id=d0',\n '-kernel', 'pack/kernel.img',\n '-append', 'console=ttyAMA0 root=/dev/vda loglevel=7',\n];\n\nThe sample repository[1] provides a complete setup, including an HTML file\nthat implements a terminal UI.\n\n[1] https://github.com/ktock/qemu-wasm-sample/tree/tcidev\n\n# Additional references\n\n- Original patch series \"Enable QEMU to run on browsers\":\n https://patchew.org/QEMU/cover.1744032780.git.ktokunaga.mail@gmail.com/\n- A talk at FOSDEM 2025:\n https://fosdem.org/2025/schedule/event/fosdem-2025-6290-running-qemu-inside-browser/\n\nKohei Tokunaga (20):\n hw/core/loader.c: Fix type conflict of GLib function pointers\n qom/object.c: Fix type conflict of GLib function pointers\n system/vl.c: Fix type conflict of GLib function pointers\n target/arm/helper.c: Fix type conflict of GLib function pointers\n target/i386/cpu.c: Fix type conflict of GLib function pointers\n contrib/plugins: Fix type conflict of GLib function pointers\n hw/net/can: Fix type conflict of GLib function pointers\n target/ppc: Fix type conflict of GLib function pointers\n target/s390x: Fix type conflict of GLib function pointers\n include/glib-compat.h: Poison g_list_sort and g_slist_sort\n util/cacheflush.c: Update cache flushing mechanism for Emscripten\n block: Add including of ioctl header for Emscripten build\n block: Fix type confict of the copy_file_range stub\n include/qemu/osdep.h: Add Emscripten-specific OS dependencies\n Disable options unsupported on Emscripten\n util: exclude mmap-alloc.c from compilation target on Emscripten\n util: Add coroutine backend for emscripten\n meson: Add wasm build in build scripts\n tests: Add Dockerfile containing dependencies for Emscripten build\n gitlab: Enable CI for wasm build\n\n .gitlab-ci.d/buildtest-template.yml | 27 ++++\n .gitlab-ci.d/buildtest.yml | 9 ++\n .gitlab-ci.d/container-cross.yml | 5 +\n MAINTAINERS | 9 ++\n backends/meson.build | 6 +-\n block/file-posix.c | 8 +-\n configs/meson/emscripten.txt | 8 +\n configure | 7 +\n contrib/plugins/cache.c | 12 +-\n contrib/plugins/cflow.c | 10 +-\n contrib/plugins/hotblocks.c | 4 +-\n contrib/plugins/hotpages.c | 4 +-\n contrib/plugins/howvec.c | 4 +-\n contrib/plugins/hwprofile.c | 8 +-\n hw/core/loader.c | 4 +-\n hw/net/can/xlnx-versal-canfd.c | 4 +-\n include/glib-compat.h | 6 +\n include/qemu/cacheflush.h | 7 +\n include/qemu/osdep.h | 8 +-\n include/system/os-wasm.h | 104 +++++++++++++\n meson.build | 29 +++-\n meson_options.txt | 2 +-\n os-wasm.c | 119 ++++++++++++++\n qemu-options.hx | 4 +-\n qom/object.c | 7 +-\n scripts/meson-buildoptions.sh | 2 +-\n system/memory.c | 2 +-\n system/physmem.c | 9 +-\n system/vl.c | 8 +-\n target/arm/helper.c | 4 +-\n target/i386/cpu.c | 11 +-\n target/ppc/cpu_init.c | 4 +-\n target/s390x/cpu_models.c | 4 +-\n .../dockerfiles/emsdk-wasm32-cross.docker | 145 ++++++++++++++++++\n tests/tcg/plugins/mem.c | 4 +-\n tests/tcg/plugins/syscall.c | 4 +-\n util/cacheflush.c | 4 +\n util/coroutine-wasm.c | 127 +++++++++++++++\n util/meson.build | 4 +-\n util/oslib-posix.c | 28 ++++\n 40 files changed, 709 insertions(+), 66 deletions(-)\n create mode 100644 configs/meson/emscripten.txt\n create mode 100644 include/system/os-wasm.h\n create mode 100644 os-wasm.c\n create mode 100644 tests/docker/dockerfiles/emsdk-wasm32-cross.docker\n create mode 100644 util/coroutine-wasm.c" }