feat: adapt vcpu operational mode to interpret newly added states
With a set of newly introduced states for a vCPU to allow fine grain
tracking of lifecycle of a partition, we have to slightly extend the
notion of a vCPU being ON and OFF.
This patch adds necessary support and refactors helpers to interpret
if a vCPU is in ON or OFF from a operational mode perspective. For
example, VCPU_STATE_STARTING is also considered as OFF since partition
manager has not yet scheduled the vCPU on a physical CPU.
Change-Id: I03aeca4ecb83c28e6cb7897ad0e2a51b315e16b0
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/inc/hf/vcpu.h b/inc/hf/vcpu.h
index 85d4b9f..0c12324 100644
--- a/inc/hf/vcpu.h
+++ b/inc/hf/vcpu.h
@@ -270,7 +270,7 @@
struct two_vcpu_locked vcpu_lock_both(struct vcpu *vcpu1, struct vcpu *vcpu2);
void vcpu_unlock(struct vcpu_locked *locked);
void vcpu_init(struct vcpu *vcpu, struct vm *vm);
-void vcpu_on(struct vcpu_locked vcpu, ipaddr_t entry, uintreg_t arg);
+void vcpu_prepare(struct vcpu_locked vcpu, ipaddr_t entry, uintreg_t arg);
ffa_vcpu_index_t vcpu_index(const struct vcpu *vcpu);
bool vcpu_is_off(struct vcpu_locked vcpu);
bool vcpu_secondary_reset_and_start(struct vcpu_locked vcpu_locked,