Skip to content

Commit ef76b9b

Browse files
FuraoJE-Archer
authored andcommitted
tool: Set VM VCPU TCB domain to its PDs domain
1 parent 04378bf commit ef76b9b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tool/microkit/src/main.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,6 +2711,22 @@ fn build_system(
27112711
tcb: pd_tcb_objs[pd_idx].cap_addr,
27122712
},
27132713
));
2714+
if let Some(pd_vm) = &pd.virtual_machine {
2715+
for (vm_idx, vm) in virtual_machines.iter().enumerate() {
2716+
if pd_vm.name == vm.name {
2717+
for vcpu_idx in 0..vm.vcpus.len() {
2718+
system_invocations.push(Invocation::new(
2719+
config,
2720+
InvocationArgs::DomainSetSet {
2721+
domain_set: DOMAIN_CAP_ADDRESS,
2722+
domain: domain_id as u8,
2723+
tcb: vcpu_tcb_objs[vm_idx + vcpu_idx].cap_addr,
2724+
},
2725+
));
2726+
}
2727+
}
2728+
}
2729+
}
27142730
}
27152731
}
27162732

0 commit comments

Comments
 (0)