Configure the specified VCPU, and return its MPIDR.
(
vcpu: &dyn hypervisor::Vcpu,
id: u32,
boot_setup: Option<(EntryPoint, &GuestMemoryAtomic<GuestMemoryMmap>)>,
)
| 66 | |
| 67 | /// Configure the specified VCPU, and return its MPIDR. |
| 68 | pub fn configure_vcpu( |
| 69 | vcpu: &dyn hypervisor::Vcpu, |
| 70 | id: u32, |
| 71 | boot_setup: Option<(EntryPoint, &GuestMemoryAtomic<GuestMemoryMmap>)>, |
| 72 | ) -> super::Result<u64> { |
| 73 | if let Some((kernel_entry_point, _guest_memory)) = boot_setup { |
| 74 | vcpu.setup_regs( |
| 75 | id, |
| 76 | kernel_entry_point.entry_addr.raw_value(), |
| 77 | super::layout::FDT_START.raw_value(), |
| 78 | ) |
| 79 | .map_err(Error::RegsConfiguration)?; |
| 80 | } |
| 81 | |
| 82 | let mpidr = vcpu.get_sys_reg(MPIDR_EL1).map_err(Error::VcpuRegMpidr)?; |
| 83 | Ok(mpidr) |
| 84 | } |
| 85 | |
| 86 | pub fn arch_memory_regions() -> Vec<(GuestAddress, usize, RegionType)> { |
| 87 | vec![ |
nothing calls this directly
no test coverage detected