* [PATCH v4 1/4] meson: Add wasm64 support to the --cpu flag
2026-01-08 17:11 [PATCH v4 0/4] wasm: Enable 64bit guests on TCI using wasm64 Kohei Tokunaga
@ 2026-01-08 17:11 ` Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 2/4] configure: Enable to propagate -sMEMORY64 flag to Emscripten Kohei Tokunaga
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-08 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Kohei Tokunaga, Stefan Hajnoczi, Pierrick Bouvier,
Richard Henderson
wasm64 target enables 64bit pointers using Emscripten's -sMEMORY64=1
flag[1]. This enables QEMU to run 64bit guests.
Although the configure script uses "uname -m" as the fallback value when
"cpu" is empty, this can't be used for Emscripten which targets to Wasm.
So, in wasm build, this commit fixes configure to require --cpu flag to be
explicitly specified by the user.
[1] https://emscripten.org/docs/tools_reference/settings_reference.html#memory64
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
configure | 6 +++++-
meson.build | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 55e0bd3425..92bfc5f976 100755
--- a/configure
+++ b/configure
@@ -365,7 +365,6 @@ elif check_define __APPLE__; then
host_os=darwin
elif check_define EMSCRIPTEN ; then
host_os=emscripten
- cpu=wasm32
cross_compile="yes"
else
# This is a fatal error, but don't report it yet, because we
@@ -419,6 +418,8 @@ elif check_define __aarch64__ ; then
cpu="aarch64"
elif check_define __loongarch64 ; then
cpu="loongarch64"
+elif check_define EMSCRIPTEN ; then
+ error_exit "wasm32 or wasm64 must be specified to the cpu flag"
else
# Using uname is really broken, but it is just a fallback for architectures
# that are going to use TCI anyway
@@ -519,6 +520,9 @@ case "$cpu" in
wasm32)
CPU_CFLAGS="-m32"
;;
+ wasm64)
+ CPU_CFLAGS="-m64 -sMEMORY64=1"
+ ;;
esac
if test -n "$host_arch" && {
diff --git a/meson.build b/meson.build
index db87358d62..d072473243 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,7 @@ qapi_trace_events = []
bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'emscripten']
supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
- 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32']
+ 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32', 'wasm64']
cpu = host_machine.cpu_family()
@@ -914,7 +914,7 @@ if have_tcg
if not get_option('tcg_interpreter')
error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu))
endif
- elif host_arch == 'wasm32'
+ elif host_arch == 'wasm32' or host_arch == 'wasm64'
if not get_option('tcg_interpreter')
error('WebAssembly host requires --enable-tcg-interpreter')
endif
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v4 2/4] configure: Enable to propagate -sMEMORY64 flag to Emscripten
2026-01-08 17:11 [PATCH v4 0/4] wasm: Enable 64bit guests on TCI using wasm64 Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 1/4] meson: Add wasm64 support to the --cpu flag Kohei Tokunaga
@ 2026-01-08 17:11 ` Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64 Kohei Tokunaga
3 siblings, 0 replies; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-08 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Kohei Tokunaga, Stefan Hajnoczi, Pierrick Bouvier,
Richard Henderson
Currently there are some engines that don't support wasm64 (e.g. unsupported
on Safari[1]). To mitigate this issue, the configure script allows the user
to use Emscripten's compatibility feature, "-sMEMORY64=2" flag[2].
Emscripten's "-sMEMORY64=2" flag still enables 64bit pointers in C code. But
this flag lowers the output binary into wasm32, with limiting the maximum
memory size to 4GB. So QEMU can run on wasm32 engines.
[1] https://webassembly.org/features/
[2] https://emscripten.org/docs/tools_reference/settings_reference.html#memory64
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
configure | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 92bfc5f976..326d27dab1 100755
--- a/configure
+++ b/configure
@@ -182,6 +182,10 @@ EXTRA_CXXFLAGS=""
EXTRA_OBJCFLAGS=""
EXTRA_LDFLAGS=""
+# The value is propagated to Emscripten's "-sMEMORY64" flag.
+# https://emscripten.org/docs/tools_reference/settings_reference.html#memory64
+wasm64_memory64=1
+
# Default value for a variable defining feature "foo".
# * foo="no" feature will only be used if --enable-foo arg is given
# * foo="" feature will be searched for, and if found, will be used
@@ -239,6 +243,8 @@ for opt do
;;
--without-default-features) default_feature="no"
;;
+ --wasm64-32bit-address-limit) wasm64_memory64="2"
+ ;;
esac
done
@@ -521,7 +527,7 @@ case "$cpu" in
CPU_CFLAGS="-m32"
;;
wasm64)
- CPU_CFLAGS="-m64 -sMEMORY64=1"
+ CPU_CFLAGS="-m64 -sMEMORY64=$wasm64_memory64"
;;
esac
@@ -779,6 +785,8 @@ for opt do
;;
--disable-rust) rust=disabled
;;
+ --wasm64-32bit-address-limit)
+ ;;
# everything else has the same name in configure and meson
--*) meson_option_parse "$opt" "$optarg"
;;
@@ -904,6 +912,8 @@ Advanced options (experts only):
--disable-containers don't use containers for cross-building
--container-engine=TYPE which container engine to use [$container_engine]
--gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
+ --wasm64-32bit-address-limit Restrict wasm64 address space to 32-bit (default
+ is to use the whole 64-bit range).
EOF
meson_options_help
cat << EOF
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile
2026-01-08 17:11 [PATCH v4 0/4] wasm: Enable 64bit guests on TCI using wasm64 Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 1/4] meson: Add wasm64 support to the --cpu flag Kohei Tokunaga
2026-01-08 17:11 ` [PATCH v4 2/4] configure: Enable to propagate -sMEMORY64 flag to Emscripten Kohei Tokunaga
@ 2026-01-08 17:11 ` Kohei Tokunaga
2026-01-09 20:49 ` Richard Henderson
2026-01-08 17:11 ` [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64 Kohei Tokunaga
3 siblings, 1 reply; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-08 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Kohei Tokunaga, Stefan Hajnoczi, Pierrick Bouvier,
Richard Henderson
This commit fixes Dockerfile of the wasm build to support both of wasm32 and
wasm64 build. Dockerfile takes the following build arguments and use these
values for building dependencies.
- TARGET_CPU: target wasm arch (wasm32 or wasm64)
- WASM64_MEMORY64: target -sMEMORY64 mode (1 or 2)
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
MAINTAINERS | 2 +-
...2-cross.docker => emsdk-wasm-cross.docker} | 29 ++++++++++++++-----
2 files changed, 23 insertions(+), 8 deletions(-)
rename tests/docker/dockerfiles/{emsdk-wasm32-cross.docker => emsdk-wasm-cross.docker} (86%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9a55b649e8..22974fdd73 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -671,7 +671,7 @@ F: include/system/os-wasm.h
F: os-wasm.c
F: util/coroutine-wasm.c
F: configs/meson/emscripten.txt
-F: tests/docker/dockerfiles/emsdk-wasm32-cross.docker
+F: tests/docker/dockerfiles/emsdk-wasm-cross.docker
Alpha Machines
--------------
diff --git a/tests/docker/dockerfiles/emsdk-wasm32-cross.docker b/tests/docker/dockerfiles/emsdk-wasm-cross.docker
similarity index 86%
rename from tests/docker/dockerfiles/emsdk-wasm32-cross.docker
rename to tests/docker/dockerfiles/emsdk-wasm-cross.docker
index 1f08eb0b85..fa2c723dff 100644
--- a/tests/docker/dockerfiles/emsdk-wasm32-cross.docker
+++ b/tests/docker/dockerfiles/emsdk-wasm-cross.docker
@@ -1,14 +1,17 @@
# syntax = docker/dockerfile:1.5
-ARG EMSDK_VERSION_QEMU=3.1.50
+ARG EMSDK_VERSION_QEMU=4.0.10
ARG ZLIB_VERSION=1.3.1
ARG GLIB_MINOR_VERSION=2.84
ARG GLIB_VERSION=${GLIB_MINOR_VERSION}.0
ARG PIXMAN_VERSION=0.44.2
-ARG FFI_VERSION=v3.4.7
+ARG FFI_VERSION=v3.5.2
ARG MESON_VERSION=1.5.0
+ARG TARGET_CPU=wasm32
+ARG WASM64_MEMORY64=0
-FROM docker.io/emscripten/emsdk:$EMSDK_VERSION_QEMU AS build-base
+FROM docker.io/emscripten/emsdk:$EMSDK_VERSION_QEMU AS build-base-common
+ARG TARGET_CPU
ARG MESON_VERSION
ENV TARGET=/builddeps/target
ENV CPATH="$TARGET/include"
@@ -33,8 +36,8 @@ RUN <<EOF
cat <<EOT > /cross.meson
[host_machine]
system = 'emscripten'
-cpu_family = 'wasm32'
-cpu = 'wasm32'
+cpu_family = '${TARGET_CPU}'
+cpu = '${TARGET_CPU}'
endian = 'little'
[binaries]
@@ -46,6 +49,16 @@ pkgconfig = ['pkg-config', '--static']
EOT
EOF
+FROM build-base-common AS build-base-wasm32
+
+FROM build-base-common AS build-base-wasm64
+ARG WASM64_MEMORY64
+ENV CFLAGS="$CFLAGS -sMEMORY64=${WASM64_MEMORY64}"
+ENV CXXFLAGS="$CXXFLAGS -sMEMORY64=${WASM64_MEMORY64}"
+ENV LDFLAGS="$LDFLAGS -sMEMORY64=${WASM64_MEMORY64}"
+
+FROM build-base-${TARGET_CPU} AS build-base
+
FROM build-base AS zlib-dev
ARG ZLIB_VERSION
RUN mkdir -p /zlib
@@ -56,17 +69,19 @@ RUN emconfigure ./configure --prefix=$TARGET --static
RUN emmake make install -j$(nproc)
FROM build-base AS libffi-dev
+ARG TARGET_CPU
+ARG WASM64_MEMORY64
ARG FFI_VERSION
RUN mkdir -p /libffi
RUN git clone https://github.com/libffi/libffi /libffi
WORKDIR /libffi
RUN git checkout $FFI_VERSION
RUN autoreconf -fiv
-RUN emconfigure ./configure --host=wasm32-unknown-linux \
+RUN emconfigure ./configure --host=${TARGET_CPU}-unknown-linux \
--prefix=$TARGET --enable-static \
--disable-shared --disable-dependency-tracking \
--disable-builddir --disable-multi-os-directory \
- --disable-raw-api --disable-docs
+ --disable-raw-api --disable-docs WASM64_MEMORY64=${WASM64_MEMORY64}
RUN emmake make install SUBDIRS='include' -j$(nproc)
FROM build-base AS pixman-dev
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile
2026-01-08 17:11 ` [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile Kohei Tokunaga
@ 2026-01-09 20:49 ` Richard Henderson
2026-01-12 15:03 ` Kohei Tokunaga
0 siblings, 1 reply; 10+ messages in thread
From: Richard Henderson @ 2026-01-09 20:49 UTC (permalink / raw)
To: Kohei Tokunaga, qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Stefan Hajnoczi, Pierrick Bouvier
On 1/9/26 04:11, Kohei Tokunaga wrote:
> @@ -46,6 +49,16 @@ pkgconfig = ['pkg-config', '--static']
> EOT
> EOF
>
> +FROM build-base-common AS build-base-wasm32
> +
> +FROM build-base-common AS build-base-wasm64
> +ARG WASM64_MEMORY64
> +ENV CFLAGS="$CFLAGS -sMEMORY64=${WASM64_MEMORY64}"
> +ENV CXXFLAGS="$CXXFLAGS -sMEMORY64=${WASM64_MEMORY64}"
> +ENV LDFLAGS="$LDFLAGS -sMEMORY64=${WASM64_MEMORY64}"
You've added this control as a configure flag.
Why do you also need it as an environment variable?
r~
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile
2026-01-09 20:49 ` Richard Henderson
@ 2026-01-12 15:03 ` Kohei Tokunaga
0 siblings, 0 replies; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-12 15:03 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Stefan Hajnoczi, Pierrick Bouvier
[-- Attachment #1: Type: text/plain, Size: 728 bytes --]
Hi Richard,
> On 1/9/26 04:11, Kohei Tokunaga wrote:
> > @@ -46,6 +49,16 @@ pkgconfig = ['pkg-config', '--static']
> > EOT
> > EOF
> >
> > +FROM build-base-common AS build-base-wasm32
> > +
> > +FROM build-base-common AS build-base-wasm64
> > +ARG WASM64_MEMORY64
> > +ENV CFLAGS="$CFLAGS -sMEMORY64=${WASM64_MEMORY64}"
> > +ENV CXXFLAGS="$CXXFLAGS -sMEMORY64=${WASM64_MEMORY64}"
> > +ENV LDFLAGS="$LDFLAGS -sMEMORY64=${WASM64_MEMORY64}"
>
> You've added this control as a configure flag.
> Why do you also need it as an environment variable?
They are used for compiling the dependencies. But they are not needed for
QEMU itself so I'll add a separated stage for the QEMU compilation without
those flags.
Regards,
Kohei
[-- Attachment #2: Type: text/html, Size: 988 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64
2026-01-08 17:11 [PATCH v4 0/4] wasm: Enable 64bit guests on TCI using wasm64 Kohei Tokunaga
` (2 preceding siblings ...)
2026-01-08 17:11 ` [PATCH v4 3/4] dockerfiles: Add support for wasm64 to the wasm Dockerfile Kohei Tokunaga
@ 2026-01-08 17:11 ` Kohei Tokunaga
2026-01-09 20:52 ` Richard Henderson
3 siblings, 1 reply; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-08 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Kohei Tokunaga, Stefan Hajnoczi, Pierrick Bouvier,
Richard Henderson
The wasm builds are tested for 3 targets: wasm32, wasm64(-sMEMORY64=1) and
wasm64(-sMEMORY64=2). The CI builds the containers using the same Dockerfile
(emsdk-wasm-cross.docker) with different build args.
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
.gitlab-ci.d/buildtest.yml | 26 ++++++++++++++++++++++----
.gitlab-ci.d/container-cross.yml | 20 ++++++++++++++++++--
.gitlab-ci.d/container-template.yml | 4 +++-
.gitlab-ci.d/containers.yml | 4 +++-
4 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index dfe954fe3c..98bf28488c 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -785,11 +785,29 @@ coverity:
# Always manual on forks even if $QEMU_CI == "2"
- when: manual
-build-wasm:
+build-wasm32-32bit:
extends: .wasm_build_job_template
timeout: 2h
needs:
- - job: wasm-emsdk-cross-container
+ - job: wasm32-32bit-emsdk-cross-container
variables:
- IMAGE: emsdk-wasm32-cross
- CONFIGURE_ARGS: --static --disable-tools --enable-debug --enable-tcg-interpreter
+ IMAGE: emsdk-wasm32-32bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm32 --disable-tools --enable-debug --enable-tcg-interpreter
+
+build-wasm64-64bit:
+ extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ - job: wasm64-64bit-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64-64bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm64 --disable-tools --enable-debug --enable-tcg-interpreter
+
+build-wasm64-32bit:
+ extends: .wasm_build_job_template
+ timeout: 2h
+ needs:
+ - job: wasm64-32bit-emsdk-cross-container
+ variables:
+ IMAGE: emsdk-wasm64-32bit-cross
+ CONFIGURE_ARGS: --static --cpu=wasm64 --wasm64-32bit-address-limit --disable-tools --enable-debug --enable-tcg-interpreter
diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cross.yml
index 0fd7341afa..66fc7343e2 100644
--- a/.gitlab-ci.d/container-cross.yml
+++ b/.gitlab-ci.d/container-cross.yml
@@ -86,7 +86,23 @@ win64-fedora-cross-container:
variables:
NAME: fedora-win64-cross
-wasm-emsdk-cross-container:
+wasm32-32bit-emsdk-cross-container:
extends: .container_job_template
variables:
- NAME: emsdk-wasm32-cross
+ NAME: emsdk-wasm32-32bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm32
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64-64bit-emsdk-cross-container:
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64-64bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1
+ DOCKERFILE: emsdk-wasm-cross
+
+wasm64-32bit-emsdk-cross-container:
+ extends: .container_job_template
+ variables:
+ NAME: emsdk-wasm64-32bit-cross
+ BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2
+ DOCKERFILE: emsdk-wasm-cross
diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
index 82c1b69e8d..b92e96b0fc 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -10,12 +10,14 @@
- export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
- docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- until docker info; do sleep 1; done
+ - export DOCKERFILE_NAME=${DOCKERFILE:-$NAME}
script:
- echo "TAG:$TAG"
- echo "COMMON_TAG:$COMMON_TAG"
- docker build --tag "$TAG" --cache-from "$TAG" --cache-from "$COMMON_TAG"
--build-arg BUILDKIT_INLINE_CACHE=1
- -f "tests/docker/dockerfiles/$NAME.docker" "."
+ $BUILD_ARGS
+ -f "tests/docker/dockerfiles/$DOCKERFILE_NAME.docker" "."
- docker push "$TAG"
after_script:
- docker logout
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index f7d3e7205d..ae99e0a541 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -58,7 +58,9 @@ weekly-container-builds:
- tricore-debian-cross-container
- xtensa-debian-cross-container
- win64-fedora-cross-container
- - wasm-emsdk-cross-container
+ - wasm32-32bit-emsdk-cross-container
+ - wasm64-64bit-emsdk-cross-container
+ - wasm64-32bit-emsdk-cross-container
# containers
- amd64-alpine-container
- amd64-debian-container
--
2.43.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64
2026-01-08 17:11 ` [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64 Kohei Tokunaga
@ 2026-01-09 20:52 ` Richard Henderson
2026-01-12 15:04 ` Kohei Tokunaga
0 siblings, 1 reply; 10+ messages in thread
From: Richard Henderson @ 2026-01-09 20:52 UTC (permalink / raw)
To: Kohei Tokunaga, qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Stefan Hajnoczi, Pierrick Bouvier
On 1/9/26 04:11, Kohei Tokunaga wrote:
> +wasm64-64bit-emsdk-cross-container:
> + extends: .container_job_template
> + variables:
> + NAME: emsdk-wasm64-64bit-cross
> + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=1
> + DOCKERFILE: emsdk-wasm-cross
> +
> +wasm64-32bit-emsdk-cross-container:
> + extends: .container_job_template
> + variables:
> + NAME: emsdk-wasm64-32bit-cross
> + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg WASM64_MEMORY64=2
> + DOCKERFILE: emsdk-wasm-cross
To expand on my question about WASM64_MEMORY64 vs --wasm64-32bit-address-limit, I would
expect the two wasm64 build jobs to share the same container.
r~
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64
2026-01-09 20:52 ` Richard Henderson
@ 2026-01-12 15:04 ` Kohei Tokunaga
2026-01-13 14:00 ` Kohei Tokunaga
0 siblings, 1 reply; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-12 15:04 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Stefan Hajnoczi, Pierrick Bouvier
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
Hi Richard,
> On 1/9/26 04:11, Kohei Tokunaga wrote:
> > +wasm64-64bit-emsdk-cross-container:
> > + extends: .container_job_template
> > + variables:
> > + NAME: emsdk-wasm64-64bit-cross
> > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg
WASM64_MEMORY64=1
> > + DOCKERFILE: emsdk-wasm-cross
> > +
> > +wasm64-32bit-emsdk-cross-container:
> > + extends: .container_job_template
> > + variables:
> > + NAME: emsdk-wasm64-32bit-cross
> > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg
WASM64_MEMORY64=2
> > + DOCKERFILE: emsdk-wasm-cross
>
> To expand on my question about WASM64_MEMORY64 vs
--wasm64-32bit-address-limit, I would
> expect the two wasm64 build jobs to share the same container.
Thanks for the feedback, I'll fix this in the next version of the series.
Regards,
Kohei
[-- Attachment #2: Type: text/html, Size: 1054 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 4/4] .gitlab-ci.d: Add build tests for wasm64
2026-01-12 15:04 ` Kohei Tokunaga
@ 2026-01-13 14:00 ` Kohei Tokunaga
0 siblings, 0 replies; 10+ messages in thread
From: Kohei Tokunaga @ 2026-01-13 14:00 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
Cc: Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Stefan Hajnoczi, Pierrick Bouvier
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
Hi Richard,
> > On 1/9/26 04:11, Kohei Tokunaga wrote:
> > > +wasm64-64bit-emsdk-cross-container:
> > > + extends: .container_job_template
> > > + variables:
> > > + NAME: emsdk-wasm64-64bit-cross
> > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg
WASM64_MEMORY64=1
> > > + DOCKERFILE: emsdk-wasm-cross
> > > +
> > > +wasm64-32bit-emsdk-cross-container:
> > > + extends: .container_job_template
> > > + variables:
> > > + NAME: emsdk-wasm64-32bit-cross
> > > + BUILD_ARGS: --build-arg TARGET_CPU=wasm64 --build-arg
WASM64_MEMORY64=2
> > > + DOCKERFILE: emsdk-wasm-cross
> >
> > To expand on my question about WASM64_MEMORY64 vs
--wasm64-32bit-address-limit, I would
> > expect the two wasm64 build jobs to share the same container.
>
> Thanks for the feedback, I'll fix this in the next version of the series.
I've fixed the test to share the same container. Dependencies are now
compiled with -sMEMORY64=1 to produce wasm64 object files. The
build-wasm64-32bit test compiles QEMU with --wasm64-32bit-address-limit so
that the final linked output is lowered by Emscripten's -sMEMORY64=2.
https://patchew.org/QEMU/cover.1768308374.git.ktokunaga.mail@gmail.com/
Regards,
Kohei
[-- Attachment #2: Type: text/html, Size: 1620 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread