@@ -227,7 +227,7 @@ pub(crate) struct SandboxMemoryLayout {
227227 peb_output_data_offset : usize ,
228228 peb_init_data_offset : usize ,
229229 peb_heap_data_offset : usize ,
230- #[ cfg( feature = "nanvix-unstable " ) ]
230+ #[ cfg( feature = "i686-guest " ) ]
231231 peb_file_mappings_offset : usize ,
232232
233233 guest_heap_buffer_offset : usize ,
@@ -281,7 +281,7 @@ impl Debug for SandboxMemoryLayout {
281281 "Guest Heap Offset" ,
282282 & format_args ! ( "{:#x}" , self . peb_heap_data_offset) ,
283283 ) ;
284- #[ cfg( feature = "nanvix-unstable " ) ]
284+ #[ cfg( feature = "i686-guest " ) ]
285285 ff. field (
286286 "File Mappings Offset" ,
287287 & format_args ! ( "{:#x}" , self . peb_file_mappings_offset) ,
@@ -350,7 +350,7 @@ impl SandboxMemoryLayout {
350350 let peb_output_data_offset = peb_offset + offset_of ! ( HyperlightPEB , output_stack) ;
351351 let peb_init_data_offset = peb_offset + offset_of ! ( HyperlightPEB , init_data) ;
352352 let peb_heap_data_offset = peb_offset + offset_of ! ( HyperlightPEB , guest_heap) ;
353- #[ cfg( feature = "nanvix-unstable " ) ]
353+ #[ cfg( feature = "i686-guest " ) ]
354354 let peb_file_mappings_offset = peb_offset + offset_of ! ( HyperlightPEB , file_mappings) ;
355355
356356 // The following offsets are the actual values that relate to memory layout,
@@ -365,14 +365,14 @@ impl SandboxMemoryLayout {
365365 // many file mappings the host will register, so we reserve space for
366366 // the maximum number.
367367 // The heap starts at the next page boundary after this reserved area.
368- #[ cfg( feature = "nanvix-unstable " ) ]
368+ #[ cfg( feature = "i686-guest " ) ]
369369 let file_mappings_array_end = peb_offset
370370 + size_of :: < HyperlightPEB > ( )
371371 + hyperlight_common:: mem:: MAX_FILE_MAPPINGS
372372 * size_of :: < hyperlight_common:: mem:: FileMappingInfo > ( ) ;
373- #[ cfg( feature = "nanvix-unstable " ) ]
373+ #[ cfg( feature = "i686-guest " ) ]
374374 let guest_heap_buffer_offset = file_mappings_array_end. next_multiple_of ( PAGE_SIZE_USIZE ) ;
375- #[ cfg( not( feature = "nanvix-unstable " ) ) ]
375+ #[ cfg( not( feature = "i686-guest " ) ) ]
376376 let guest_heap_buffer_offset =
377377 ( peb_offset + size_of :: < HyperlightPEB > ( ) ) . next_multiple_of ( PAGE_SIZE_USIZE ) ;
378378
@@ -386,7 +386,7 @@ impl SandboxMemoryLayout {
386386 peb_output_data_offset,
387387 peb_init_data_offset,
388388 peb_heap_data_offset,
389- #[ cfg( feature = "nanvix-unstable " ) ]
389+ #[ cfg( feature = "i686-guest " ) ]
390390 peb_file_mappings_offset,
391391 sandbox_memory_config : cfg,
392392 code_size,
@@ -513,26 +513,26 @@ impl SandboxMemoryLayout {
513513
514514 /// Get the offset in guest memory to the file_mappings count field
515515 /// (the `size` field of the `GuestMemoryRegion` in the PEB).
516- #[ cfg( feature = "nanvix-unstable " ) ]
516+ #[ cfg( feature = "i686-guest " ) ]
517517 pub ( crate ) fn get_file_mappings_size_offset ( & self ) -> usize {
518518 self . peb_file_mappings_offset
519519 }
520520
521521 /// Get the offset in guest memory to the file_mappings pointer field.
522- #[ cfg( feature = "nanvix-unstable " ) ]
522+ #[ cfg( feature = "i686-guest " ) ]
523523 fn get_file_mappings_pointer_offset ( & self ) -> usize {
524524 self . get_file_mappings_size_offset ( ) + size_of :: < u64 > ( )
525525 }
526526
527527 /// Get the offset in snapshot memory where the FileMappingInfo array starts
528528 /// (immediately after the PEB struct, within the same page).
529- #[ cfg( feature = "nanvix-unstable " ) ]
529+ #[ cfg( feature = "i686-guest " ) ]
530530 pub ( crate ) fn get_file_mappings_array_offset ( & self ) -> usize {
531531 self . peb_offset + size_of :: < HyperlightPEB > ( )
532532 }
533533
534534 /// Get the guest address of the FileMappingInfo array.
535- #[ cfg( feature = "nanvix-unstable " ) ]
535+ #[ cfg( feature = "i686-guest " ) ]
536536 fn get_file_mappings_array_gva ( & self ) -> u64 {
537537 ( Self :: BASE_ADDRESS + self . get_file_mappings_array_offset ( ) ) as u64
538538 }
@@ -641,7 +641,7 @@ impl SandboxMemoryLayout {
641641 }
642642
643643 // PEB + preallocated FileMappingInfo array
644- #[ cfg( feature = "nanvix-unstable " ) ]
644+ #[ cfg( feature = "i686-guest " ) ]
645645 let heap_offset = {
646646 let peb_and_array_size = size_of :: < HyperlightPEB > ( )
647647 + hyperlight_common:: mem:: MAX_FILE_MAPPINGS
@@ -652,7 +652,7 @@ impl SandboxMemoryLayout {
652652 Peb ,
653653 )
654654 } ;
655- #[ cfg( not( feature = "nanvix-unstable " ) ) ]
655+ #[ cfg( not( feature = "i686-guest " ) ) ]
656656 let heap_offset =
657657 builder. push_page_aligned ( size_of :: < HyperlightPEB > ( ) , MemoryRegionFlags :: READ , Peb ) ;
658658
@@ -799,9 +799,9 @@ impl SandboxMemoryLayout {
799799 // later by map_file_cow / evolve).
800800 // - The `ptr` field holds the guest address of the preallocated
801801 // FileMappingInfo array
802- #[ cfg( feature = "nanvix-unstable " ) ]
802+ #[ cfg( feature = "i686-guest " ) ]
803803 write_u64 ( mem, self . get_file_mappings_size_offset ( ) , 0 ) ?;
804- #[ cfg( feature = "nanvix-unstable " ) ]
804+ #[ cfg( feature = "i686-guest " ) ]
805805 write_u64 (
806806 mem,
807807 self . get_file_mappings_pointer_offset ( ) ,
@@ -863,11 +863,11 @@ mod tests {
863863 expected_size += layout. code_size ;
864864
865865 // PEB + preallocated FileMappingInfo array
866- #[ cfg( feature = "nanvix-unstable " ) ]
866+ #[ cfg( feature = "i686-guest " ) ]
867867 let peb_and_array = size_of :: < HyperlightPEB > ( )
868868 + hyperlight_common:: mem:: MAX_FILE_MAPPINGS
869869 * size_of :: < hyperlight_common:: mem:: FileMappingInfo > ( ) ;
870- #[ cfg( not( feature = "nanvix-unstable " ) ) ]
870+ #[ cfg( not( feature = "i686-guest " ) ) ]
871871 let peb_and_array = size_of :: < HyperlightPEB > ( ) ;
872872 expected_size += peb_and_array. next_multiple_of ( PAGE_SIZE_USIZE ) ;
873873
0 commit comments