Skip to content

Commit 2f5a4fb

Browse files
committed
fixup! snapshot: handle the scratch region correctly
Make virt_to_phys use the aligned and un-canonicalised version of its argument for traversal. This does not actually matter, because only certain bits are actually taken from vmin by the (chained) `modify_ptes` iterator(s). However, since it doesn't matter, this is probably better for clarity. Signed-off-by: Lucy Menon <[email protected]>
1 parent b1274bd commit 2f5a4fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/hyperlight_common/src/arch/amd64

src/hyperlight_common/src/arch/amd64/vmem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ pub unsafe fn virt_to_phys<'a, Op: TableOps + 'a>(
439439
let vmax = core::cmp::min(vmin + len, 1u64 << VA_BITS);
440440
modify_ptes::<47, 39, Op, _>(MapRequest {
441441
table_base: op.as_ref().root_table(),
442-
vmin: address,
442+
vmin,
443443
len: vmax - vmin,
444444
update_parent: UpdateParentNone {},
445445
})

0 commit comments

Comments
 (0)