unsafe extern "C" {
pub(crate) unsafe fn dispatch_function(must_flush_tlb: u64);
}
core::arch::global_asm!("
.global dispatch_function
dispatch_function:
.cfi_startproc
.cfi_undefined rip
jnz flush_done
mov rdi, cr4
xor rdi, 0x80
mov cr4, rdi
xor rdi, 0x80
mov cr4, rdi
flush_done:
call {internal_dispatch_function}\n
mov dx, {halt_port}\n
out dx, eax\n
cli\n
hlt\n
.cfi_endproc
",
internal_dispatch_function = sym crate::guest_function::call::internal_dispatch_function,
halt_port = const hyperlight_common::outb::VmAction::Halt as u16,
);