File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
src/hyperlight_host/src/mem Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -224,18 +224,24 @@ impl SandboxMemoryLayout {
224
224
pub ( crate ) const PML4_OFFSET : usize = 0x0000 ;
225
225
/// The offset into the sandbox's memory where the Page Directory Pointer
226
226
/// Table starts.
227
+ #[ cfg( feature = "init-paging" ) ]
227
228
pub ( super ) const PDPT_OFFSET : usize = 0x1000 ;
228
229
/// The offset into the sandbox's memory where the Page Directory starts.
230
+ #[ cfg( feature = "init-paging" ) ]
229
231
pub ( super ) const PD_OFFSET : usize = 0x2000 ;
230
232
/// The offset into the sandbox's memory where the Page Tables start.
233
+ #[ cfg( feature = "init-paging" ) ]
231
234
pub ( super ) const PT_OFFSET : usize = 0x3000 ;
232
235
/// The address (not the offset) to the start of the page directory
236
+ #[ cfg( feature = "init-paging" ) ]
233
237
pub ( super ) const PD_GUEST_ADDRESS : usize = Self :: BASE_ADDRESS + Self :: PD_OFFSET ;
234
238
/// The address (not the offset) into sandbox memory where the Page
235
239
/// Directory Pointer Table starts
240
+ #[ cfg( feature = "init-paging" ) ]
236
241
pub ( super ) const PDPT_GUEST_ADDRESS : usize = Self :: BASE_ADDRESS + Self :: PDPT_OFFSET ;
237
242
/// The address (not the offset) into sandbox memory where the Page
238
243
/// Tables start
244
+ #[ cfg( feature = "init-paging" ) ]
239
245
pub ( super ) const PT_GUEST_ADDRESS : usize = Self :: BASE_ADDRESS + Self :: PT_OFFSET ;
240
246
/// The maximum amount of memory a single sandbox will be allowed.
241
247
/// The addressable virtual memory with current paging setup is virtual address 0x0 - 0x40000000 (excl.),
Original file line number Diff line number Diff line change @@ -374,6 +374,9 @@ impl SandboxMemoryManager<ExclusiveSharedMemory> {
374
374
shared_mem. write_u64 ( offset, load_addr_u64) ?;
375
375
}
376
376
377
+ // The load method returns a LoadInfo which can also be a different type once the
378
+ // `unwind_guest` feature is enabled.
379
+ #[ allow( clippy:: let_unit_value) ]
377
380
let load_info = exe_info. load (
378
381
load_addr. clone ( ) . try_into ( ) ?,
379
382
& mut shared_mem. as_mut_slice ( ) [ layout. get_guest_code_offset ( ) ..] ,
You can’t perform that action at this time.
0 commit comments