Eliminate vm_set_current.
It is a potential source of bugs if we forget to call it, and is
leftover from when hafnium had a scheduler.
Change-Id: I1ce07302ea4c40578fde43a4277b628abf3e4918
diff --git a/src/vm.c b/src/vm.c
index 02b60ff..7387f20 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -73,13 +73,8 @@
{
struct vcpu *vcpu = &vm->vcpus[index];
if (index < vm->vcpu_count) {
- arch_regs_init(&vcpu->regs, entry, arg);
+ arch_regs_init(&vcpu->regs, vm->id == HF_PRIMARY_VM_ID, vm->id,
+ vm->ptable.table, entry, arg);
vcpu_on(vcpu);
}
}
-
-void vm_set_current(struct vm *vm)
-{
- arch_cpu_update(vm->id == HF_PRIMARY_VM_ID);
- arch_mm_set_vm(vm->id, vm->ptable.table);
-}