From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Stefan Hajnoczi <stefanha@redhat.com>,
Kohei Tokunaga <ktokunaga.mail@gmail.com>,
Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
"Greg Kurz" <groug@kaod.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
qemu-block@nongnu.org, qemu-riscv@nongnu.org,
qemu-arm@nongnu.org
Subject: Re: [PATCH 00/10] Enable QEMU to run on browsers
Date: Thu, 10 Apr 2025 14:20:15 +0200 [thread overview]
Message-ID: <dc36c24e-dc4a-4c24-97b7-8b812441ffce@linaro.org> (raw)
In-Reply-To: <20250409192115.GA5528@fedora>
On 9/4/25 21:21, Stefan Hajnoczi wrote:
> On Mon, Apr 07, 2025 at 11:45:51PM +0900, Kohei Tokunaga wrote:
>> This patch series enables QEMU's system emulator to run in a browser using
>> Emscripten.
>> It includes implementations and workarounds to address browser environment
>> limitations, as shown in the following.
>
> I think it would be great to merge this even if there are limitations
> once code review comments have been addressed. Developing WebAssembly
> support in-tree is likely to allow this effort to develop further than
> if done in personal repos (and with significant efforts required to
> rebase the code periodically).
>
>> # New TCG Backend for Browsers
>>
>> A new TCG backend translates IR instructions into Wasm instructions and runs
>> them using the browser's WebAssembly APIs (WebAssembly.Module and
>> WebAssembly.instantiate). To minimize compilation overhead and avoid hitting
>> the browser's limitation of the number of instances, this backend integrates
>> a forked TCI. TBs run on TCI by default, with frequently executed TBs
>> compiled into WebAssembly.
>>
>> # Workaround for Running 64-bit Guests
>>
>> The current implementation uses Wasm's 32-bit memory model, even though Wasm
>> supports 64-bit variables and instructions. This patch explores implementing
>> TCG 64-bit instructions while leveraging SoftMMU for address translation. To
>> enable 64-bit guest support in Wasm today, it was necessary to partially
>> revert recent changes that removed support for different pointer widths
>> between the host and guest (e.g., commits
>> a70af12addd9060fdf8f3dbd42b42e3072c3914f and
>> bf455ec50b6fea15b4d2493059365bf94c706273) when compiling with
>> Emscripten. While this serves as a temporary workaround, a long-term
>> solution could involve adopting Wasm's 64-bit memory model once it gains
>> broader support, as it is currently not widely adopted (e.g., unsupported by
>> Safari and libffi). Feedback and suggestions on this approach are welcome.
The biggest problem I'm seeing is we no longer support 64-bit guests on
32-bit hosts, and don't plan to revert that.
next prev parent reply other threads:[~2025-04-10 12:20 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 14:45 [PATCH 00/10] Enable QEMU to run on browsers Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 01/10] various: Fix type conflict of GLib function pointers Kohei Tokunaga
2025-04-09 10:54 ` Philippe Mathieu-Daudé
2025-04-09 13:43 ` Kohei Tokunaga
2025-04-10 15:58 ` Paolo Bonzini
2025-04-11 10:55 ` Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 02/10] various: Define macros for dependencies on emscripten Kohei Tokunaga
2025-04-10 15:53 ` Paolo Bonzini
2025-04-11 10:59 ` Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 03/10] util/mmap-alloc: Add qemu_ram_mmap implementation for emscripten Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 04/10] util: Add coroutine backend " Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 05/10] meson: Add wasm build in build scripts Kohei Tokunaga
2025-04-09 10:55 ` Philippe Mathieu-Daudé
2025-04-09 13:35 ` Paolo Bonzini
2025-04-10 12:24 ` Kohei Tokunaga
2025-04-10 12:55 ` Paolo Bonzini
2025-04-11 11:23 ` Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 06/10] include/exec: Allow using 64bit guest addresses on emscripten Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 07/10] tcg: Add a TCG backend for WebAssembly Kohei Tokunaga
2025-04-09 10:58 ` Philippe Mathieu-Daudé
2025-04-09 13:53 ` Kohei Tokunaga
2025-04-11 10:50 ` Philippe Mathieu-Daudé
2025-04-12 9:04 ` Kohei Tokunaga
2025-04-12 9:12 ` Kohei Tokunaga
2025-04-07 14:45 ` [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten Kohei Tokunaga
2025-04-10 11:27 ` Christian Schoenebeck
2025-04-11 10:47 ` Kohei Tokunaga
2025-04-12 8:21 ` Christian Schoenebeck
2025-04-12 10:21 ` Christian Schoenebeck
2025-04-12 10:38 ` Christian Schoenebeck
2025-04-13 8:12 ` Kohei Tokunaga
2025-04-10 16:29 ` Paolo Bonzini
2025-04-11 14:03 ` Kohei Tokunaga
2025-04-07 14:46 ` [PATCH 09/10] gitlab: Enable CI for wasm build Kohei Tokunaga
2025-04-07 14:46 ` [PATCH 10/10] MAINTAINERS: Update MAINTAINERS file for wasm-related files Kohei Tokunaga
2025-04-09 19:21 ` [PATCH 00/10] Enable QEMU to run on browsers Stefan Hajnoczi
2025-04-10 12:20 ` Philippe Mathieu-Daudé [this message]
2025-04-10 13:11 ` Kohei Tokunaga
2025-04-10 13:13 ` Kohei Tokunaga
2025-04-10 21:17 ` Pierrick Bouvier
2025-04-11 14:36 ` Kohei Tokunaga
2025-04-11 15:28 ` Pierrick Bouvier
2025-04-11 9:07 ` Paolo Bonzini
2025-04-11 14:41 ` Kohei Tokunaga
2025-04-11 10:34 ` Daniel P. Berrangé
2025-04-11 15:17 ` Kohei Tokunaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc36c24e-dc4a-4c24-97b7-8b812441ffce@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=berrange@redhat.com \
--cc=dbarboza@ventanamicro.com \
--cc=eduardo@habkost.net \
--cc=groug@kaod.org \
--cc=hreitz@redhat.com \
--cc=ktokunaga.mail@gmail.com \
--cc=kwolf@redhat.com \
--cc=liwei1518@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).