MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / configure_vcpu

Function configure_vcpu

arch/src/riscv64/mod.rs:83–98  ·  view source on GitHub ↗

Configure the specified VCPU, and return its MPIDR.

(
    vcpu: &dyn hypervisor::Vcpu,
    id: u32,
    boot_setup: Option<(EntryPoint, &GuestMemoryAtomic<GuestMemoryMmap>)>,
)

Source from the content-addressed store, hash-verified

81
82/// Configure the specified VCPU, and return its MPIDR.
83pub fn configure_vcpu(
84 vcpu: &dyn hypervisor::Vcpu,
85 id: u32,
86 boot_setup: Option<(EntryPoint, &GuestMemoryAtomic<GuestMemoryMmap>)>,
87) -> super::Result<()> {
88 if let Some((kernel_entry_point, _guest_memory)) = boot_setup {
89 vcpu.setup_regs(
90 id,
91 kernel_entry_point.entry_addr.raw_value(),
92 layout::FDT_START.raw_value(),
93 )
94 .map_err(Error::RegsConfiguration)?;
95 }
96
97 Ok(())
98}
99
100pub fn arch_memory_regions() -> Vec<(GuestAddress, usize, RegionType)> {
101 vec![

Callers

nothing calls this directly

Calls 1

setup_regsMethod · 0.45

Tested by

no test coverage detected