Have vm_secondary_start_vcpu take vcpu rather than index.
This simplifies it, and the caller already has to check the index.
There's also no need to check whether the VM is the primary, as we
already assume it is a secondary anyway.
Change-Id: I0edd2a273fef3d4098e7c45ac7a1e81d1416844b
diff --git a/inc/hf/cpu.h b/inc/hf/cpu.h
index acad7ac..45dbb4f 100644
--- a/inc/hf/cpu.h
+++ b/inc/hf/cpu.h
@@ -126,6 +126,8 @@
void vcpu_init(struct vcpu *vcpu, struct vm *vm);
void vcpu_on(struct vcpu *vcpu, ipaddr_t entry, uintreg_t arg);
size_t vcpu_index(const struct vcpu *vcpu);
+void vcpu_secondary_reset_and_start(struct vcpu *vcpu, ipaddr_t entry,
+ uintreg_t arg);
bool vcpu_handle_page_fault(const struct vcpu *current,
struct vcpu_fault_info *f);
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index e202ab4..37dd437 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -95,7 +95,5 @@
bool vm_init(uint32_t vcpu_count, struct mpool *ppool, struct vm **new_vm);
uint32_t vm_get_count(void);
struct vm *vm_get(uint32_t id);
-void vm_secondary_start_vcpu(struct vm *vm, size_t index, ipaddr_t entry,
- uintreg_t arg);
void vm_lock(struct vm *vm, struct vm_locked *locked);
void vm_unlock(struct vm_locked *locked);