diff --git a/hbvm/src/softpaging/mod.rs b/hbvm/src/softpaging/mod.rs index c33bc112..07e05a54 100644 --- a/hbvm/src/softpaging/mod.rs +++ b/hbvm/src/softpaging/mod.rs @@ -501,6 +501,12 @@ pub mod perm_check { pub const fn writable(perm: Permission) -> bool { matches!(perm, Permission::Write) } + + /// Page is executable + #[inline(always)] + pub const fn executable(perm: Permission) -> bool { + matches!(perm, Permission::Exec) + } } /// Handle VM traps