Skip to content

Commit 40c1f9b

Browse files
authored
ci: Upgrade QEMU to 8.1.1 (bytecodealliance#7096)
* ci: Upgrade QEMU to `8.1.1` This adds support for RISC-V's Zcb extension that includes some extra compressed instructions. It also removes the current cpuinfo patch, that has been released in 8.1 * wasmtime: Don't assert the exact faulting address for wasm traps
1 parent cf28c22 commit 40c1f9b

File tree

4 files changed

+7
-128
lines changed

4 files changed

+7
-128
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ jobs:
374374
name: ${{ matrix.name }}
375375
runs-on: ${{ matrix.os }}
376376
env:
377-
QEMU_BUILD_VERSION: 8.0.4
377+
QEMU_BUILD_VERSION: 8.1.1
378378
strategy:
379379
fail-fast: true
380380
matrix: ${{ fromJson(needs.determine.outputs.test-matrix) }}
@@ -435,7 +435,6 @@ jobs:
435435
# quickly.
436436
curl https://download.qemu.org/qemu-$QEMU_BUILD_VERSION.tar.xz | tar xJf -
437437
cd qemu-$QEMU_BUILD_VERSION
438-
patch -p1 < $GITHUB_WORKSPACE/ci/qemu-cpuinfo.patch
439438
./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache}}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs
440439
ninja -C build install
441440
touch ${{ runner.tool_cache }}/qemu/built

ci/build-test-matrix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const array = [
9191
"target": "riscv64gc-unknown-linux-gnu",
9292
"gcc_package": "gcc-riscv64-linux-gnu",
9393
"gcc": "riscv64-linux-gnu-gcc",
94-
"qemu": "qemu-riscv64 -cpu rv64,v=true,vlen=256,vext_spec=v1.0,zba=true,zbb=true,zbc=true,zbs=true,zbkb=true -L /usr/riscv64-linux-gnu",
94+
"qemu": "qemu-riscv64 -cpu rv64,v=true,vlen=256,vext_spec=v1.0,zba=true,zbb=true,zbc=true,zbs=true,zbkb=true,zcb=true -L /usr/riscv64-linux-gnu",
9595
"qemu_target": "riscv64-linux-user",
9696
"name": "Test Linux riscv64",
9797
"filter": "linux-riscv64",

ci/qemu-cpuinfo.patch

Lines changed: 0 additions & 115 deletions
This file was deleted.

tests/all/traps.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,23 +1347,18 @@ fn wasm_fault_address_reported_by_default() -> Result<()> {
13471347
)?;
13481348
let err = Instance::new(&mut store, &module, &[]).unwrap_err();
13491349

1350-
// On s390x faulting addressess are rounded to the nearest page boundary
1351-
// instead of having the precise address reported.
1352-
let mut expected_addr = 0xdeadbeef_u32;
1353-
if cfg!(target_arch = "s390x") {
1354-
expected_addr &= 0xfffff000;
1355-
}
1356-
13571350
// NB: at this time there's no programmatic access to the fault address
13581351
// because it's not always available for load/store traps. Only static
13591352
// memories on 32-bit have this information, but bounds-checked memories
13601353
// use manual trapping instructions and otherwise don't have a means of
13611354
// communicating the faulting address at this time.
1355+
//
1356+
// It looks like the exact reported fault address may not be deterministic,
1357+
// so assert that we have the right error message, but not the exact address.
13621358
let err = format!("{err:?}");
13631359
assert!(
1364-
err.contains(&format!(
1365-
"memory fault at wasm address 0x{expected_addr:x} in linear memory of size 0x10000"
1366-
)),
1360+
err.contains("memory fault at wasm address ")
1361+
&& err.contains(" in linear memory of size 0x10000"),
13671362
"bad error: {err}"
13681363
);
13691364
Ok(())

0 commit comments

Comments
 (0)