File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,10 @@ pub fn build_microvm_for_boot(
236236 . allocate_guest_memory ( )
237237 . map_err ( StartMicrovmError :: GuestMemory ) ?;
238238
239+ let io_memory = vm_resources
240+ . allocate_io_memory ( )
241+ . map_err ( StartMicrovmError :: GuestMemory ) ?;
242+
239243 // Clone the command-line so that a failed boot doesn't pollute the original.
240244 #[ allow( unused_mut) ]
241245 let mut boot_cmdline = boot_config. cmdline . clone ( ) ;
@@ -260,6 +264,13 @@ pub fn build_microvm_for_boot(
260264 . map_err ( StartMicrovmError :: Internal ) ?;
261265 }
262266
267+ if let Some ( io_memory) = io_memory {
268+ vmm. vm
269+ . register_io_region ( io_memory)
270+ . map_err ( VmmError :: Vm )
271+ . map_err ( StartMicrovmError :: Internal ) ?;
272+ }
273+
263274 let entry_point = load_kernel ( boot_config, vmm. guest_memory ( ) ) ?;
264275 let initrd = load_initrd_from_config ( boot_config, vmm. guest_memory ( ) ) ?;
265276
You can’t perform that action at this time.
0 commit comments