Skip to content

Commit 59ceeed

Browse files
committed
fixup! Disentangle host and guest page sizes
Fix merge conflict Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent 09addb1 commit 59ceeed

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • src/hyperlight_host/src/hypervisor/hyperlight_vm

src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ impl HyperlightVm {
625625

626626
#[cfg(gdb)]
627627
pub(super) mod debug {
628-
use hyperlight_common::mem::PAGE_SIZE;
629-
630628
use super::HyperlightVm;
631629
use crate::hypervisor::gdb::arch::{SW_BP, SW_BP_SIZE};
632630
use crate::hypervisor::gdb::{
@@ -816,7 +814,7 @@ pub(super) mod debug {
816814

817815
let read_len = std::cmp::min(
818816
data.len(),
819-
(PAGE_SIZE - (gpa & (PAGE_SIZE - 1))).try_into().unwrap(),
817+
page_size::get() - (gpa as usize & (page_size::get() - 1)),
820818
);
821819

822820
mem_access.read(&mut data[..read_len], gpa)?;
@@ -844,7 +842,7 @@ pub(super) mod debug {
844842

845843
let write_len = std::cmp::min(
846844
data.len(),
847-
(PAGE_SIZE - (gpa & (PAGE_SIZE - 1))).try_into().unwrap(),
845+
page_size::get() - (gpa as usize & (page_size::get() - 1)),
848846
);
849847

850848
// Use the memory access to write to guest memory

0 commit comments

Comments
 (0)