Skip to content

Commit 52b1ed3

Browse files
committed
fix: change function signature of run_guest to use "C" calling convention
1 parent 07f37ba commit 52b1ed3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vcpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<H: AxVCpuHal> Aarch64VCpu<H> {
215215
/// When a VM-Exit happens when guest's vCpu is running,
216216
/// the control flow will be redirected to this function through `return_run_guest`.
217217
#[unsafe(naked)]
218-
unsafe extern fn run_guest(&mut self) -> usize {
218+
unsafe extern "C" fn run_guest(&mut self) -> usize {
219219
// Fixes: https://github.com/arceos-hypervisor/arm_vcpu/issues/22
220220
//
221221
// The original issue seems to be caused by an unexpected compiler optimization that takes

0 commit comments

Comments
 (0)