Skip to content

Commit 48d5ac8

Browse files
committed
Mask flags bits off for the root page table from CR3
- This is currently done on the guest, but not on the host Signed-off-by: Doru Blânzeanu <dblnz@pm.me>
1 parent 46a4b51 commit 48d5ac8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hyperlight_host/src/hypervisor/hyperlight_vm.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,9 @@ impl HyperlightVm {
621621
/// Get the current base page table physical address
622622
pub(crate) fn get_root_pt(&mut self) -> Result<u64, AccessPageTableError> {
623623
let sregs = self.vm.sregs()?;
624-
Ok(sregs.cr3)
624+
625+
// Mask off the flags bits
626+
Ok(sregs.cr3 & !0xfff_u64)
625627
}
626628

627629
/// Get the special registers that need to be stored in a snapshot.

0 commit comments

Comments
 (0)