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

Function test_setup_regs

vmm/src/cpu.rs:3448–3461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3446
3447 #[test]
3448 fn test_setup_regs() {
3449 let hv = hypervisor::new().unwrap();
3450 let vm = hv.create_vm(HypervisorVmConfig::default()).unwrap();
3451 let vcpu = vm.create_vcpu(0, None).unwrap();
3452
3453 // Must fail when vcpu is not initialized yet.
3454 vcpu.setup_regs(0, 0x0, layout::FDT_START.0).unwrap_err();
3455
3456 let mut kvi = vcpu.create_vcpu_init();
3457 vm.get_preferred_target(&mut kvi).unwrap();
3458 vcpu.vcpu_init(&kvi).unwrap();
3459
3460 vcpu.setup_regs(0, 0x0, layout::FDT_START.0).unwrap();
3461 }
3462
3463 #[test]
3464 fn test_read_mpidr() {

Callers

nothing calls this directly

Calls 7

newFunction · 0.85
create_vmMethod · 0.45
create_vcpuMethod · 0.45
setup_regsMethod · 0.45
create_vcpu_initMethod · 0.45
get_preferred_targetMethod · 0.45
vcpu_initMethod · 0.45

Tested by

no test coverage detected