Implement minimal PSCI for secondary VMs to manage their vCPUs.

Bug: 132422393
Change-Id: I44643ec9eec722dfe0332b7ffefadcdd8dd98985
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 259d59e..a0151c0 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -40,7 +40,9 @@
 
 struct vcpu *api_preempt(struct vcpu *current);
 struct vcpu *api_wait_for_interrupt(struct vcpu *current);
+struct vcpu *api_vcpu_off(struct vcpu *current);
 struct vcpu *api_abort(struct vcpu *current);
+struct vcpu *api_wake_up(struct vcpu *current, struct vcpu *target_vcpu);
 
 int64_t api_interrupt_enable(uint32_t intid, bool enable, struct vcpu *current);
 uint32_t api_interrupt_get(struct vcpu *current);
diff --git a/inc/hf/arch/timer.h b/inc/hf/arch/timer.h
index f226020..f708f7b 100644
--- a/inc/hf/arch/timer.h
+++ b/inc/hf/arch/timer.h
@@ -58,6 +58,11 @@
 bool arch_timer_enabled_current(void);
 
 /**
+ * Disable the virtual timer for the currently active vCPU.
+ */
+void arch_timer_disable_current(void);
+
+/**
  * Returns the number of ticks remaining on the virtual timer of the currently
  * active vCPU, or 0 if it has already expired. This is undefined if the timer
  * is not enabled.
diff --git a/inc/hf/cpu.h b/inc/hf/cpu.h
index 3c5db07..d0a5466 100644
--- a/inc/hf/cpu.h
+++ b/inc/hf/cpu.h
@@ -133,7 +133,8 @@
 void vcpu_init(struct vcpu *vcpu, struct vm *vm);
 void vcpu_on(struct vcpu_locked 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,
+bool vcpu_is_off(struct vcpu_locked vcpu);
+bool vcpu_secondary_reset_and_start(struct vcpu *vcpu, ipaddr_t entry,
 				    uintreg_t arg);
 
 bool vcpu_handle_page_fault(const struct vcpu *current,