Skip to content

Commit b24cc36

Browse files
committed
fix: specify "C" calling convention for vmexit_trampoline function
1 parent 980a003 commit b24cc36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/exception.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ fn current_el_sync_handler(tf: &mut TrapFrame) {
340340
/// invoked as part of the low-level hypervisor or VM exit handling routines.
341341
#[unsafe(naked)]
342342
#[unsafe(no_mangle)]
343-
unsafe extern fn vmexit_trampoline() -> ! {
343+
unsafe extern "C" fn vmexit_trampoline() -> ! {
344344
core::arch::naked_asm!(
345345
// Curretly `sp` points to the base address of `Aarch64VCpu.ctx`, which stores guest's `TrapFrame`.
346346
"add x9, sp, 34 * 8", // Skip the exception frame.

0 commit comments

Comments
 (0)