feat: add support for newly added lifecycle states of a vCPU

Please refer to section 7 of the FF-A v1.3 ALP2 specification for
details of newly added lifecycle states. The changes in this patch
help partition manager to support the use case of managing lifecycle
of a secure partition from its creation to deletion.

Change-Id: I78d52b33e0eb3a7ea93dd65e85dbc37fcaa384a9
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
diff --git a/src/vcpu.c b/src/vcpu.c
index 781c4a3..522973d 100644
--- a/src/vcpu.c
+++ b/src/vcpu.c
@@ -63,12 +63,18 @@
 	sl_init(&vcpu->lock);
 	vcpu->regs_available = true;
 	vcpu->vm = vm;
-	vcpu->state = VCPU_STATE_OFF;
 	vcpu->direct_request_origin.is_ffa_req2 = false;
 	vcpu->direct_request_origin.vm_id = HF_INVALID_VM_ID;
 	vcpu->rt_model = RTM_SP_INIT;
 	list_init(&vcpu->timer_node);
 	list_init(&vcpu->ipi_list_node);
+
+	/*
+	 * Though resources have not been allocated to the partition yet, it is
+	 * safe to skip the NULL state for vCPU during cold boot and transition
+	 * directly to CREATED state.
+	 */
+	vcpu->state = VCPU_STATE_CREATED;
 }
 
 /**