Skip to content

Remove x64 exception handling code and support aarch64 - #562

Open
syntactically wants to merge 4 commits into
lm/hl-0.18.0from
lm/aarch64
Open

syntactically wants to merge 4 commits into
lm/hl-0.18.0from
lm/aarch64

Conversation

@syntactically

Copy link
Copy Markdown
Member

No description provided.

@syntactically syntactically added the kind/enhancement New feature or request label Oct 20, 2026
@syntactically
syntactically added this pull request to stack #563 October 20, 2026 00:42
@syntactically
syntactically force-pushed the lm/aarch64 branch 2 times, most recently from f1bc9ae to 3975edd Compare October 20, 2026 00:56
@syntactically
syntactically force-pushed the lm/aarch64 branch 2 times, most recently from 5a2b052 to a43136d Compare October 20, 2026 17:24
This requires changing the wasi-sdk builder container
definition/script a little bit to make sure it works on aarch64 as
well as x86_64.

Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
As of Hyperlight 0.18.0, all of the functionality we need is
supported(ish) with architecture-independent interfaces in core
Hyperlight. Remove the old architecture-specific code in favour of
those new interfaces.

Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
len: usize,
) -> i32 {
copy_va_mapping(image as *mut u8, len, addr, false);
copy_va_mapping(image as *mut u8, len, addr, false, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is right that this flipped due to the barrier tracker? Just calling out since it is flipped here

ptr: *const u8,
len: usize,
) -> core::result::Result<(), wasmtime::Error> {
wasmtime_mprotect(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, to see this get used!

Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
spin::Mutex::new(None);

extern "C" fn page_fault_handler(pc: u64, fp: u64, va: u64) -> ! {
if let Some(requested_handler) = *WASMTIME_REQUESTED_TRAP_HANDLER.lock() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mutex leak on the second call after the trap handler runs?

name: guest-modules-${{ matrix.wasmtime_version.name }}
name: guest-modules-${{ matrix.arch }}-${{ matrix.wasmtime_version.name }}
path: |
x64/release/*.aot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe this should be by arch too?

// sets the Rust target to be compiled with the hard-float ABI manually via
// `-Zbuild-std` and a custom target JSON configuration
// See https://github.com/bytecodealliance/wasmtime/pull/11553
#[cfg(all(not(feature = "wasmtime_lts"), not(pulley)))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might need to fix this up for arm too? are we going to have any float issues for ARM (I guess ci tests would catch it?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants