File tree Expand file tree Collapse file tree
src/hyperlight_host/src/hypervisor/hyperlight_vm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -625,8 +625,6 @@ impl HyperlightVm {
625625
626626#[ cfg( gdb) ]
627627pub ( 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
You can’t perform that action at this time.
0 commit comments